Author: jleroux
Date: Sat Dec 28 16:10:51 2013 New Revision: 1553863 URL: http://svn.apache.org/r1553863 Log: "Applied fix from trunk for revision: 1531848 " jleroux: I have tested it locally with R11.04: works! ------------------------------------------------------------------------ r1531848 | jacopoc | 2013-10-14 12:56:24 +0200 (lun. 14 oct. 2013) | 3 lignes Fixed bug reported by Simon Maskell in OFBIZ-5344 with a slightly different patch than the one provided by Simon. Also added a TODO comment to warn that the current logic doesn't work well for LIFO/FIFO. ------------------------------------------------------------------------ Modified: ofbiz/branches/release12.04/ (props changed) ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Propchange: ofbiz/branches/release12.04/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1531848 Modified: ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1553863&r1=1553862&r2=1553863&view=diff ============================================================================== --- ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original) +++ ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Sat Dec 28 16:10:51 2013 @@ -1415,9 +1415,11 @@ under the License. </simple-method> <simple-method method-name="createAcctgTransForInventoryItemCostChange" short-description="Create accounting transaction when item cost is changed (D: INV_ADJ_VAL, C: INVENTORY_ACCOUNT)"> + <!-- TODO: the logic in this service needs to be reimplemented to properly implement FIFO/LIFO valuation methods --> <!-- retrieve ledger rounding properties --> <call-simple-method method-name="getGlArithmeticSettingsInline"/> <entity-one entity-name="InventoryItemDetail" value-field="newInventoryItemDetail"/> + <get-related-one value-field="newInventoryItemDetail" relation-name="InventoryItem" to-value-field="inventoryItem"/> <entity-condition entity-name="InventoryItemDetail" list="inventoryItemDetails"> <condition-list> <condition-expr field-name="inventoryItemId" operator="equals" from-field="newInventoryItemDetail.inventoryItemId"/> @@ -1429,7 +1431,7 @@ under the License. <first-from-list list="inventoryItemDetails" entry="oldInventoryItemDetail"/> <if-not-empty field="oldInventoryItemDetail"> <calculate field="origAmount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> - <calcop operator="multiply" field="newinventoryItem.quantityOnHandTotal"> + <calcop operator="multiply" field="inventoryItem.quantityOnHandTotal"> <calcop operator="subtract"> <calcop operator="get" field="oldInventoryItemDetail.unitCost"/> <calcop operator="get" field="newInventoryItemDetail.unitCost"/> @@ -1438,7 +1440,6 @@ under the License. </calculate> <!-- if originAmount is equals to 0 do not create transaction, this is causing error in postAcctgTrans --> <if-compare operator="not-equals" field="origAmount" value="0"> - <get-related-one value-field="newInventoryItemDetail" relation-name="InventoryItem" to-value-field="inventoryItem"/> <!-- Credit --> <make-value entity-name="AcctgTransEntry" value-field="creditEntry"/> <set field="creditEntry.debitCreditFlag" value="C"/> |
Free forum by Nabble | Edit this page |