OFBiz
  1. OFBiz
  2. OFBIZ-1434 General Ledger
  3. OFBIZ-1472

Implement an automatic GL posting service triggered when inventory is issued for fixed asset maintenance

    Details

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

      Description

      Name of the service: "createAcctgTransForFixedAssetMaintIssuance" or similar
      Service definition:
      <service name="createAcctgTransForFixedAssetMaintIssuance" engine="simple" auth="true"
      location="org/ofbiz/accounting/ledger/GeneralLedgerServices.xml" invoke="createAcctgTransForFixedAssetMaintIssuance">
      <description>Create an accounting transaction for inventory that is issued for fixed asset maintenance (Type: INVENTORY D: INVENTORY_ACCOUNT, C: FIXED_ASSET_MAINT)</description>
      <attribute name="itemIssuanceId" 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 fixedAssetId
      2) do not set partyId and roleTypeId
      3) the Credit glAccountTypeId is FIXED_ASSET_MAINT (and not COGS_ACCOUNT)
      4) the acctgTransTypeId is INVENTORY (and not SALES_SHIPMENT)

      The seca will be:

      <eca service="createItemIssuance" event="commit">
      <condition field-name="fixedAssetId" operator="is-not-empty"/>
      <action service="createAcctgTransForFixedAssetMaintIssuance" mode="sync"/>
      </eca>

        Activity

        Hide
        Pranay Pandey added a comment -

        Here is the patch attached for this issue.
        I have one question :
        Is there any special purpose behind commenting the following service resource entry in ofbiz-componenet.xml
        <!-<service-resource type="eca" loader="main" location="servicedef/secas_ledger.xml"/>->

        Show
        Pranay Pandey added a comment - Here is the patch attached for this issue. I have one question : Is there any special purpose behind commenting the following service resource entry in ofbiz-componenet.xml <!- <service-resource type="eca" loader="main" location="servicedef/secas_ledger.xml"/> ->
        Hide
        Pranay Pandey added a comment -

        for running this service the commented code given earlier needs to be uncommented.

        Show
        Pranay Pandey added a comment - for running this service the commented code given earlier needs to be uncommented.
        Hide
        Jacopo Cappellato added a comment -

        Pranay,

        yes, that line needs to be uncommented to activate GL auto posting services. For now we are keeping them disabled because the family of auto posting service is still incomplete, but very soon (maybe at the end of the week) I guess we could consider to uncomment it (you are all doing a great job and you are very fast).

        Jacopo

        Show
        Jacopo Cappellato added a comment - Pranay, yes, that line needs to be uncommented to activate GL auto posting services. For now we are keeping them disabled because the family of auto posting service is still incomplete, but very soon (maybe at the end of the week) I guess we could consider to uncomment it (you are all doing a great job and you are very fast). Jacopo
        Hide
        Ashish Vijaywargiya added a comment -

        Pranay,

        I think you had swaped the entry for "glAccountTypeId".
        Please read the task details again and do the necessary changes in the next patch.


        Ashish

        Show
        Ashish Vijaywargiya added a comment - Pranay, I think you had swaped the entry for "glAccountTypeId". Please read the task details again and do the necessary changes in the next patch. – Ashish
        Hide
        Pranay Pandey added a comment -

        Ashish,

        The template service given in this task is "createAcctgTransForSalesShipmentIssuance", and in this the debit glAccountTypeId is COGS_ACCOUNT that's why i have swaped the entry for "glAccountTypeId", so i think that in the service "createAcctgTransForFixedAssetMaintIssuance" the debit glAccountTypeId will be FIXED_ASSET_MAINT.

        Pranay

        Show
        Pranay Pandey added a comment - Ashish, The template service given in this task is "createAcctgTransForSalesShipmentIssuance", and in this the debit glAccountTypeId is COGS_ACCOUNT that's why i have swaped the entry for "glAccountTypeId", so i think that in the service "createAcctgTransForFixedAssetMaintIssuance" the debit glAccountTypeId will be FIXED_ASSET_MAINT. – Pranay
        Hide
        Anil K Patel added a comment -

        Thanks to Pranay Panday and others for providing implementation. Patch rev # 601855

        Show
        Anil K Patel added a comment - Thanks to Pranay Panday and others for providing implementation. Patch rev # 601855

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development