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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027581
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionstrivialalways2014-09-11 11:002014-09-11 11:00
ReporteraaroncaleroView Statuspublic 
Assigned Tomarvintm 
PrioritylowResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027581: When trying to apply a 'Buy X get Y as a gift' discount, a 'division by zero' raises

DescriptionWhen 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 ReproduceDefine 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 SolutionThe 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- 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
Powered by Mantis Bugtracker