Author: jacopoc
Date: Mon Mar 29 09:19:30 2010
New Revision: 928662
URL:
http://svn.apache.org/viewvc?rev=928662&view=revLog:
When inventory is produced and accounted to the INVENTORY account an inventoryitemdetail record is also created to track the accountingQuantityDiff (needed by LIFO/FIFO costing methods).
This fixes the bug reported in the user mailing list by Chatree Srichart.
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
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=928662&r1=928661&r2=928662&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 Mon Mar 29 09:19:30 2010
@@ -1502,6 +1502,11 @@ under the License.
<calcop operator="get" field="inventoryItem.unitCost"/>
</calcop>
</calculate>
+ <!-- An inventory item detail record is created to keep track of the units (value) that we are going to add to the inventory account -->
+ <set from-field="inventoryItem.inventoryItemId" field="createDetailMap.inventoryItemId"/>
+ <set from-field="inventoryItem.quantityOnHandTotal" field="createDetailMap.accountingQuantityDiff"/>
+ <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
+
<!-- prepare the double posting (D/C) entries (AcctgTransEntry) -->
<!-- Credit -->
<make-value entity-name="AcctgTransEntry" value-field="creditEntry"/>