[jira] Created: (OFBIZ-1459) Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed

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

[jira] Created: (OFBIZ-1459) Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed

Nicolas Malin (Jira)
Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed
---------------------------------------------------------------------------------------------------------

                 Key: OFBIZ-1459
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1459
             Project: OFBiz
          Issue Type: Sub-task
          Components: accounting
    Affects Versions: SVN trunk
            Reporter: Jacopo Cappellato


The name of the service can be "createAcctgTransForInventoryItemOwnerChange" or similar.
Input field: inventoryItemId, oldOwnerPartyId
Output field: acctgTransId

We can use the following template for this service: createAcctgTransForShipmentReceipt in GeneralLedgerServices.xml

The service will do the following tasks:
1) compute the origAmount as: origAmount = inventoryItem.quantityOnHandTotal * inventoryItem.unitCost
2) prepare 2 AcctgTransEntry (a debit and a credit) for the oldOwnerPartyId:
CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_XFER_IN, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId

3) prepare 2 AcctgTransEntry (a debit and a credit) for the inventoryItem.ownerPartyId:
CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_XFER_OUT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId

4) put the 4 entries in a list and call the createAcctgTransAndEntries service with the following fields: acctgTransTypeId=INVENTORY, acctgTransEntries=(the list with the 4 entries), inventoryItemId=parameters.inventoryItemId, glFiscalTypeId=ACTUAL

The ECA will be:
<eca service="updateInventoryItem" event="commit">
    <condition field-name="ownerPartyId" operator="is-not-empty"/>
    <condition-field field-name="ownerPartyId" operator="not-equals" to-field-name="oldOwnerPartyId"/>
    <action service="createAcctgTransForInventoryItemOwnerChange" mode="sync"/>
</eca>

You can then test the service when you go into an Inventory Item in the facility, and change the ownerPartyId of an inventory item.



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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1459) Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed

Nicolas Malin (Jira)

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

Rishi Solanki updated OFBIZ-1459:
---------------------------------

    Attachment: jira_1459_automatic_GL_posting_service_ownerPartyIdchanged.patch

I'm submitting work for jira-issue-1459 as per the comments obtained in CR-364


> Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1459
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1459
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>    Affects Versions: SVN trunk
>            Reporter: Jacopo Cappellato
>         Attachments: jira_1459_automatic_GL_posting_service_ownerPartyIdchanged.patch
>
>
> The name of the service can be "createAcctgTransForInventoryItemOwnerChange" or similar.
> Input field: inventoryItemId, oldOwnerPartyId
> Output field: acctgTransId
> We can use the following template for this service: createAcctgTransForShipmentReceipt in GeneralLedgerServices.xml
> The service will do the following tasks:
> 1) compute the origAmount as: origAmount = inventoryItem.quantityOnHandTotal * inventoryItem.unitCost
> 2) prepare 2 AcctgTransEntry (a debit and a credit) for the oldOwnerPartyId:
> CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_XFER_IN, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
> DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
> 3) prepare 2 AcctgTransEntry (a debit and a credit) for the inventoryItem.ownerPartyId:
> CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
> DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_XFER_OUT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
> 4) put the 4 entries in a list and call the createAcctgTransAndEntries service with the following fields: acctgTransTypeId=INVENTORY, acctgTransEntries=(the list with the 4 entries), inventoryItemId=parameters.inventoryItemId, glFiscalTypeId=ACTUAL
> The ECA will be:
> <eca service="updateInventoryItem" event="commit">
>     <condition field-name="ownerPartyId" operator="is-not-empty"/>
>     <condition-field field-name="ownerPartyId" operator="not-equals" to-field-name="oldOwnerPartyId"/>
>     <action service="createAcctgTransForInventoryItemOwnerChange" mode="sync"/>
> </eca>
> You can then test the service when you go into an Inventory Item in the facility, and change the ownerPartyId of an inventory item.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-1459) Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Anil K Patel reassigned OFBIZ-1459:
-----------------------------------

    Assignee: Anil K Patel

> Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1459
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1459
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>    Affects Versions: SVN trunk
>            Reporter: Jacopo Cappellato
>            Assignee: Anil K Patel
>         Attachments: jira_1459_automatic_GL_posting_service_ownerPartyIdchanged.patch
>
>
> The name of the service can be "createAcctgTransForInventoryItemOwnerChange" or similar.
> Input field: inventoryItemId, oldOwnerPartyId
> Output field: acctgTransId
> We can use the following template for this service: createAcctgTransForShipmentReceipt in GeneralLedgerServices.xml
> The service will do the following tasks:
> 1) compute the origAmount as: origAmount = inventoryItem.quantityOnHandTotal * inventoryItem.unitCost
> 2) prepare 2 AcctgTransEntry (a debit and a credit) for the oldOwnerPartyId:
> CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_XFER_IN, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
> DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
> 3) prepare 2 AcctgTransEntry (a debit and a credit) for the inventoryItem.ownerPartyId:
> CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
> DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_XFER_OUT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
> 4) put the 4 entries in a list and call the createAcctgTransAndEntries service with the following fields: acctgTransTypeId=INVENTORY, acctgTransEntries=(the list with the 4 entries), inventoryItemId=parameters.inventoryItemId, glFiscalTypeId=ACTUAL
> The ECA will be:
> <eca service="updateInventoryItem" event="commit">
>     <condition field-name="ownerPartyId" operator="is-not-empty"/>
>     <condition-field field-name="ownerPartyId" operator="not-equals" to-field-name="oldOwnerPartyId"/>
>     <action service="createAcctgTransForInventoryItemOwnerChange" mode="sync"/>
> </eca>
> You can then test the service when you go into an Inventory Item in the facility, and change the ownerPartyId of an inventory item.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (OFBIZ-1459) Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Anil K Patel resolved OFBIZ-1459.
---------------------------------

    Resolution: Fixed

Thanks Rishi Solanki and others. Your patch with some modifications is in rev #600769

> Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1459
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1459
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>    Affects Versions: SVN trunk
>            Reporter: Jacopo Cappellato
>            Assignee: Anil K Patel
>         Attachments: jira_1459_automatic_GL_posting_service_ownerPartyIdchanged.patch
>
>
> The name of the service can be "createAcctgTransForInventoryItemOwnerChange" or similar.
> Input field: inventoryItemId, oldOwnerPartyId
> Output field: acctgTransId
> We can use the following template for this service: createAcctgTransForShipmentReceipt in GeneralLedgerServices.xml
> The service will do the following tasks:
> 1) compute the origAmount as: origAmount = inventoryItem.quantityOnHandTotal * inventoryItem.unitCost
> 2) prepare 2 AcctgTransEntry (a debit and a credit) for the oldOwnerPartyId:
> CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_XFER_IN, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
> DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
> 3) prepare 2 AcctgTransEntry (a debit and a credit) for the inventoryItem.ownerPartyId:
> CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
> DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_XFER_OUT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
> 4) put the 4 entries in a list and call the createAcctgTransAndEntries service with the following fields: acctgTransTypeId=INVENTORY, acctgTransEntries=(the list with the 4 entries), inventoryItemId=parameters.inventoryItemId, glFiscalTypeId=ACTUAL
> The ECA will be:
> <eca service="updateInventoryItem" event="commit">
>     <condition field-name="ownerPartyId" operator="is-not-empty"/>
>     <condition-field field-name="ownerPartyId" operator="not-equals" to-field-name="oldOwnerPartyId"/>
>     <action service="createAcctgTransForInventoryItemOwnerChange" mode="sync"/>
> </eca>
> You can then test the service when you go into an Inventory Item in the facility, and change the ownerPartyId of an inventory item.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1459) Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Anil K Patel closed OFBIZ-1459.
-------------------------------


> Implement an automatic GL posting service triggered when the ownerPartyId of an inventory item is changed
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1459
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1459
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>    Affects Versions: SVN trunk
>            Reporter: Jacopo Cappellato
>            Assignee: Anil K Patel
>         Attachments: jira_1459_automatic_GL_posting_service_ownerPartyIdchanged.patch
>
>
> The name of the service can be "createAcctgTransForInventoryItemOwnerChange" or similar.
> Input field: inventoryItemId, oldOwnerPartyId
> Output field: acctgTransId
> We can use the following template for this service: createAcctgTransForShipmentReceipt in GeneralLedgerServices.xml
> The service will do the following tasks:
> 1) compute the origAmount as: origAmount = inventoryItem.quantityOnHandTotal * inventoryItem.unitCost
> 2) prepare 2 AcctgTransEntry (a debit and a credit) for the oldOwnerPartyId:
> CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_XFER_IN, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
> DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=oldOwnerPartyId
> 3) prepare 2 AcctgTransEntry (a debit and a credit) for the inventoryItem.ownerPartyId:
> CREDIT: debitCreditFlag=C, glAcctgTransTypeId=INVENTORY_ACCOUNT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
> DEBIT: debitCreditFlag=D, glAcctgTransTypeId=INVENTORY_XFER_OUT, productId=InventoryItem.productId, origAmount=(the value computed in 1), origCurrencyUomId=InventoryItem.currencyUomId, organizationPartyId=inventoryItem.ownerPartyId
> 4) put the 4 entries in a list and call the createAcctgTransAndEntries service with the following fields: acctgTransTypeId=INVENTORY, acctgTransEntries=(the list with the 4 entries), inventoryItemId=parameters.inventoryItemId, glFiscalTypeId=ACTUAL
> The ECA will be:
> <eca service="updateInventoryItem" event="commit">
>     <condition field-name="ownerPartyId" operator="is-not-empty"/>
>     <condition-field field-name="ownerPartyId" operator="not-equals" to-field-name="oldOwnerPartyId"/>
>     <action service="createAcctgTransForInventoryItemOwnerChange" mode="sync"/>
> </eca>
> You can then test the service when you go into an Inventory Item in the facility, and change the ownerPartyId of an inventory item.

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