|
Author: jaz
Date: Wed Aug 22 13:40:16 2007 New Revision: 568747 URL: http://svn.apache.org/viewvc?rev=568747&view=rev Log: added reason code to service credit service Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml?rev=568747&r1=568746&r2=568747&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Wed Aug 22 13:40:16 2007 @@ -201,7 +201,8 @@ location="org.ofbiz.accounting.finaccount.FinAccountServices" invoke="createAccountAndCredit" auth="true"> <attribute name="finAccountId" type="String" mode="INOUT" optional="true"/> <attribute name="finAccountName" type="String" mode="IN" optional="true"/> - <attribute name="comments" type="String" mode="IN" optional="true"/> + <attribute name="reasonEnumId" type="String" mode="IN" optional="true"/> + <attribute name="comments" type="String" mode="IN" optional="true"/> <attribute name="partyId" type="String" mode="IN" optional="false"/> <attribute name="amount" type="Double" mode="IN" optional="false"/> <attribute name="replenishPaymentId" type="String" mode="IN" optional="true"/> Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java?rev=568747&r1=568746&r2=568747&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java Wed Aug 22 13:40:16 2007 @@ -145,11 +145,16 @@ } // create the credit transaction - Map creditTransResult = dispatcher.runSync("createFinAccountTrans", - UtilMisc.toMap("finAccountTransTypeId", "ADJUSTMENT", "finAccountId", - creditAccount.getString("finAccountId"), "partyId", partyId, "amount", - context.get("amount"), "comments", context.get("comments"), "userLogin", userLogin)); - + Map transactionMap = FastMap.newInstance(); + transactionMap.put("finAccountTransTypeId", "ADJUSTMENT"); + transactionMap.put("finAccountId", creditAccount.getString("finAccountId")); + transactionMap.put("partyId", partyId); + transactionMap.put("amount", context.get("amount")); + transactionMap.put("reasonEnumId", context.get("reasonEnumId")); + transactionMap.put("comments", context.get("comments")); + transactionMap.put("userLogin", userLogin); + + Map creditTransResult = dispatcher.runSync("createFinAccountTrans", transactionMap); if (ServiceUtil.isError(creditTransResult) || ServiceUtil.isFailure(creditTransResult)) { return creditTransResult; } |
| Free forum by Nabble | Edit this page |
