src-db/database/model/triggers/C_INVOICELINE_BEFORE_TRG.xml
changeset 28093 e867bcaa1cc6
parent 27202 dd85e72e7847
child 29762 9b517e1b61bc
--- a/src-db/database/model/triggers/C_INVOICELINE_BEFORE_TRG.xml	Wed Dec 02 19:06:21 2015 +0000
+++ b/src-db/database/model/triggers/C_INVOICELINE_BEFORE_TRG.xml	Tue Dec 01 19:06:20 2015 +0100
@@ -123,7 +123,7 @@
         v_PriceActual := v_NetActual / :new.qtyinvoiced;     
       ELSE
         -- Regular taxes
-        v_PriceActual := C_GET_NET_PRICE_FROM_GROSS(:new.c_tax_id, :new.line_gross_amount, :new.line_gross_amount, v_price_prec, :NEW.qtyinvoiced);    
+        v_PriceActual := C_GET_NET_PRICE_FROM_GROSS(:new.c_tax_id, :new.gross_unit_price * :new.qtyinvoiced, :new.taxbaseamt, v_price_prec, :new.qtyinvoiced);
         v_NetActual := ROUND(:new.Qtyinvoiced * v_PriceActual, v_std_Prec);
       END IF;