Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0045405 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Discounts and Promotions | major | always | 2020-11-10 14:33 | 2020-12-09 06:37 | |||
Reporter | gsuarez | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 64 bit | Database | PostgreSQL | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | RR19Q1 | SCM revision | ||||||
Review Assigned To | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 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 45405_19Q1_discountcouponotf.diff [^] (3,364 bytes) 2020-12-09 06:37 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0124580) hgbot (developer) 2020-11-24 10:51 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/merge_requests/2 [^] |
(0124606) hgbot (developer) 2020-11-25 07:52 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf [^] Changeset: e47123efa5527b3208acd00e8210ba193f857533 Author: Ranjith S R <ranjith@qualiantech.com> Date: 2020-11-24T15:15:20+05:30 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 --- M web/org.openbravo.retail.discounts.coupons.otf/app/model/business-logic/discounts-engine/engine/rules/variable-amount-coupons-discount.js --- |
(0124607) hgbot (developer) 2020-11-25 07:52 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf/-/merge_requests/2 [^] |
Issue History | |||
Date Modified | Username | Field | Change |
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 | Resolution time | => 1606777200 |
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 | |
2020-12-09 06:37 | ranjith_qualiantech_com | File Added: 45405_19Q1_discountcouponotf.diff | |
2021-06-28 16:28 | migueldejuana | Relationship added | related to 0047265 |
2021-07-08 14:34 | migueldejuana | Relationship added | related to 0047365 |
Copyright © 2000 - 2009 MantisBT Group |