Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0035475 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [Retail Modules] Web POS | minor | have not tried | 2017-03-10 09:15 | 2017-03-10 09:16 | |||||||
Reporter | aferraz | View Status | public | |||||||||
Assigned To | Retail | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Linux 64 bit | Database | PostgreSQL | Java version | 1.6.0_18 | |||||||
OS Version | Professional Appliance | Database version | 8.3.9 | Ant version | 1.7.1 | |||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0035475: Do not calculate Net Price and Net Amount outside triggers when creating new Order/Invoice with Price Including Taxes | |||||||||||
Description | When 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 Reproduce | Doing 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); | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||
|
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 | 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 |