You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Paul Foxworthy (JIRA)" <ji...@apache.org> on 2017/02/07 01:25:42 UTC

[jira] [Commented] (OFBIZ-6330) The invoiceTaxTotal value is missing from createAcctgTransForPurchaseInvoice service

    [ https://issues.apache.org/jira/browse/OFBIZ-6330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855110#comment-15855110 ] 

Paul Foxworthy commented on OFBIZ-6330:
---------------------------------------

Kongrath,

I found your report after I encountered exactly this issue. Thank you for this. You are absolutely right. This is a serious problem and it's disappointing it has been in OFBiz so long. For my own part, I'm sorry I missed this issue when you first raised it.

I think there are several factors that have contributed to it. Many people are using OFBiz for e-commerce and ERP but not for accounting, so incorrect figures in the General Ledger accounts don't affect them. In addition, in the US there are sales taxes that apply to (you guessed it) sales, but not to purchases, so there would be no tax to add on to the base purchase price for the total owed. In Europe, Australia, New Zealand and other places with VAT or GST, tax applies to purchases too.

There is a similar issue with the createAcctgTransForCustomerReturnInvoice method also. I will revise your patch to add that.

If there are no comments in the next few days, I'll commit the change.

Thanks again

Paul Foxworthy


> The invoiceTaxTotal value is missing from createAcctgTransForPurchaseInvoice service
> ------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-6330
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6330
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Trunk
>            Reporter: Kongrath Suankaewmanee
>            Assignee: Paul Foxworthy
>         Attachments: GeneralLedgerServices.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)