2386156 Voiding completed order does not update order tax

https://sourceforge.net/tracker/?func=detail&aid=2386156&group_id=176962&atid=879332
This commit is contained in:
phib 2009-07-03 08:30:50 +00:00
parent 1d15480ec1
commit 26724373a5
1 changed files with 9 additions and 0 deletions

View File

@ -1971,6 +1971,15 @@ public class MOrder extends X_C_Order implements DocAction
deleteMatchPOCostDetail(line);
}
}
// update taxes
MOrderTax[] taxes = getTaxes(true);
for (MOrderTax tax : taxes )
{
if ( !(tax.calculateTaxFromLines() && tax.save()) )
return false;
}
addDescription(Msg.getMsg(getCtx(), "Voided"));
// Clear Reservations
if (!reserveStock(null, lines))