You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Vikas Mayur (JIRA)" <ji...@apache.org> on 2007/12/01 11:19:43 UTC

[jira] Updated: (OFBIZ-1457) Implement an automatic GL posting service triggered when InventoryItem.unitCost is changed

     [ https://issues.apache.org/jira/browse/OFBIZ-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vikas Mayur updated OFBIZ-1457:
-------------------------------

    Attachment: glPostingService.patch

Patch from Jyotsna Rathore

> Implement an automatic GL posting service triggered when InventoryItem.unitCost is changed
> ------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1457
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1457
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>    Affects Versions: SVN trunk
>            Reporter: Jacopo Cappellato
>         Attachments: glPostingService.patch
>
>
> The name of the service can be "createAcctgTransForInventoryItemCostChange" or similar.
> We can use the following template for this service: createAcctgTransForShipmentReceipt in GeneralLedgerServices.xml
> The service is triggered by a SECA rule on createInventoryItemDetail with the condition: unitCost is-not-empty and receiptId is-not-empty (we don't want the service to run when the item is received aka created); in this way, every time an InventoryItemDetail with a non null unitCost is created (that means we have changed the cost of the item) we have to run the service to post the following adjustment to the GL:
> origAmount = QOH * (oldUnitCost - newUnitCost)
> the glAccountTypeId to be used for the double entries are:
> INV_ADJ_VAL for D
> INVENTORY_ACCOUNT for C
> and the acctgTransTypeId is INVENTORY
> The newUnitCost is the cost found in the last created InventoryItemDetail, the oldUnitCost is in the most recent InventoryItemDetail (that is not the last one) with unitCost != null

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.