Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035475
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2017-03-10 09:152017-03-10 09:16
ReporteraferrazView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Merge Request Status
Review Assigned To
OBNetwork customerNo
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035475: Do not calculate Net Price and Net Amount outside triggers when creating new Order/Invoice with Price Including Taxes

DescriptionWhen creating new C_Order or C_Invoice records using Price Including Taxes from any PL/SQL or Java code, PriceStd, PriceList, PriceLimit, PriceActual, TaxBaseAmt and LineNetAmt should not be calculated for lines, as they will be calculated in C_OrderLine_Trg or C_InvoiceLine_Before_Trg triggers.

In case we need to calculate them, instead of using C_Get_Net_Price_From_Gross function to calculate net price from gross price, we need to use C_Get_Net_Amount_From_Gross function to calculate net amount from gross amount and then net price from net amount.
Steps To ReproduceDoing a grep in Retail modules we see several references to C_GET_NET_PRICE_FROM_GROSS function:

openbravo@por0965:~/workspace/pi_retail/openbravo/modules$ grep -ri "C_GET_NET_PRICE_FROM_GROSS" .
./org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js: // the database function c_get_net_price_from_gross
./org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js: //We follow the same formula of function c_get_net_price_from_gross to compute the discounted net
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_DISCOUNT.xml: v_newNetPrice := c_get_net_price_from_gross(v_tax, v_newGrossAmt, v_newGrossAmt, p_priceprecision,v_qty);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_XY_SAME_PRODUCT.xml: v_newNetLine := c_get_net_price_from_gross(v_tax, v_newGrossAmt, v_newGrossAmt, p_priceprecision, v_qty);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_XY_GIFT.xml: v_newNetPrice := c_get_net_price_from_gross(v_tax, v_newGrossAmt, v_newGrossAmt, p_priceprecision, v_qty);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_XY_GIFT.xml: v_newNetAmt := c_get_net_price_from_gross(v_tax, v_newGrossAmt,v_newGrossAmt, p_priceprecision, 1);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_XY_GIFT.xml: v_newNetPrice := c_get_net_price_from_gross(v_tax, v_newGrossAmt, v_newGrossAmt, p_priceprecision, v_qty);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_PACK.xml: v_newNetPrice := c_get_net_price_from_gross(v_tax, v_newGrossAmt, v_newGrossAmt, p_priceprecision, v_qty);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_PACK.xml: v_newNetAmt := c_get_net_price_from_gross(v_tax, v_newGrossAmt,v_newGrossAmt, p_priceprecision, 1);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_XY_DIFFERENT_PRODUCT.xml: v_newNetPrice := c_get_net_price_from_gross(v_tax, v_newGrossAmt, v_newGrossAmt, p_priceprecision, v_qty);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_XY_DIFFERENT_PRODUCT.xml: v_newNetPrice := c_get_net_price_from_gross(v_tax, v_newGrossAmt, v_newGrossAmt, p_priceprecision, v_qty);
./org.openbravo.retail.discounts/src-db/database/model/functions/OBDISC_XY_DIFFERENT_PRODUCT.xml: v_newNetPrice := c_get_net_price_from_gross(v_tax, v_newGrossAmt, v_newGrossAmt, p_priceprecision, v_qty);
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035428 closedaferraz Openbravo ERP Do not calculate Net Price and Net Amount outside triggers when creating new Order/Invoice with Price Including Taxes 
related to design defect 0032265 closedaferraz Openbravo ERP [SER QA 1434] Taxes at document level are not properly calculated in some cases 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-03-10 09:15 aferraz New Issue
2017-03-10 09:15 aferraz Assigned To => Retail
2017-03-10 09:15 aferraz OBNetwork customer => No
2017-03-10 09:15 aferraz Triggers an Emergency Pack => No
2017-03-10 09:16 aferraz Relationship added related to 0035428
2017-03-10 09:16 aferraz Relationship added related to 0032265


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker