Author: hansbak Date: Fri Jun 28 08:18:45 2013 New Revision: 1497674 URL: http://svn.apache.org/r1497674 Log: when an order is in foreign currency with an agreement that does not contain a currency, the entered currency is set back to the base currency: corrected
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1497674&r1=1497673&r2=1497674&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Fri Jun 28 08:18:45 2013 @@ -2872,6 +2872,7 @@ under the License. <first-from-list list="glAccountCategoryMembers" entry="glAccountCategoryMember"/> <set field="glAcctgOrgAndCostCenterMap[glAccountCategory.glAccountCategoryId]" from-field="glAccountCategoryMember.amountPercentage" type="BigDecimal"/> <get-related-one value-field="glAccountCategoryMember" relation-name="GlAccount" to-value-field="glAccount"/> + <set field="glAcctgOrgAndCostCenterMap.glAccountOrganization" from-field="glAccountOrganization.organizationPartyId"/> <set field="glAcctgOrgAndCostCenterMap.glAccountId" from-field="glAccount.glAccountId"/> <set field="glAcctgOrgAndCostCenterMap.accountCode" from-field="glAccount.accountCode"/> <set field="glAcctgOrgAndCostCenterMap.accountName" from-field="glAccount.accountName"/> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1497674&r1=1497673&r2=1497674&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Fri Jun 28 08:18:45 2013 @@ -1877,7 +1877,8 @@ public class ShoppingCartEvents { // set the agreement if specified otherwise set the currency if (UtilValidate.isNotEmpty(agreementId)) { result = cartHelper.selectAgreement(agreementId); - } else if (UtilValidate.isNotEmpty(currencyUomId)) { + } + if (UtilValidate.isNotEmpty(cart.getCurrency()) && UtilValidate.isNotEmpty(currencyUomId)) { result = cartHelper.setCurrency(currencyUomId); } if (ServiceUtil.isError(result)) {