ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Foxworthy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-6330) The invoiceTaxTotal value is missing from createAcctgTransForPurchaseInvoice service
Date Mon, 17 Jul 2017 05:56:00 GMT

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

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

Thanks [~jacques.le.roux],

I hesitate to create local methods in minilang because they don't create their own scope,
so you need to know and avoid all variable names used by your caller. 

I did create an inline simple method in my work on OFBIZ-4386. It was fiddly but I think necessary
to help understand what was happening. My conclusion was to only do so when there is a significant
gain in understanding.

The work on the Groovy DSL to replace minilang should help here.

Cheers

Paul

> 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
>              Labels: tax, vat
>         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.
> {code}
> <call-class-method method-name="getInvoiceTaxTotal" class-name="org.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="invoiceTaxTotal">
>     <field field="invoice" type="GenericValue"/>
> </call-class-method>
> {code}
> And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code below:
> {code}
> <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>
> {code}
> That it should work like the createAcctgTransForSalesInvoice service of the sales invoice.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message