src-db/database/model/triggers/C_ORDERLINE_TRG.xml
changeset 28093 e867bcaa1cc6
parent 28017 77f1cb4dd278
child 28625 6dae2ff0aafd
child 28855 7a915dae15ed
--- a/src-db/database/model/triggers/C_ORDERLINE_TRG.xml	Wed Dec 02 19:06:21 2015 +0000
+++ b/src-db/database/model/triggers/C_ORDERLINE_TRG.xml	Tue Dec 01 19:06:20 2015 +0100
@@ -227,7 +227,7 @@
       v_PriceActual := ROUND(v_NetActual / :new.qtyordered, v_price_prec);     
     ELSE
       -- Regular taxes
-      v_PriceActual := C_GET_NET_PRICE_FROM_GROSS(:new.c_tax_id, :new.line_gross_amount, :new.taxbaseamt, v_price_prec, :NEW.qtyordered);    
+      v_PriceActual := C_GET_NET_PRICE_FROM_GROSS(:new.c_tax_id, :new.gross_unit_price * :new.qtyordered, :new.taxbaseamt, v_price_prec, :new.qtyordered);
       v_NetActual := ROUND(:new.QtyOrdered * v_PriceActual, v_Prec);
     END IF;