You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/12/28 17:10:54 UTC
svn commit: r1553864 - in /ofbiz/branches/release11.04: ./
applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
Author: jleroux
Date: Sat Dec 28 16:10:53 2013
New Revision: 1553864
URL: http://svn.apache.org/r1553864
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/release11.04/ (props changed)
ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1531848
Modified: ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1553864&r1=1553863&r2=1553864&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original)
+++ ofbiz/branches/release11.04/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Sat Dec 28 16:10:53 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"/>