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 2015/12/10 16:17:02 UTC

svn commit: r1719094 - in /ofbiz/trunk/applications/accounting/data: AccountingTypeData.xml DemoGlSetupData.xml

Author: jleroux
Date: Thu Dec 10 15:17:02 2015
New Revision: 1719094

URL: http://svn.apache.org/viewvc?rev=1719094&view=rev
Log:
A patch from Pierre Smits for "Wrong purchase invoice item type for product type IDs RAW_MATERIAL, GOOD" https://issues.apache.org/jira/browse/OFBIZ-6763

Reported by Michael Powacht
System incorrectly derives invoice item type INV_FPROD_ITEM (instead of  PINV_FPROD_ITEM, for example) in purchase invoices for purchase orders with products of type RAW_MATERIAL and GOOD. As a result, the GL account derivation is incorrect as well where a revenue GL account gets debited instead of GL "Uninvoiced Shipment Receipts". 
The incorrect accounting entry posted is:
DR Revenue (as a result of invoice item type INV_FPROD_ITEM)
CR A/P
The correct entry should be:
DR Uninvoiced Shipment Receipts (derived from PINV_FPROD_ITEM)
 CR A/P
It seems the above is caused by missing entries in table invoice_item_type_map where 
INVOICE_ITEM_MAP_KEY should contain RAW_MATERIAL and GOOD and/or PRODUCT_ORDER_ITEM.
The above symptom does not affect the Goods Receipt Transactions, which gets correctly posted as:
DR Inventory
CR Uninvoiced Shipment Receipts

jleroux: Rupert Howell gave the missing data in a comment, Pierre the patch

Modified:
    ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
    ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml

Modified: ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml?rev=1719094&r1=1719093&r2=1719094&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml Thu Dec 10 15:17:02 2015
@@ -463,6 +463,7 @@ under the License.
     <InvoiceItemType description="Invoice Digital Good Item(Purchase)" hasTable="N" invoiceItemTypeId="PINV_DPROD_ITEM" parentTypeId="PINV_PROD_ITEM"/>
     <InvoiceItemType description="Invoice Finished/Digital Good Item(Purchase)" hasTable="N" invoiceItemTypeId="PINV_FDPROD_ITEM" parentTypeId="PINV_PROD_ITEM"/>
     <InvoiceItemType description="Invoice Product-Feature Item(Purchase)" hasTable="N" invoiceItemTypeId="PINV_PROD_FEATR_ITEM" parentTypeId="PINV_PROD_ITEM"/>
+    <InvoiceItemType description="Invoice Raw Material(Purchase)" hasTable="N" invoiceItemTypeId="PINV_RPROD_ITEM" parentTypeId="PINV_PROD_ITEM"/>
     <InvoiceItemType description="Invoice Service Product Item(Purchase)" hasTable="N" invoiceItemTypeId="PINV_SPROD_ITEM" parentTypeId="PINV_PROD_ITEM"/>
 
     <InvoiceItemType description="Invoice Inventory Product Item" hasTable="N" invoiceItemTypeId="PINV_INVPRD_ITEM" parentTypeId="PINV_PROD_ITEM"/>
@@ -570,7 +571,8 @@ under the License.
     <InvoiceItemTypeMap invoiceTypeId="PURCHASE_INVOICE" invoiceItemMapKey="DIGITAL_GOOD" invoiceItemTypeId="PINV_DPROD_ITEM"/>
     <InvoiceItemTypeMap invoiceTypeId="PURCHASE_INVOICE" invoiceItemMapKey="FINDIG_GOOD" invoiceItemTypeId="PINV_FDPROD_ITEM"/>
     <InvoiceItemTypeMap invoiceTypeId="PURCHASE_INVOICE" invoiceItemMapKey="SERVICE" invoiceItemTypeId="PINV_SPROD_ITEM"/>
-
+    <InvoiceItemTypeMap invoiceTypeId="PURCHASE_INVOICE" invoiceItemMapKey="RAW_MATERIAL" invoiceItemTypeId="PINV_RPROD_ITEM"/>
+    
     <!-- orderAdjustmentTypeId -->
     <InvoiceItemTypeMap invoiceTypeId="PURCHASE_INVOICE" invoiceItemMapKey="PROMOTION_ADJUSTMENT" invoiceItemTypeId="PITM_PROMOTION_ADJ"/>
     <InvoiceItemTypeMap invoiceTypeId="PURCHASE_INVOICE" invoiceItemMapKey="REPLACE_ADJUSTMENT" invoiceItemTypeId="PITM_REPLACE_ADJ"/>

Modified: ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml?rev=1719094&r1=1719093&r2=1719094&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml Thu Dec 10 15:17:02 2015
@@ -86,6 +86,7 @@ under the License.
     <InvoiceItemType invoiceItemTypeId="PINV_DPROD_ITEM" defaultGlAccountId="500000"/>
     <InvoiceItemType invoiceItemTypeId="PINV_FDPROD_ITEM" defaultGlAccountId="214000"/>
     <InvoiceItemType invoiceItemTypeId="PINV_PROD_FEATR_ITEM" defaultGlAccountId="214000"/>
+    <InvoiceItemType invoiceItemTypeId="PINV_RPROD_ITEM" defaultGlAccountId="214000"/>
     <InvoiceItemType invoiceItemTypeId="PINV_SPROD_ITEM" defaultGlAccountId="500000"/>
 
     <InvoiceItemType invoiceItemTypeId="PINV_INVPRD_ITEM" defaultGlAccountId="650000"/>