Fixes issue 21523. Adds a conditinal sentence for avoiding
authorDavid Miguelez <david.miguelez@openbravo.com>
Thu, 06 Sep 2012 12:04:26 +0200
changeset 17862 2d8b2a794d9d
parent 17861 b86c5fec47e2
child 17863 b018aeca396f
Fixes issue 21523. Adds a conditinal sentence for avoiding
code when is not price including taxes.
src-db/database/model/functions/C_INVOICE_POST.xml
--- a/src-db/database/model/functions/C_INVOICE_POST.xml	Tue Sep 04 17:35:13 2012 +0200
+++ b/src-db/database/model/functions/C_INVOICE_POST.xml	Thu Sep 06 12:04:26 2012 +0200
@@ -1329,7 +1329,9 @@
           GrandTotal=v_GrandTotal,
           withholdingamount = withholdamount
       WHERE C_Invoice_ID=v_Record_ID;
-      C_INVOICETAX_ROUNDING(v_Record_ID, v_GrandTotal, v_TotalLines);
+      IF (v_istaxincluded = 'Y') THEN
+        C_INVOICETAX_ROUNDING(v_Record_ID, v_GrandTotal, v_TotalLines);
+      END IF;
       DBMS_OUTPUT.PUT_LINE('withholdingamount=' || withholdamount);
       DBMS_OUTPUT.PUT_LINE('GrandTotal=' || v_GrandTotal) ;
     END; -- Calculate Tax and Totals