Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6330

The invoiceTaxTotal value is missing from createAcctgTransForPurchaseInvoice service

    Details

      Description

      Hi All,

      Scenario: The sum of debit and credit in InvoiceAcctgTransEntriesPdf of purchase invoice are not equal.

      Question: I'm not sure why the createAcctgTransForPurchaseInvoice service did not call the method to get invoiceTaxTotal.

      <call-class-method method-name="getInvoiceTaxTotal" class-name="org.ofbiz.accounting.invoice.InvoiceWorker" ret-field="invoiceTaxTotal">
          <field field="invoice" type="GenericValue"/>
      </call-class-method>
      

      And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code below:

      <calculate field="totalAmountFromInvoice" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
          <calcop operator="add">
              <calcop operator="get" field="totalAmountFromInvoice"/>
              <calcop operator="get" field="invoiceTaxTotal"/>
          </calcop>
      </calculate>
      

      That it should work like the createAcctgTransForSalesInvoice service of the sales invoice.

        Attachments

        1. pic02.png
          94 kB
          Moatasim Al Masri
        2. pic01.PNG
          53 kB
          Moatasim Al Masri
        3. OFBIZ-6330_TaxAccountingOnPurchasesAndReturns-alternative.patch
          3 kB
          Christian Geisert
        4. OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch
          2 kB
          Paul Foxworthy
        5. OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch
          2 kB
          Paul Foxworthy
        6. OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch
          8 kB
          Paul Foxworthy
        7. OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch
          10 kB
          Paul Foxworthy
        8. JORTAXAUTH.PNG
          59 kB
          Moatasim Al Masri
        9. GL.PNG
          63 kB
          Moatasim Al Masri
        10. GeneralLedgerServices.patch
          1 kB
          Kongrath Suankaewmanee

          Issue Links

            Activity

              People

              • Assignee:
                paul_foxworthy Paul Foxworthy
                Reporter:
                kongrath Kongrath Suankaewmanee
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: