src-db/database/model/triggers/C_INVOICELINE_BEFORE_TRG.xml
changeset 28093 e867bcaa1cc6
parent 27202 dd85e72e7847
child 29762 9b517e1b61bc
equal deleted inserted replaced
28092:dd7a95752920 28093:e867bcaa1cc6
   121           v_NetActual := v_NetActual + v_CalcLine; -- Acum the net
   121           v_NetActual := v_NetActual + v_CalcLine; -- Acum the net
   122         END LOOP;    
   122         END LOOP;    
   123         v_PriceActual := v_NetActual / :new.qtyinvoiced;     
   123         v_PriceActual := v_NetActual / :new.qtyinvoiced;     
   124       ELSE
   124       ELSE
   125         -- Regular taxes
   125         -- Regular taxes
   126         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);    
   126         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);
   127         v_NetActual := ROUND(:new.Qtyinvoiced * v_PriceActual, v_std_Prec);
   127         v_NetActual := ROUND(:new.Qtyinvoiced * v_PriceActual, v_std_Prec);
   128       END IF;      
   128       END IF;      
   129       
   129       
   130       :NEW.pricestd := v_priceactual;
   130       :NEW.pricestd := v_priceactual;
   131       :NEW.pricelist := v_priceactual;
   131       :NEW.pricelist := v_priceactual;