Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0027581 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [Retail Modules] Discounts and Promotions | trivial | always | 2014-09-11 11:00 | 2014-09-11 11:00 | |||||||
Reporter | aaroncalero | View Status | public | |||||||||
Assigned To | marvintm | |||||||||||
Priority | low | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | pi | SCM revision | ||||||||||
Review Assigned To | ||||||||||||
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. | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
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 |
Copyright © 2000 - 2009 MantisBT Group |