|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[Retail Modules] Discounts and Promotions||major||always||2020-11-10 14:33||2020-11-25 07:52|
|Priority||high||Resolution||fixed||Fixed in Version|
|Status||closed||Fix in branch||Fixed in SCM revision|
|OS||Linux 64 bit||Database||PostgreSQL||Java version|
|OS Version||Database version||Ant version|
|Product Version||RR19Q1||SCM revision|
|Review Assigned To|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
0045405: Error applying coupon. The last line is negative.
|Description||When applying a coupon for 71.49, the last line is negative.|
This coupon was generated by OTF. The rule is 50% off the next purchase, that is, a sale was made for 142.98.
I attach a ZIP with two images, one of POS and the other of the backoffice.
|Steps To Reproduce||1. Generate a new Variable Amount Coupons promotion. Check Is OTF Coupon and Uses coupon codes. In the field Included Product Categories, select the option "Only those defined". Add Lighting & Electronics product category in Product Category tab.|
2. Generate a new OTF rule with 50% of discount and associate the discount created in step 1. I used OTF_10_PER rule, but I change 10% to 50%.
3. Generate a sales for 142.98 for products that being to Ski category.
4. Check that a coupon is generated in the promotion created in step 1. The amount of the coupon will be 71.49.
5. Change the price of 8 products to:
a) WVG/L0001 to 19.99.
b) WVG/L0002 to 10.
c) WVG/L0003 to 18.99.
d) WVG/L0004 to 12.50.
e) WVG/L0005 to 2.99.
f) WVG/L0006 to 2.99.
g) WVG/L0007 to 1.
h) WVG/L0008 to 0.10.
The list price will be The White Valley Group Purchase Price List Version.
6. Refresh POS and check that the prices has been changed.
7. In the new ticket, add the products in order. First WVG/L0001, second WVG/L0002 and so.
8. For the product WVG/L0006 check that quantity are 2.
9. Apply the coupon.
10. Check that the line with price 0.10 has a discount of 0.11.
|Tags||No tags attached.|
|Attached Files||Images.zip [^] (300,904 bytes) 2020-11-10 14:33|
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/merge_requests/2 [^]
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf [^]
Author: Ranjith S R <email@example.com>
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/commit/e47123efa5527b3208acd00e8210ba193f857533 [^]
Fixed ISSUE-45405: Updated discount calculation by sorting lines
To avoid decimal problem, difference of accumulated discount and total discount will be applied for last line.
Sometimes discount amount will be higher than last line price which leads to negative line. To avoid this, Line should be sorted ascending by price, so last line will have higher amount, discount will be applied withput any problem
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/merge_requests/2 [^]
|2020-11-10 14:33||gsuarez||New Issue|
|2020-11-10 14:33||gsuarez||Assigned To||=> Retail|
|2020-11-10 14:33||gsuarez||File Added: Images.zip|
|2020-11-10 14:33||gsuarez||Triggers an Emergency Pack||=> No|
|2020-11-24 03:26||ranjith_qualiantech_com||Assigned To||Retail => ranjith_qualiantech_com|
|2020-11-24 03:26||ranjith_qualiantech_com||Status||new => scheduled|
|2020-11-24 10:51||hgbot||Note Added: 0124580|
|2020-11-25 07:52||hgbot||Resolution||open => fixed|
|2020-11-25 07:52||hgbot||Status||scheduled => closed|
|2020-11-25 07:52||hgbot||Note Added: 0124606|
|2020-11-25 07:52||hgbot||Note Added: 0124607|
|Copyright © 2000 - 2009 MantisBT Group|