processRefundReturn issue refunds when there are multiple forms of payment
-------------------------------------------------------------------------- Key: OFBIZ-155 URL: http://issues.apache.org/jira/browse/OFBIZ-155 Project: OFBiz (The Open for Business Project) Issue Type: Improvement Components: order Reporter: Si Chen Currently when items are returned for a refund, the processRefundReturn service will only work if there is one payment method associated with the order. For example, in OrderReturnServices.java, } else if (prefsToUse.size() > 1) { // we need to spit the items up to log which pref it was refunded to // TODO: add the split of items for multiple payment prefs } The process would involve going through to the original OrderHeader, through OrderItemBilling, and then through Invoice and Payments to find the RECEIVED payments and group the amounts originally used to pay for the order by paymentMethodId. Then go through the ReturnItemResponse for past ReturnItems of this order and group the amount refunded for each paymentMethodId. Then calculate the amount which could still be refunded from the difference of original purchase amount and total already refunded for each payment preference of the order. If a portion of the order were paid for with a billingAccount (OrderPaymentPreference EXT_BILLACT with billingAccountId) and a return has been credited to a billingAccountId (ReturnItemResponse whose Payment has a billingAccountId), then we would similarly calculate the original amounts charged to billingAccountid and the amount refunded to billingAccountId. Once we know the amount charged and refunded, refunds will be issued in the following sequence: 1. BillingAccount, until the billing account is fully refunded 2. Gift Card, until the gift card(s) are fully refunded 3. Credit card, until the credit card(s) are fully refunded. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ http://issues.apache.org/jira/browse/OFBIZ-155?page=all ]
Si Chen closed OFBIZ-155. ------------------------- Resolution: Fixed > processRefundReturn issue refunds when there are multiple forms of payment > -------------------------------------------------------------------------- > > Key: OFBIZ-155 > URL: http://issues.apache.org/jira/browse/OFBIZ-155 > Project: OFBiz (The Open for Business Project) > Issue Type: Improvement > Components: order > Reporter: Si Chen > > Currently when items are returned for a refund, the processRefundReturn service will only work if there is one payment method associated with the order. For example, in OrderReturnServices.java, > } else if (prefsToUse.size() > 1) { > // we need to spit the items up to log which pref it was refunded to > // TODO: add the split of items for multiple payment prefs > } > The process would involve going through to the original OrderHeader, through OrderItemBilling, and then through Invoice and Payments to find the RECEIVED payments and group the amounts originally used to pay for the order by paymentMethodId. Then go through the ReturnItemResponse for past ReturnItems of this order and group the amount refunded for each paymentMethodId. Then calculate the amount which could still be refunded from the difference of original purchase amount and total already refunded for each payment preference of the order. > If a portion of the order were paid for with a billingAccount (OrderPaymentPreference EXT_BILLACT with billingAccountId) and a return has been credited to a billingAccountId (ReturnItemResponse whose Payment has a billingAccountId), then we would similarly calculate the original amounts charged to billingAccountid and the amount refunded to billingAccountId. > Once we know the amount charged and refunded, refunds will be issued in the following sequence: > 1. BillingAccount, until the billing account is fully refunded > 2. Gift Card, until the gift card(s) are fully refunded > 3. Credit card, until the credit card(s) are fully refunded. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |