[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=16369047#comment-16369047 ] Paul Foxworthy commented on OFBIZ-6330: --- Committed to: trunk in r1824740, release16.11 in r1824742, release17.12 in r1824743. > 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 >Priority: Major > Labels: tax, vat > Attachments: GL.PNG, GeneralLedgerServices.patch, JORTAXAUTH.PNG, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns-alternative.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch, pic01.PNG, > pic02.png > > > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[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=16365371#comment-16365371 ] Paul Foxworthy commented on OFBIZ-6330: --- I've made a minor change to the patch, adding a few comments. If there are no objections I'll commit this. > 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 >Priority: Major > Labels: tax, vat > Attachments: GL.PNG, GeneralLedgerServices.patch, JORTAXAUTH.PNG, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns-alternative.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch, pic01.PNG, > pic02.png > > > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[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=16111856#comment-16111856 ] Paul Foxworthy commented on OFBIZ-6330: --- Hi Moatasim, What is the status of the special party? If it's a second organization you administer, you need to create details for it in more places, not just in TaxAuthorityGlAccounts. You may need a ProductStore, and you should use OrganizationGlAccount to create a separate chart of GL accounts for that organization. See https://cwiki.apache.org/confluence/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide for a discussion of things to configure. If it's a customer, supplier or some other party you interact with and for which you want separate GL accounts, use PartyGlAccount. They key partyId is the one on the transaction: in which organization's accounts do we want the transaction to appear? The partyIds on transaction entries are more descriptive: to which party was money or other resources transferred? I think this is separate from OFBIZ-6330. Can we continue this discussion on the ofbiz-user mailing list? Cheers 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 > Labels: tax, vat > Attachments: GeneralLedgerServices.patch, GL.PNG, JORTAXAUTH.PNG, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns-alternative.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch, > OFBIZ-6330_TaxAccountingOnPurchasesAndReturns.patch, pic01.PNG, pic02.png > > > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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=16106448#comment-16106448 ] Paul Foxworthy commented on OFBIZ-6330: --- Hi [~moatasim], No, the patch in OFBIZ-4514 assumes the same GL account should be used for both tax paid in purchases, and tax collected in sales. There should be two separate accounts. This is exactly what OFBIZ-9492 should fix. 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, pic01.PNG, pic02.png > > > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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=16106447#comment-16106447 ] Paul Foxworthy commented on OFBIZ-6330: --- Hi again, The reason there's no GL Account for the tax-related entry or entries is OFBIZ-9492. I'm inclined to commit this issue as-is. The work to obtain the right GL account for taxes on purchases can continue in OFBIZ-9492. 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, pic01.PNG, pic02.png > > > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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=16106402#comment-16106402 ] Moatasim Al Masri commented on OFBIZ-6330: -- hi Paul this patch *OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch *solved the balance, but also *OFBIZ-4514_combined.patch* solved the GL posted in account entry. the issue the two patch cannot applied together !!! can we get one patch include these two patch together ? Moatasim Al-Masri > 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, pic01.PNG, pic02.png > > > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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=16106349#comment-16106349 ] Paul Foxworthy commented on OFBIZ-6330: --- Hi all, If you apply the OFBIZ-6330_TaxAccountingOnPurchasesAndReturns_inline.patch and run the above test script, the GL entries now balance - in other words the accounts payable amount is tax-inclusive. However the sales tax entry does not have a GL Account Type or Account Code. I will look into that now. 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, pic01.PNG, pic02.png > > > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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=16106339#comment-16106339 ] Paul Foxworthy commented on OFBIZ-6330: --- Hi all, I now have a script to demonstrate this on the demo site. _Add a supplier for service product SV-1000._ Catalog Edit Product With Product ID: SV-1000 https://demo-trunk.ofbiz.apache.org/catalog/control/EditProduct?productId=SV-1000 click on Suppliers In Add Product Supplier, enter Last Price of 100 and Supplier Product Id of SV-1. Click Create _Enter an order of the service product_ Order-Order Entry (https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderentry) Select Supplier of Acct Big Supplier, click Continue on Purchase Order screenlet Click Continue again Choose Product SV-1000 Click Finalize Order Click Continue multiple times, then Create Order Click Approve Order _Because this is a service, no shipment is necessary. Order status will be set to Completed, and an purchase invoice will be created. If you do this with the initial demo data, the invoice will have an ID of 1. Click on link from Order to Invoice Click on "Status To Ready" _In Transactions, the GL entries don't balance. The item and tax are there, but the accounts payable amount should be $101, not $100._ _The GL entries have been added to the suspense journal because they don't balance._ > 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, pic01.PNG, pic02.png > > > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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=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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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=16086030#comment-16086030 ] Jacques Le Roux commented on OFBIZ-6330: Hi Paul, A cursory review looks good to me (disclaimer, I just reviewed the code, did not check the functionallity nor tested). Though I see this pattern repeated a lot with existing code, maybe you could simplify by creating a local method to avoid repeating the calcop block? And yes thank you Kongrath for your initial contribution. Anyway thank you All for you help on this. > 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} > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > {code} > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > {code} > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > {code} > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[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=15861482#comment-15861482 ] Christian Geisert commented on OFBIZ-6330: -- I'm not sure I understand Nicolas ;) I'll attach a patch... > 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.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. > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[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=15860379#comment-15860379 ] Paul Foxworthy commented on OFBIZ-6330: --- Thanks Christian, Sorry, duh, I shoulda got the package name right. New patch attached. I'm leaning towards Nicolas's suggestion to avoid the call to getInvoiceTaxTotal and just add up the tax amounts. We want the accounting transaction to balance debits and credits. If we just add up the tax amounts, we are surer everything will balance, compared to trusting getInvoiceTaxTotal. And we avoid one method call, so the service would be fractionally faster. Jacopo and Christian, what do you think? People did discover the problem (OFBIZ-4514 and OFBIZ-5936), but a fix was never committed. If we had reasonable tests ("does the accounting transaction balance?"), we'd have highlighted how flawed these services were years ago. Anyone want to work on some tests now? > 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.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. > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[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=15859756#comment-15859756 ] Christian Geisert commented on OFBIZ-6330: -- I can confirm the problem, and the second patch does fix it (after adjusting the package names for trunk) > 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.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. > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[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=15859151#comment-15859151 ] Jacopo Cappellato commented on OFBIZ-6330: -- [~paul_foxworthy] I agree with the fix you have proposed: the same code that is already used by the createAcctgTransForSalesInvoice should be applied to the return and purchase services. And your patch does this. I would also apologize with [~kongrath] for having missed this valid contribution. Thank you Kongrath. > 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.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. > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[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=15859023#comment-15859023 ] Paul Foxworthy commented on OFBIZ-6330: --- [~jacopoc], you commented on a similar issue OFBIZ-4514. What do you think of this? > 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.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. > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[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=15856988#comment-15856988 ] Paul Foxworthy commented on OFBIZ-6330: --- Hi Nicolas, The code here generates individual accounting entries for the tax authorities. There is nothing adding the amounts up, so when the tax-inclusive price is calculated, the variable invoiceTaxTotal has never been used and will have a value of zero. One reason I didn't take that approach (and I guess Kongrath thought the same) is that createAcctgTransForSalesInvoice also just calls getInvoiceTaxTotal. I understand that adding up the tax amounts would avoid a call to one more method, at the expense of making the code a little more complicated. If you still think that's a good idea, I'll change all three methods createAcctgTransForCustomerReturnInvoice, createAcctgTransForSalesInvoice, createAcctgTransForPurchaseInvoice to work that way. What do you think? 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 > Attachments: GeneralLedgerServices.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. > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[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=15856723#comment-15856723 ] Nicolas Malin commented on OFBIZ-6330: -- Hello, I checked the code and found a nice detail to resolve all tax merged by taxAuthority. line 2033 on {code|lang=xml} {code} Did you check why this method doesn't works well ? Because I think it's more powerfull than just resolve all tax on one line. > 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.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. > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[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. > class-name="org.ofbiz.accounting.invoice.InvoiceWorker" > ret-field="invoiceTaxTotal"> > > > And the invoiceTaxTotal value needs to add to totalAmountFromInvoice via code > below: > decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}"> > > > > > > That it should work like the createAcctgTransForSalesInvoice service of the > sales invoice. -- This message was sent by Atlassian JIRA (v6.3.15#6346)