Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040812Retail ModulesWeb POSpublic2019-05-08 16:082019-05-30 16:03
anderaranguren 
ranjith_qualiantech_com 
immediatemajoralways
closedfixed 
5
pi 
RR19Q3 
jorge-garcia
No
0040812: If a manual discount is applied to an order, it is not possible to apply it again. It will remain the first discount
If a manual discount is applied to an order, it is not possible to apply it again. It will remain the first discount

Even if it is a different percentage or amount.

It is also not possible to add the second discount by checking "Override existing promotions"
1. Go to Web POS
2. Add a product
3. Click on Discount button
4. Add disc_5_var_perc_5% discount
5. Click again on Discount Button
6. Add the same discount but with different percentage (10%)
The second time, the discount will not be applied. 5% discount will remain.

7. Try adding again (10%) by checking "Override existing promotions"
It does not override the first one. 5% discount will still remain.
No tags attached.
related to defect 0040817 closed ranjith_qualiantech_com Applying a User Defined Percentage twice, it gives a wrong value. 
related to defect 0040666 closed ranjith_qualiantech_com Several discounts do not apply to all lines 
related to defect 0040979 closed ranjith_qualiantech_com Discounts defined as "Allow multiple instances per line" should hide or disable "Override existing promotions" check 
patch issue 40812 source posterminal.patch (4,324) 2019-05-21 07:51
https://issues.openbravo.com/file_download.php?file_id=12967&type=bug
patch issue 40812 source test.patch (8,097) 2019-05-21 07:51
https://issues.openbravo.com/file_download.php?file_id=12968&type=bug
Issue History
2019-05-08 16:08anderarangurenNew Issue
2019-05-08 16:08anderarangurenAssigned To => Retail
2019-05-08 16:08anderarangurenTriggers an Emergency Pack => No
2019-05-09 09:58anderarangurenDescription Updatedbug_revision_view_page.php?rev_id=18739#r18739
2019-05-09 09:58anderarangurenSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18741#r18741
2019-05-09 10:15anderarangurenRelationship addedrelated to 0040817
2019-05-09 10:22anderarangurenResolution time => 1559080800
2019-05-09 10:23anderarangurenPriorityurgent => immediate
2019-05-09 14:22ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-05-09 14:23ranjith_qualiantech_comStatusnew => scheduled
2019-05-14 17:48martinsdanIssue Monitored: martinsdan
2019-05-15 08:09hgbotCheckin
2019-05-15 08:09hgbotNote Added: 0111678
2019-05-15 08:09hgbotStatusscheduled => resolved
2019-05-15 08:09hgbotResolutionopen => fixed
2019-05-15 08:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c2d2d09ffd128a9a7f4e1fbbee1cffad093ce815 [^]
2019-05-15 08:09hgbotCheckin
2019-05-15 08:09hgbotNote Added: 0111679
2019-05-16 12:26jorge-garciaReview Assigned To => jorge-garcia
2019-05-16 12:35jorge-garciaNote Added: 0111717
2019-05-16 12:35jorge-garciaStatusresolved => new
2019-05-16 12:35jorge-garciaResolutionfixed => open
2019-05-17 07:30ranjith_qualiantech_comStatusnew => scheduled
2019-05-20 04:25hgbotCheckin
2019-05-20 04:25hgbotNote Added: 0111778
2019-05-20 04:25hgbotStatusscheduled => resolved
2019-05-20 04:25hgbotResolutionopen => fixed
2019-05-20 04:25hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c2d2d09ffd128a9a7f4e1fbbee1cffad093ce815 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cf57663aa8d4a9854498397258359b71f4dcf406 [^]
2019-05-20 04:32hgbotCheckin
2019-05-20 04:32hgbotNote Added: 0111779
2019-05-20 14:42ranjith_qualiantech_comStatusresolved => new
2019-05-20 14:42ranjith_qualiantech_comResolutionfixed => open
2019-05-20 14:42ranjith_qualiantech_comStatusnew => scheduled
2019-05-21 07:51ranjith_qualiantech_comFile Added: issue 40812 source posterminal.patch
2019-05-21 07:51ranjith_qualiantech_comAssigned Toranjith_qualiantech_com => anderaranguren
2019-05-21 07:51ranjith_qualiantech_comAssigned Toanderaranguren => ranjith_qualiantech_com
2019-05-21 07:51ranjith_qualiantech_comFile Added: issue 40812 source test.patch
2019-05-22 04:29hgbotCheckin
2019-05-22 04:29hgbotNote Added: 0112057
2019-05-22 04:29hgbotStatusscheduled => resolved
2019-05-22 04:29hgbotResolutionopen => fixed
2019-05-22 04:29hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cf57663aa8d4a9854498397258359b71f4dcf406 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/262e8aeedacdd03e99c860fbf57619be735ef3e4 [^]
2019-05-22 04:29hgbotCheckin
2019-05-22 04:29hgbotNote Added: 0112058
2019-05-23 09:48jorge-garciaNote Added: 0112078
2019-05-23 09:48jorge-garciaStatusresolved => new
2019-05-23 09:48jorge-garciaResolutionfixed => open
2019-05-23 12:10ranjith_qualiantech_comStatusnew => scheduled
2019-05-27 09:31hgbotCheckin
2019-05-27 09:31hgbotNote Added: 0112154
2019-05-27 11:52jorgewederagoRelationship addedrelated to 0040666
2019-05-27 12:56hgbotCheckin
2019-05-27 12:56hgbotNote Added: 0112165
2019-05-27 13:52ranjith_qualiantech_comStatusscheduled => resolved
2019-05-27 13:52ranjith_qualiantech_comResolutionopen => fixed
2019-05-30 16:02jorge-garciaRelationship addedrelated to 0040979
2019-05-30 16:03jorge-garciaNote Added: 0112275
2019-05-30 16:03jorge-garciaStatusresolved => closed
2019-05-30 16:03jorge-garciaFixed in Version => RR19Q3

Notes
(0111678)
hgbot   
2019-05-15 08:09   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c2d2d09ffd128a9a7f4e1fbbee1cffad093ce815
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed May 15 11:39:23 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c2d2d09ffd128a9a7f4e1fbbee1cffad093ce815 [^]

Fixed issue 40812 : Manual Promotions should override the existing promotions present in the receipt

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0111679)
hgbot   
2019-05-15 08:09   
Repository: tools/automation/pi-mobile
Changeset: 4d3cc1d59f2519c683bda653d2c9d675046872cb
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed May 15 11:39:39 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/4d3cc1d59f2519c683bda653d2c9d675046872cb [^]

Verifies issue 40812 : Modified MultiDiscounts automated test

* Multidiscounts_FixedAmount.java
* Multidiscounts_FixedPercentage.java
* Multidiscounts_VariableAmount.java
* Multidiscounts_VariablePercentage.java

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multidiscounts/Multidiscounts_FixedAmount.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multidiscounts/Multidiscounts_FixedPercentage.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multidiscounts/Multidiscounts_VariableAmount.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multidiscounts/Multidiscounts_VariablePercentage.java
---
(0111717)
jorge-garcia   
2019-05-16 12:35   
The solution is not completely correct.

In this scenario, the only point which is wrong is the one defined in step 7.

Unless "Allow multiple instances per line" is set in discount configuration, if the user tries to apply the same manual promotion twice, even if the percentage or amount to discount is different, the manual promotion should no change.

This behavior is different if the user sets the override check, in this case, the previous promotion must be deleted and the new one must be applied.
(0111778)
hgbot   
2019-05-20 04:25   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: cf57663aa8d4a9854498397258359b71f4dcf406
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon May 20 07:53:53 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cf57663aa8d4a9854498397258359b71f4dcf406 [^]

Fixed issue 40812 : Backed out changeset: c2d2d09ffd12

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0111779)
hgbot   
2019-05-20 04:32   
Repository: tools/automation/pi-mobile
Changeset: 2ee962a4292c6eadc87792f32f9eb1352859e096
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon May 20 07:53:22 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/2ee962a4292c6eadc87792f32f9eb1352859e096 [^]

Verifies issue 40812 : Backed out changeset: 4d3cc1d59f25

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multidiscounts/Multidiscounts_FixedAmount.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multidiscounts/Multidiscounts_FixedPercentage.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multidiscounts/Multidiscounts_VariableAmount.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multidiscounts/Multidiscounts_VariablePercentage.java
---
(0112057)
hgbot   
2019-05-22 04:29   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 262e8aeedacdd03e99c860fbf57619be735ef3e4
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed May 22 07:58:48 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/262e8aeedacdd03e99c860fbf57619be735ef3e4 [^]

Fixed issue 40812 : Manual Promotions should not override the existing promotions present in the receipt

* When applying manual promotion, if override option is checked, then existing manual promotion should be replaced by new manual promotion.
  If override option is not checked, it should not replace existing manual promotion
* Manual promotion doesn't consume the qtyOffer. So if manual promotion is added with override option, it should not replace the automatic discounts

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0112058)
hgbot   
2019-05-22 04:29   
Repository: tools/automation/pi-mobile
Changeset: 0aec79ceddc7bf903c12386fddfd07acf3d909c6
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed May 22 07:55:22 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/0aec79ceddc7bf903c12386fddfd07acf3d909c6 [^]

Verifies issue 40812 : Added automated test 'I40812_VerifyMultiManualDiscounts'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I40812_VerifyMultiManualDiscounts.java
---
(0112078)
jorge-garcia   
2019-05-23 09:48   
The following basic scenario is not working

1) Add a product to the ticket
2) Apply a discount of "disc_5_var_perc - 5%" to all lines
3) Check the promotion is added to the line (this is correct)
4) Try to apply to all lines the same promotion with a 10%
5) Check the 5% promotion is in the ticket and 10% not (this is correct)
6) Try to apply to all lines the same promotion with a 15% and with Override flag checked.
7) Check the 5% promotion is in the ticket and 15% not (this is wrong).

This scenario has been tested in a environment with all external modules installed.
(0112154)
hgbot   
2019-05-27 09:31   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 2b9c28f2fe3250e21cf413407157e38ffef9dd55
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon May 27 13:00:51 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/2b9c28f2fe3250e21cf413407157e38ffef9dd55 [^]

Related to issue 40812 : Order Manual Promotions should be reset when total discount is applied with override flag checked

* If Multiple Instance is enabled and override is selected, then Order Manual Promotions should be reset

---
M web/org.openbravo.retail.discounts.bytotal/js/preApplyDiscountsHook.js
---
(0112165)
hgbot   
2019-05-27 12:56   
Repository: tools/automation/pi-mobile
Changeset: 68c640fc6864989075ee18820cb74ea6252d4021
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon May 27 16:26:46 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/68c640fc6864989075ee18820cb74ea6252d4021 [^]

Verifies issue 40812 : Added automated test 'I40812_VerifyMultiManualTotalDiscounts'

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I40812_VerifyMultiManualDiscounts.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bytotal/I40812_VerifyMultiManualTotalDiscounts.java
---
(0112275)
jorge-garcia   
2019-05-30 16:03   
Code reviewed and tested