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

Paul Foxworthy edited comment on OFBIZ-6330 at 7/12/17 10:45 PM:
-----------------------------------------------------------------

Hi all,

I agree with Nicholas's suggestion to use the tax amounts the service is 
already gathering, and not calling getInvoiceTaxTotal. Christian's patch did 
that for createAcctgTransForPurchaseInvoice.

This OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline patch adds that for 
createAcctgTransForCustomerReturnInvoice and 
createAcctgTransForPurchaseInvoice. I have modified 
createAcctgTransForSalesInvoice to work in the same way.

I have also added a glAccountTypeId of TAX_ACCOUNT for returns and purchases.

It should be possible to set  the GL account for tax authorities on purchases, 
but at present OFBiz only does so for sales. I will create a separate Jira for 
that issue.

Please review!


was (Author: paul_foxworthy):
Hi all,

I agree with Nicholas's suggestion to use the tax amounts the service is 
already gathering, and not calling getInvoiceTaxTotal.

This patch adds that for createAcctgTransForCustomerReturnInvoice and 
createAcctgTransForPurchaseInvoice. I have modified 
createAcctgTransForSalesInvoice to work in the same way.

I have also added a glAccountTypeId of TAX_ACCOUNT for returns and purchases.

It should be possible to set  the GL account for tax authorities on purchases, 
but at present OFBiz only does so for sales. I will create a separate Jira for 
that issue.


> 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, 
> OFBIZ-6330_TaxAccountingOnPurchasesAndReturns-alternative.patch, 
> OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch, 
> OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch, 
> OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.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.4.14#64029)

Reply via email to