Author: sichen
Date: Wed Dec 19 16:03:41 2007 New Revision: 605746 URL: http://svn.apache.org/viewvc?rev=605746&view=rev Log: manual refund status for returns that require manual refunds Modified: ofbiz/trunk/applications/order/data/OrderTypeData.xml ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Modified: ofbiz/trunk/applications/order/data/OrderTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/data/OrderTypeData.xml?rev=605746&r1=605745&r2=605746&view=diff ============================================================================== --- ofbiz/trunk/applications/order/data/OrderTypeData.xml (original) +++ ofbiz/trunk/applications/order/data/OrderTypeData.xml Wed Dec 19 16:03:41 2007 @@ -178,6 +178,7 @@ <StatusItem description="Accepted" sequenceId="02" statusCode="ACCEPTED" statusId="RETURN_ACCEPTED" statusTypeId="ORDER_RETURN_STTS"/> <StatusItem description="Received" sequenceId="03" statusCode="RECEIVED" statusId="RETURN_RECEIVED" statusTypeId="ORDER_RETURN_STTS"/> <StatusItem description="Completed" sequenceId="10" statusCode="COMPLETED" statusId="RETURN_COMPLETED" statusTypeId="ORDER_RETURN_STTS"/> + <StatusItem description="Manual Refund Required" sequenceId="11" statusCode="MANUAL_REFUND" statusId="RETURN_MAN_REFUND" statusTypeId="ORDER_RETURN_STTS"/> <StatusItem description="Cancelled" sequenceId="99" statusCode="CANCELLED" statusId="RETURN_CANCELLED" statusTypeId="ORDER_RETURN_STTS"/> <StatusValidChange condition="" statusId="RETURN_REQUESTED" statusIdTo="RETURN_ACCEPTED" transitionName="Requested Return Accepted"/> <StatusValidChange condition="" statusId="RETURN_REQUESTED" statusIdTo="RETURN_CANCELLED" transitionName="Requested Return Cancelled"/> @@ -185,6 +186,7 @@ <StatusValidChange condition="" statusId="RETURN_ACCEPTED" statusIdTo="RETURN_CANCELLED" transitionName="Accepted Return Cancelled"/> <StatusValidChange condition="" statusId="RETURN_RECEIVED" statusIdTo="RETURN_COMPLETED" transitionName="Received Return Completed"/> <StatusValidChange condition="" statusId="RETURN_RECEIVED" statusIdTo="RETURN_CANCELLED" transitionName="Received Return Cancelled"/> + <StatusValidChange condition="" statusId="RETURN_RECEIVED" statusIdTo="RETURN_MAN_REFUND" transitionName="Received Return Requires Manual Refund"/> <!-- CustRequest statuses --> <StatusType description="Custom Request Status" hasTable="N" parentTypeId="" statusTypeId="CUSTREQ_STTS"/> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=605746&r1=605745&r2=605746&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Wed Dec 19 16:03:41 2007 @@ -1023,7 +1023,7 @@ BigDecimal amountToRefund = orderPaymentPreferenceAvailable.min(amountLeftToRefund); String paymentId = null; - + String returnItemStatusId = "RETURN_COMPLETED"; // generally, the return item will be considered complete after this // Call the refund service to refund the payment if (electronicTypes.contains(paymentMethodTypeId)) { try { @@ -1069,6 +1069,7 @@ continue; } paymentId = (String) serviceResult.get("paymentId"); + returnItemStatusId = "RETURN_MAN_REFUND"; // however, in this case we hsould flag it as a manual refund } catch (GenericServiceException e) { return ServiceUtil.returnError(e.getMessage()); } @@ -1101,7 +1102,7 @@ while (itemsIter.hasNext()) { GenericValue item = (GenericValue) itemsIter.next(); item.set("returnItemResponseId", responseId); - item.set("statusId", "RETURN_COMPLETED"); + item.set("statusId", returnItemStatusId); // Create the status history String returnStatusId = delegator.getNextSeqId("ReturnStatus"); |
Free forum by Nabble | Edit this page |