Dev - Purchasing Inventory, Supplies, Fixed Assets, etc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Dev - Purchasing Inventory, Supplies, Fixed Assets, etc

David E. Jones

The Purchase Order functionality in OFBiz has made a lot of progress over recent months, but that has exposed a deficiency in the original design... Right now if you order a product it will be accounted for as Inventory and received into InventoryItems. In other words, there is no separation between inventory, supplies, fixed asset, etc purchases.

Before getting into the details I want to note: the pattern described below is not meant to handle all possible allocations of purchases, just a few high level ones that will be associated with high level GL Accounts. For more fine grained selection there really should be a way to manually post this sort of purchase invoice and select the account the stuff should go into. With this pattern one possible way of achieving this is to continue to post to the higher level accounts using the automatic default posting, and then do "semi-manual" adjustment transactions to move the amount from the higher level account (like 170000) to a lower level one (like 172000).

Anyway, back to the details...

To get the Purchase Order Items to post to the proper high level accounts I have (in SVN rev 7649) added new OrderItemType records for inventory, supplies, and fixed assets. I have also added new InvoiceItemType records for these, and the mapping between them. Small changes were required to the ShoppingCartEvents and InvoiceServices classes (in the same rev) to support this mapping, ie InvoiceItemType from OrderItemType.

Attached to this email is a patch (to rev 247 as implied by the file name) to the DefaultInvoiceItemTypeGlAccounts.xml file in the Open Source Strategies financials module which should get it to support these new invoice item types for the automatic Invoice posting (let me know if there are any issues with getting this into your project Si).

There are some things left to do:

1. change the Order Manager UI to specify the OrderItemType in a Purchase Order (on add and/or when editing the cart)

2. change the order (or shipment...) receiving code to look at the OrderItemType and not create InventoryItem records when it is for supplies or fixed assets; we could also automatically create a FixedAsset record for the fixed asset type OrderItems

3. make sure the auto-posting is working throughout the OSS financials module (perhaps someone on your team could look at this Si?)

Once this is done I think OFBiz will be much closer to an out of the box solution for companies to use as a complete solution for operating a company. It's nice to be able to purchase more than just inventory and track it in the system... ;)

If anyone has any funding or could help with this that would be great. It's something that has been missing for a while and this solution has emerged over time so hopefully this will help get things started on it.

Unless there are problems with this approach we should (I can) create Jira issues for #1 and #2, and if there is an issue tracker or whatever for the OSS financials component #3 could go there (thought it's fairly small, so that may not even be needed, I guess depends on Si's preference).

-David



Index: data/DefaultInvoiceItemTypeGlAccounts.xml
===================================================================
--- data/DefaultInvoiceItemTypeGlAccounts.xml (revision 247)
+++ data/DefaultInvoiceItemTypeGlAccounts.xml (working copy)
@@ -64,6 +64,10 @@
     <InvoiceItemType invoiceItemTypeId="PINV_PROD_FEATR_ITEM" defaultGlAccountId="140000"/>
     <InvoiceItemType invoiceItemTypeId="PINV_SPROD_ITEM" defaultGlAccountId="140000"/>
 
+    <InvoiceItemType invoiceItemTypeId="PINV_INVPRD_ITEM" defaultGlAccountId="140000"/>
+    <InvoiceItemType invoiceItemTypeId="PINV_SUPLPRD_ITEM" defaultGlAccountId="650000"/>
+    <InvoiceItemType invoiceItemTypeId="PINV_FXASTPRD_ITEM" defaultGlAccountId="170000"/>
+    
     <InvoiceItemType invoiceItemTypeId="PINV_WE_ITEM" defaultGlAccountId="140000"/>
     <InvoiceItemType invoiceItemTypeId="PINV_TE_ITEM" defaultGlAccountId="140000"/>
     

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev