Openbravo Issue Tracking System - Retail Modules | |||||||||||||||||||||
| View Issue Details | |||||||||||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||||
| 0035475 | Retail Modules | Web POS | public | 2017-03-10 09:15 | 2017-03-10 09:16 | ||||||||||||||||
| Reporter | aferraz | ||||||||||||||||||||
| Assigned To | Retail | ||||||||||||||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||||||||||
| Status | new | Resolution | open | ||||||||||||||||||
| Platform | OS | 30 | OS Version | Professional Appliance | |||||||||||||||||
| Product Version | |||||||||||||||||||||
| Target Version | Fixed in Version | ||||||||||||||||||||
| Merge Request Status | |||||||||||||||||||||
| Review Assigned To | |||||||||||||||||||||
| OBNetwork customer | No | ||||||||||||||||||||
| Support ticket | |||||||||||||||||||||
| 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); | ||||||||||||||||||||
| Proposed Solution | |||||||||||||||||||||
| Additional Information | |||||||||||||||||||||
| Tags | No tags attached. | ||||||||||||||||||||
| Relationships |
| ||||||||||||||||||||
| Attached Files | |||||||||||||||||||||
| 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 | ||||||||||||||||||
| There are no notes attached to this issue. |