handling IsTaxIncluded

63 views
Skip to first unread message

Martin Schönbeck

unread,
Apr 3, 2020, 5:44:19 PM4/3/20
to iDempiere
Hi,

my impression is that nobody is using IsTaxIncluded. Or I'm missing the point totally.

I started analysing it when I wanted to flag a c_charge with IsTaxIncluded because some position are mostly given with this value. But AFAICS it is not used at all but could perhaps be added in CalloutInvoice.charge.

Then I tested setting Pricelists to IsTaxIncluded. For purchase order and purchase invoices. Here it works, but in the invoice line the tax is added to LineTotalAmt while the GrandTotal is ok.

When trying a sales order it seems to work but the tax is calculated as if it had to be added to the value (it means it is calcuted as price * tax instead of price / (1+tax) * tax). Creating a sales invoice looks good.

Did I do anything wrong? Or is it really not implemented completely? If the later I would intend to implement it.

Ah, one question in this context: I couldn't find the place where IsTaxIncluded is set in the context of the window.

Regards,
Martin










Marco Longo

unread,
Apr 3, 2020, 6:19:45 PM4/3/20
to iDempiere
Hi Martin,
we use tax included for product (item and service). "Charge" we normally use only for finance/accounting things like doing a credit memo or an invoice without an order.. regarding normally goods.and services outside the core of the business (like a car , or other things).

Please create an example on test.idempiere.org so we could help you to check if everything is working also for charge.

Marco Longo
iDempiere Consulting

Martin Schönbeck

unread,
Apr 4, 2020, 4:27:35 PM4/4/20
to iDempiere
Hi Marco,


Am Samstag, 4. April 2020 00:19:45 UTC+2 schrieb Marco Longo:
Hi Martin,
we use tax included for product (item and service). "Charge" we normally use only for finance/accounting things like doing a credit memo or an invoice without an order.. regarding normally goods.and services outside the core of the business (like a car , or other things).

Please create an example on test.idempiere.org so we could help you to check if everything is working also for charge.


Ok, I created a sample in Gardenworld (PO invoice 10000024). It was a bit difficult first to find out, that the spaces in the login name are superflous now and second because someone meant to change my entries will I was creating them. I have created a charge with IsTaxIncluded activated (I first had to remove the write protection) and used a new Tax and TaxCategory called Tax Test. The invoice adds the tax as expected (or better feared).

Regards,
Martin

Carlos Antonio Ruiz Gomez

unread,
Apr 4, 2020, 5:09:34 PM4/4/20
to idem...@googlegroups.com
Hi Martin,

This called my attention:

> I have created a charge with IsTaxIncluded activated (I first had to remove the write protection)

I have not checked, but probably that's read-only because it has not been developed.  That was common configuration from JJ for things that were not working.

Regards,

Carlos Ruiz




El 4/04/20 a las 22:27, Martin Schönbeck escribió:

Martin Schönbeck

unread,
Apr 5, 2020, 4:51:49 AM4/5/20
to iDempiere
Hi Carlos,


Am Samstag, 4. April 2020 23:09:34 UTC+2 schrieb Carlos Antonio Ruiz Gomez:
Hi Martin,

This called my attention:

> I have created a charge with IsTaxIncluded activated (I first had to remove the write protection)

I have not checked, but probably that's read-only because it has not been developed.  That was common configuration from JJ for things that were not working.

That was my impression, too, when studying the code. So it could be worth to implement it. And while I'm at it correct the calculation in sales orders and purchase invoice lines.

Regards,
Martin
 

Carlos Antonio Ruiz Gomez

unread,
Apr 5, 2020, 6:37:29 AM4/5/20
to idem...@googlegroups.com
Hi Martin, I made some local tests and I see tax included working properly - that's a common case in restaurants and retail for example - except USA I guess  :-)

I think the only action required is to hide or inactivate the "Price includes Tax" on charge, because that's related to the price list, not to the charge.

If you have a failing case in iDempiere vanilla (not modifying dictionary), please describe it.

Regards,

Carlos Ruiz



El 5/04/20 a las 10:51, Martin Schönbeck escribió:

Martin Schönbeck

unread,
Apr 5, 2020, 8:25:10 AM4/5/20
to iDempiere
Hi Carlos


Am Sonntag, 5. April 2020 12:37:29 UTC+2 schrieb Carlos Antonio Ruiz Gomez:
Hi Martin, I made some local tests and I see tax included working properly - that's a common case in restaurants and retail for example - except USA I guess  :-)

I think the only action required is to hide or inactivate the "Price includes Tax" on charge, because that's related to the price list, not to the charge.

I guessed there was a solution. ;-) I prepared an empty pricelist with tax included and using charges worked. That's even better because I can select it on a by invoice base.
 
If you have a failing case in iDempiere vanilla (not modifying dictionary), please describe it.

The wrong calculation on sales orders seems to be a problem of caching (I had changed already used pricelist to include tax for test)

But in purchase invoices the line amount is really wrong because "mTab.setValue("LineTotalAmt", LineNetAmt.add(TaxAmt));" is executed in both cases. That's only informational so normally no problem arises.

Regards,
Martin
 

Carlos Antonio Ruiz Gomez

unread,
Apr 5, 2020, 8:55:37 AM4/5/20
to idem...@googlegroups.com
Martin, I did same test with Purchase Order as I did with Sales and it behaved the same.

Maybe if you describe better your failing case.

Regards,

Carlos Ruiz



El 5/04/20 a las 14:25, Martin Schönbeck escribió:
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/6cd717fd-7720-43a3-b9e9-bc44f48dc47e%40googlegroups.com.


Carlos Antonio Ruiz Gómez

unread,
Apr 5, 2020, 12:47:47 PM4/5/20
to iDempiere

Martin Schönbeck

unread,
Apr 5, 2020, 3:53:55 PM4/5/20
to iDempiere
Hi Carlos,


Am Sonntag, 5. April 2020 14:55:37 UTC+2 schrieb Carlos Antonio Ruiz Gómez:
Martin, I did same test with Purchase Order as I did with Sales and it behaved the same.

Maybe if you describe better your failing case.

I created an invoice (vendor) in test.idempiere.org. Number 10000025. Take a look at the position and there 'Line Total' (I was wrong with line amount). It's line amount + tax but should be equal to line amount.

It's normally no problem since the grand total and other values are ok.

Regards,
Martin

Carlos Antonio Ruiz Gomez

unread,
Apr 5, 2020, 4:20:44 PM4/5/20
to idem...@googlegroups.com
Ah yes, some of those numbers are wrong, they don't affect the totals, and in general the calculations are fine, but for reporting purposes the numbers in those fields are useless.

I looked in JIRA and found that I reported some wrong cases in IDEMPIERE-3195 some time ago.

Regards,

Carlos Ruiz



El 5/04/20 a las 21:53, Martin Schönbeck escribió:
Reply all
Reply to author
Forward
0 new messages