Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0027581 | Retail Modules | Discounts and Promotions | public | 2014-09-11 11:00 | 2014-09-11 11:00 |
Reporter | aaroncalero | ||||
Assigned To | marvintm | ||||
Priority | low | Severity | trivial | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | pi | ||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0027581: When trying to apply a 'Buy X get Y as a gift' discount, a 'division by zero' raises | ||||
Description | When trying to apply a 'Buy X get Y as a gift' discount in a Sales Order created in the ERP (during the booking process), a 'division by zero' raises with a concrete discount configuration | ||||
Steps To Reproduce | Define a discount: Type: Buy X get Y as a Gift Apply Nex Discount/Promo: False (unchecked) Included Products: All excluding defined Distribute Between lines: True (checked) Leave the Products subtab empty. Create a sales order Add a new sales order line (the product added doesn't matter) Book the sales order. A "division by zero" error is raised and the process is not completed | ||||
Proposed Solution | The error is raised within the OBDISC_XY_GIFT procedure. The procedure tries to loop over the order lines with products defined in the [Products] subtab of the discount and calculates a total amount which is used later in a division. Since there is no product defined in the [Products] subtab, the total amount is zero, causing the error. A possible solution is to force the user to set "Included Products: Only those defined" when defining this discount type, as otherwise the discount definition is incorrect. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-09-11 11:00 | aaroncalero | New Issue | |||
2014-09-11 11:00 | aaroncalero | Assigned To | => marvintm | ||
2014-09-11 11:00 | aaroncalero | Triggers an Emergency Pack | => No |
There are no notes attached to this issue. |