Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-1434 General Ledger
  3. OFBIZ-1473

Implement an automatic GL posting service triggered when inventory is issued to a work effort

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: accounting
    • Labels:
      None

      Description

      Name of the service: "createAcctgTransForWorkEffortIssuance" or similar
      Service definition:
      <service name="createAcctgTransForWorkEffortIssuance" engine="simple" auth="true"
      location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createAcctgTransForWorkEffortIssuance">
      <description>Create an accounting transaction for inventory that is issued to a work effort (Type: INVENTORY D: RAWMAT_INVENTORY, C: WIP_INVENTORY)</description>
      <attribute name="workEffortId" type="String" mode="IN" optional="false"/>
      <attribute name="inventoryItemId" type="String" mode="IN" optional="false"/>
      <attribute name="acctgTransId" type="String" mode="OUT" optional="true"/>
      </service>

      Use as a template the service "createAcctgTransForSalesShipmentIssuance". The new service will be very similar, with the following differences:
      1) replace shipmentId with workEffortId
      2) do not set partyId and roleTypeId
      3) the Credit glAccountTypeId is WIP_INVENTORY (and not COGS_ACCOUNT)
      4) the Debit glAccountTypeId is RAWMAT_INVENTORY
      5) the acctgTransTypeId is INVENTORY (and not SALES_SHIPMENT)

      The seca will be:

      <eca service="assignInventoryToWorkEffort" event="commit">
      <action service="createAcctgTransForWorkEffortIssuance" mode="sync"/>
      </eca>

      1. GlPostingService.patch
        7 kB
        SACHIN CHOURASIYA
      2. GL posting service.patch
        5 kB
        SACHIN CHOURASIYA

        Issue Links

          Activity

          Hide
          jacopoc Jacopo Cappellato added a comment -

          Another difference from the createAcctgTransForSalesShipmentIssuance service is that here, instead of getting an ItemIssuance we will retrieve the WorkEffortInventoryAssign record and get the InventoryItem and quantity from there.

          Show
          jacopoc Jacopo Cappellato added a comment - Another difference from the createAcctgTransForSalesShipmentIssuance service is that here, instead of getting an ItemIssuance we will retrieve the WorkEffortInventoryAssign record and get the InventoryItem and quantity from there.
          Hide
          mscit.sachin SACHIN CHOURASIYA added a comment -

          I am submitting here my modified work for JiraIssues 1473 and 1474 as per the comments recieved in CR-362.

          Show
          mscit.sachin SACHIN CHOURASIYA added a comment - I am submitting here my modified work for JiraIssues 1473 and 1474 as per the comments recieved in CR-362.
          Hide
          anilpatel Anil K Patel added a comment -

          Sachin,
          The patch you have provided seems to be incomplete, its missing entries in seca and services file. Can you please provide more complete and update patch.

          Show
          anilpatel Anil K Patel added a comment - Sachin, The patch you have provided seems to be incomplete, its missing entries in seca and services file. Can you please provide more complete and update patch.
          Hide
          mscit.sachin SACHIN CHOURASIYA added a comment -

          Please refer this patch for the modified work done for the JiraIssues @ 1473 and 1474

          Show
          mscit.sachin SACHIN CHOURASIYA added a comment - Please refer this patch for the modified work done for the JiraIssues @ 1473 and 1474
          Hide
          anilpatel Anil K Patel added a comment -

          Thanks Sachin Chourasia and others for patch, its in rev#600844

          Show
          anilpatel Anil K Patel added a comment - Thanks Sachin Chourasia and others for patch, its in rev#600844

            People

            • Assignee:
              anilpatel Anil K Patel
              Reporter:
              jacopoc Jacopo Cappellato
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development