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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039536
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2018-10-25 14:022018-12-27 13:58
Reporterinaki_garciaView Statuspublic 
Assigned Toranjith_qualiantech_com 
PrioritynormalResolutionfixedFixed in VersionRR19Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionmainSCM revision 
Review Assigned Tomarvintm
Regression levelPackaging and release
Regression date2018-01-12
Regression introduced in releasemain
Regression introduced by commithttps://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/edd903ba2305#l8.75 [^]
Triggers an Emergency PackNo
Summary

0039536: [RR18Q4] Total Amount discounts get removed when splitting lines

DescriptionA ticket with a Total Amount type discount applied, which shows on all lines, gets removed when using the Split Lines feature. Said discount cannot be reapplied again unless
the ticket is removed.

Further observations after the steps to reproduce are executed:

- Adding a product which requires providing extra contact info ("Item Declaration" popup appears) throws the following error and makes the POS unusable (check the attached "2018-10-11 13-33-09.png"
screenshot and the following error log message). 'Contact customer info for product' module is required to be installed and the 'WEB POS Show BusinessPartner Birth Information' set to 'Y' to execute this step:

Uncaught TypeError: discountRule.set is not a function
    at 2de4b76c91e46e250b8a916b152d94d1.js:3516
    at Array.forEach (<anonymous>)
    at Function.b.each.b.forEach (underscore-1.3.3.min.js:11)
    at Object.manualByTotalPromotionsExecutor (2de4b76c91e46e250b8a916b152d94d1.js:3516)
    at Object.implementation (2de4b76c91e46e250b8a916b152d94d1.js:3516)
    at G.d.applyRule (2de4b76c91e46e250b8a916b152d94d1.js:1915)
    at G.d.nextAction (2de4b76c91e46e250b8a916b152d94d1.js:1903)
    at G.d.<anonymous> (2de4b76c91e46e250b8a916b152d94d1.js:1903)
    at g.Model.trigger (backbone-0.9.2.min.js:9)
    at 2de4b76c91e46e250b8a916b152d94d1.js:1912


- If another type of discount is applied (such as "Fixed Percentage Disount" type discount) for one or more lines, the Total Amount discount reappears only for that/those line(s) (check the attached "Screenshot from 2018-10-25 14-08-11.png" screenshot)
Steps To ReproducePrecondition: the "Discount rules for Retail by total" module is required to be installed and a Total Amount type discount configured.

Use this test case in as a guide to configure a Total Amount discount:

https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10507 [^]

0. Log into the WebPOS
1. Add some products to the ticket to insert several lines and quantities
2. Open the "Receipt disounts" popup by selecting it from the dropdown menu
3. Apply the previously created Total Amount to the ticket by selecting it and clicking on "Apply"
4. Select a line with Quantity greater than 1, and click on the "Split" option from the right pane
5. Click "Apply" on the "Split" popup
6. NOTICE that the applied discount has dissappeared from all lines

Steps are reproduced in the attached video
TagsNo tags attached.
Attached Files? file icon ScreenRecording 2018-10-25 at 13.01.54.avi [^] (1,777,754 bytes) 2018-10-25 14:04
png file icon 2018-10-11 13-33-09.png [^] (225,087 bytes) 2018-10-25 14:06


png file icon Screenshot from 2018-10-25 14-08-11.png [^] (171,589 bytes) 2018-10-25 14:08

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0039858 closedranjith_qualiantech_com If a line with manual discounts is split, automatic discounts no longer work 
related to defect 0040007 closedranjith_qualiantech_com Receipt with discounts can not be completed 

-  Notes
(0108318)
hgbot (developer)
2018-12-06 14:22

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: acc28bc9b14186d976bacb2800869861099e9483
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Dec 06 18:52:12 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/acc28bc9b14186d976bacb2800869861099e9483 [^]

Related to issue 39536 : Modified Discount Per Total Amount calculation

* Removed unnecessary attribute 'qtyOffer' for Disccount Per Total Amount calculation

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-by-total-utils.js
---
(0108320)
hgbot (developer)
2018-12-07 04:14

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 8cc9dda150f603fc151aa86a7fd8fd143ed5e740
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Dec 07 08:44:18 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8cc9dda150f603fc151aa86a7fd8fd143ed5e740 [^]

Related to issue 39536 : Backed out changeset: acc28bc9b141

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-by-total-utils.js
---
(0108627)
hgbot (developer)
2018-12-17 07:03

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 8f683d71795f20e926385aa588570c0342142db4
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Dec 17 11:33:18 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8f683d71795f20e926385aa588570c0342142db4 [^]

Related to issue 39536 : Total Discounts must be applied to lines when spliting it

* Discount attribute 'qtyOffer' was set to 0 to support Multi Discount.
  Same attribute was used in applying discount while spliting the lines.
  So new attrbiute 'pendingQtyOffer' added to discountRule which is used in applying discounts while spliting lines

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-by-total-utils.js
---
(0108628)
hgbot (developer)
2018-12-17 09:08

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f8aece110f2c41b624c6d6139b69ce6ce3d2eaf5
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Dec 17 13:38:14 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f8aece110f2c41b624c6d6139b69ce6ce3d2eaf5 [^]

Related to issue 39536 : Discounts must be splited proportionally to lines when splitting it

* For Mutli Discounts functionality, discountRule attribute 'qtyOffer' can be zero.
  To split the discounts, new discountRule attribute 'pendingQtyOffer' must be used for spliitng discounts.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0108629)
hgbot (developer)
2018-12-17 09:08

Repository: tools/automation/pi-mobile
Changeset: aa9f3edc74d33b3d30dd2a20b555b55c3d10fae6
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Dec 17 13:37:59 2018 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/aa9f3edc74d33b3d30dd2a20b555b55c3d10fae6 [^]

Verifies issue 39536 : Added Test 'I39536_VerifyTotalDiscountWithSplitLines'

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/TestIdExtModules.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bytotal/I39536_VerifyTotalDiscountWithSplitLines.java
---
(0108631)
ranjith_qualiantech_com (developer)
2018-12-17 10:29

Regression introduced due to Muti Discounts Logic. Discount Rule attribute "qtyOffer" has been set as zero for Multi Discount support, but it was used in Split Lines functionality
(0108727)
marvintm (developer)
2018-12-24 09:46

Main case is now working fine. However, I still see a problem in products which have an automatic discount applied:
- Add 6 units of "Bottle 1L". This will automatically add two discounts of 3x2 Bottles
- Add manual discount "Fixed percentage discount by total 23%"
- Select the line and split it in two lines. The 23% discount will disappear
(0108768)
marvintm (developer)
2018-12-27 13:56

The behaviour is now better than before, as discounts are no longer always lost when splitting the line. However, there is a specific case that is still failing, which will be fixed in a separate issue.

- Issue History
Date Modified Username Field Change
2018-10-25 14:02 inaki_garcia New Issue
2018-10-25 14:02 inaki_garcia Assigned To => Retail
2018-10-25 14:02 inaki_garcia Triggers an Emergency Pack => No
2018-10-25 14:04 inaki_garcia File Added: ScreenRecording 2018-10-25 at 13.01.54.avi
2018-10-25 14:06 inaki_garcia File Added: 2018-10-11 13-33-09.png
2018-10-25 14:08 inaki_garcia File Added: Screenshot from 2018-10-25 14-08-11.png
2018-10-25 14:09 inaki_garcia Description Updated View Revisions
2018-10-25 14:10 inaki_garcia Description Updated View Revisions
2018-10-25 14:11 inaki_garcia Description Updated View Revisions
2018-11-23 11:03 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2018-11-23 11:04 ranjith_qualiantech_com Status new => scheduled
2018-12-06 14:22 ranjith_qualiantech_com Regression level => Packaging and release
2018-12-06 14:22 ranjith_qualiantech_com Regression date => 2018-01-12
2018-12-06 14:22 ranjith_qualiantech_com Regression introduced in release => main
2018-12-06 14:22 ranjith_qualiantech_com Regression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/edd903ba2305#l8.75 [^]
2018-12-06 14:22 hgbot Checkin
2018-12-06 14:22 hgbot Note Added: 0108318
2018-12-07 04:14 hgbot Checkin
2018-12-07 04:14 hgbot Note Added: 0108320
2018-12-07 04:36 ranjith_qualiantech_com Regression level Packaging and release =>
2018-12-07 04:36 ranjith_qualiantech_com Regression date 2018-01-12 =>
2018-12-07 04:36 ranjith_qualiantech_com Regression introduced in release main =>
2018-12-07 04:36 ranjith_qualiantech_com Regression introduced by commit https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/edd903ba2305#l8.75 [^] =>
2018-12-17 07:03 hgbot Checkin
2018-12-17 07:03 hgbot Note Added: 0108627
2018-12-17 09:08 hgbot Checkin
2018-12-17 09:08 hgbot Note Added: 0108628
2018-12-17 09:08 hgbot Checkin
2018-12-17 09:08 hgbot Note Added: 0108629
2018-12-17 10:29 ranjith_qualiantech_com Regression level => Packaging and release
2018-12-17 10:29 ranjith_qualiantech_com Regression date => 2018-01-12
2018-12-17 10:29 ranjith_qualiantech_com Regression introduced in release => main
2018-12-17 10:29 ranjith_qualiantech_com Regression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/edd903ba2305#l8.75 [^]
2018-12-17 10:29 ranjith_qualiantech_com Note Added: 0108631
2018-12-17 10:29 ranjith_qualiantech_com Status scheduled => resolved
2018-12-17 10:29 ranjith_qualiantech_com Resolution open => fixed
2018-12-24 09:46 marvintm Note Added: 0108727
2018-12-24 09:46 marvintm Status resolved => new
2018-12-24 09:46 marvintm Resolution fixed => open
2018-12-26 08:37 ranjith_qualiantech_com Status new => scheduled
2018-12-27 13:55 marvintm Status scheduled => resolved
2018-12-27 13:55 marvintm Fixed in Version => RR19Q1
2018-12-27 13:55 marvintm Resolution open => fixed
2018-12-27 13:56 marvintm Review Assigned To => marvintm
2018-12-27 13:56 marvintm Note Added: 0108768
2018-12-27 13:56 marvintm Status resolved => closed
2018-12-27 13:58 marvintm Relationship added related to 0039858
2019-01-28 07:22 ranjith_qualiantech_com Relationship added related to 0040007


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker