Voiding a completed order having a tax amount, voids the order lines (line amount and quantity 0 - this is fine) but not the tax amount which stays the same.
MOrderLine.java
In method updateHeaderTax
// Recalculate Tax for this Tax
if (!getParent().isProcessed())
if (!updateOrderTax(false))
return false;
When getParent().isProcessed() is called it is true since the order is completed and processed so updateOrderTax is not invoked
Logged In: YES
user_id=1179440
Originator: NO
I'm not sure this is a bug. When you void a completed document, it will create an exact reversing document to clear out the balance. The Order tax supplies the information for accounting engine to post your tax journal.
Armen
Bug Triage 2009-08-13. Triage with current adempiere trunk and PostgreSQL.
Testcase in Gardenworld:
a) Create new Sales Order for Joe Block.
b) Orderline oak tree with CT Sales (Tax)
c) complete Order.
Result in Database (o=c_order, ot=c_ordertax):
o.documentno; o.c_order_id; o.grandtotal; o.totallines; o.grandtotal - o.totallines; ot.taxbaseamt, ot.taxamt
"50003";1000009;65.46;61.75;3.71;61.75;3.71
d) Void Sales Order
Result in Database (o=c_order, ot=c_ordertax):
o.documentno; o.c_order_id; o.grandtotal; o.totallines; o.grandtotal - o.totallines; ot.taxbaseamt, ot.taxamt
"50003";1000009;0.00;0.00;0.00;0.00;0.00
--> Result is correkt. Bug cannot be reproduced. Setting Bug to Pending for SF Cleanup.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).