Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043880Retail ModulesDiscounts by Totalpublic2020-04-27 13:412020-05-25 09:33
Leyre 
ranjith_qualiantech_com 
urgentmajoralways
closedunable to reproduce 
5
 
RR19Q4 
marvintm
No
0043880: Using the old discount engine, the "by total" discount is not calculated correctly on the receipt lines
Using the old discount engine, the "by total" discount is not calculated correctly on the receipt lines
Using the 20Q1 version, add the "Discount rules for Retail by total" module in the correct version:

** In our local instance:
Web POS 1.2.6703
Discounts & Promotions Rules for Retail 1.3.6701
Discount rules for Retail by total 1.0.1300

Apply the patches related to the issues 43322 and 43521 (or confirm that the patches are applied)

** Backend:
1. Configure the preference "Web POS Use advanced discounts engine" = N
2. Create a new "User Defined Amount" discount
3. Create a new "Variable Discount per Total Amount" discount

** Web POS:
1. Add two products non grouped with price = 9.90
2. Add another product with price = 2.90
3. Add the first discount "User Defined Amount" = 1
4. Try to add the second discount "Variable Discount per Total Amount" = 10.

Verify that the total discount/line is not applied correctly or proportionally on the products.

--> ANOTHER EXAMPLE DETECTED:

** Web POS:
1. Add one product = 699.9
2. Add another product 399.9
3. Add the first discount "User Defined Amount" = -20 only to the first product.
4. Add the second discount "Variable Discount per Total Amount" = -100

The sum of the "by total" discount, of all the lines is not 100
No tags attached.
related to defect 0043521 closed rqueralta The by total discount is not applied correctly to the receipt lines 
related to defect 0043322 closed rqueralta The "By Total" discount does not apply correctly the discounted qty. on the receipt lines 
patch 43880 source bytotal.patch (2,856) 2020-05-13 10:23
https://issues.openbravo.com/file_download.php?file_id=14469&type=bug
patch 43880 test.patch (17,389) 2020-05-13 10:23
https://issues.openbravo.com/file_download.php?file_id=14470&type=bug
patch 43880_source_bytotal_v2.patch (5,564) 2020-05-18 19:04
https://issues.openbravo.com/file_download.php?file_id=14496&type=bug
patch 43880_source_test_v2.patch (19,770) 2020-05-18 19:05
https://issues.openbravo.com/file_download.php?file_id=14497&type=bug
patch 43880_source_bytotal_v3.patch (7,327) 2020-05-25 09:32
https://issues.openbravo.com/file_download.php?file_id=14523&type=bug
patch 43880_source_test_v3.patch (25,355) 2020-05-25 09:33
https://issues.openbravo.com/file_download.php?file_id=14524&type=bug
Issue History
2020-04-27 13:41LeyreNew Issue
2020-04-27 13:41LeyreAssigned To => Retail
2020-04-27 13:41LeyreResolution time => 1589752800
2020-04-27 13:41LeyreTriggers an Emergency Pack => No
2020-04-27 13:42LeyreRelationship addedrelated to 0043521
2020-04-27 13:43LeyreRelationship addedrelated to 0043322
2020-04-30 10:23LeyreSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20916#r20916
2020-04-30 10:23LeyreSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20917#r20917
2020-05-05 11:44ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-05-06 04:57ranjith_qualiantech_comStatusnew => scheduled
2020-05-06 12:43ranjith_qualiantech_comFile Added: 43880 source bytotal.patch
2020-05-06 12:47ranjith_qualiantech_comNote Added: 0119623
2020-05-11 15:20ranjith_qualiantech_comNote Deleted: 0119623
2020-05-12 09:02ranjith_qualiantech_comFile Deleted: 43880 source bytotal.patch
2020-05-13 10:23ranjith_qualiantech_comFile Added: 43880 source bytotal.patch
2020-05-13 10:23ranjith_qualiantech_comFile Added: 43880 test.patch
2020-05-13 15:41marvintmReview Assigned To => marvintm
2020-05-13 15:41marvintmNote Added: 0119839
2020-05-13 15:41marvintmStatusscheduled => closed
2020-05-13 15:41marvintmResolutionopen => unable to reproduce
2020-05-13 15:41marvintmFixed in Version => RR19Q4
2020-05-18 19:04ranjith_qualiantech_comFile Added: 43880_source_bytotal_v2.patch
2020-05-18 19:05ranjith_qualiantech_comFile Added: 43880_source_test_v2.patch
2020-05-25 09:32ranjith_qualiantech_comFile Added: 43880_source_bytotal_v3.patch
2020-05-25 09:33ranjith_qualiantech_comFile Added: 43880_source_test_v3.patch

Notes
(0119839)
marvintm   
2020-05-13 15:41   
The problem cannot be currently reproduced in pi, as it only affected the old discounts engine. We have attached a patch with a solution which can be applied in previous releases.