Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034856Retail ModulesDiscounts by Payment Methodpublic2017-01-05 13:412018-02-15 14:06
ranjith_qualiantech_com 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR18Q2 
marvintm
No
0034856: Issues in Payment Method discount calculation
a) If we have 10% Discount on Cash payment method & 20% Discount on Card payment method. If we add a product with Price 200 and then adding Cash "70", we will have 7.78 discount for Cash. While clicking card payment, it will display "Pay 97.78 ..." by calculating the pending amount with 20% discount. But actually value was "97.776". Due to this, we will have some issues in calculation (https://www.youtube.com/watch?v=u2sC6hyK6oM [^])

b) If we add same payment method under 2 discount with 10% and 20%, discount with 10% is inactive and discount with 20% is active, then active discount is not used in discount calculation
a) Remove rounding decimals 6 from paymentmethod-discount.js and run test "I31850_VerifyDiscountByPaymentMethod"
b) Run test "I30305_VerifyDiscountByMultiPaymentII"
No tags attached.
related to defect 0041154 closed rqueralta "Tax" field in the order's JSON is wrong when including a compound tax rate in a layaway, it is loaded and paid 
related to defect 0041332 closed ranjith_qualiantech_com Discounts by Payment Method are not applied when paying a layaway 
patch issue 34856 source discount_paymentmethod 61.patch (22,268) 2017-05-09 09:27
https://issues.openbravo.com/file_download.php?file_id=10737&type=bug
patch issue 34856 test 6520.patch (13,235) 2017-05-09 09:27
https://issues.openbravo.com/file_download.php?file_id=10738&type=bug
Issue History
2017-01-05 13:41ranjith_qualiantech_comNew Issue
2017-01-05 13:41ranjith_qualiantech_comAssigned To => Retail
2017-01-05 13:41ranjith_qualiantech_comTriggers an Emergency Pack => No
2017-01-05 13:41ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-01-05 13:41ranjith_qualiantech_comStatusnew => scheduled
2017-05-09 09:27ranjith_qualiantech_comFile Added: issue 34856 source discount_paymentmethod 61.patch
2017-05-09 09:27ranjith_qualiantech_comFile Added: issue 34856 test 6520.patch
2017-12-22 06:57hgbotCheckin
2017-12-22 06:57hgbotNote Added: 0101194
2017-12-22 12:14hgbotCheckin
2017-12-22 12:14hgbotNote Added: 0101211
2017-12-22 13:43hgbotCheckin
2017-12-22 13:43hgbotNote Added: 0101235
2017-12-26 08:47hgbotCheckin
2017-12-26 08:47hgbotNote Added: 0101250
2017-12-26 11:34hgbotCheckin
2017-12-26 11:34hgbotNote Added: 0101252
2017-12-26 14:45hgbotCheckin
2017-12-26 14:45hgbotNote Added: 0101256
2018-01-05 07:07ranjith_qualiantech_comStatusscheduled => resolved
2018-01-05 07:07ranjith_qualiantech_comResolutionopen => fixed
2018-02-15 14:06marvintmReview Assigned To => marvintm
2018-02-15 14:06marvintmStatusresolved => closed
2018-02-15 14:06marvintmFixed in Version => RR18Q2
2019-07-04 13:58ngarciaRelationship addedrelated to 0041154
2019-07-10 13:35ngarciaRelationship addedrelated to 0041332

Notes
(0101194)
hgbot   
2017-12-22 06:57   
Repository: erp/pmods/org.openbravo.retail.discounts.bypaymentmethod
Changeset: c47313bc6ca9a87eb63b178d21318661f3543add
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Dec 22 11:26:57 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bypaymentmethod/rev/c47313bc6ca9a87eb63b178d21318661f3543add [^]

Related to issue 34856 : Refactored duplicate code for fetching discount

* Added New Calculation if Same Payment Method is present in Multiple Discount

---
M web/org.openbravo.retail.discounts.bypaymentmethod/js/paymentmethod-discount.js
---
(0101211)
hgbot   
2017-12-22 12:14   
Repository: tools/automation/pi-mobile
Changeset: acd5b2e34e9328a785350de799f62c0ca78ee80d
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Dec 22 16:43:45 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/acd5b2e34e9328a785350de799f62c0ca78ee80d [^]

Verifies issue 34856 : Added automated test 'I34856_VerifyDiscountWithMultiProduct'

---
M src-test/org/openbravo/test/mobile/quarantine/extmodules/RAN/discounts_bypaymentmethod/I30305_VerifyDiscountByMultiPayment.java
M src-test/org/openbravo/test/mobile/quarantine/extmodules/RAN/discounts_bypaymentmethod/I30305_VerifyDiscountByMultiPaymentII.java
M src-test/org/openbravo/test/mobile/quarantine/extmodules/RAN/discounts_bypaymentmethod/I31850_VerifyDiscountByPaymentMethod.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/terminals/WebPOSExtModulesSplitLineHelper.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/terminals/WebPOSExtModulesTerminalHelper.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java
A src-test/org/openbravo/test/mobile/quarantine/extmodules/RAN/discounts_bypaymentmethod/I34856_VerifyDiscountWithMultiProduct.java
---
(0101235)
hgbot   
2017-12-22 13:43   
Repository: tools/automation/pi-mobile
Changeset: b1a6cb566811707ca5f2e2a0a96659cf9e8c958d
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Dec 22 18:12:50 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/b1a6cb566811707ca5f2e2a0a96659cf9e8c958d [^]

Verifies issue 34856 : Added waitFixOf for PaymentMethodDiscount Tests

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I33511_VerifyLayaway.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I33512_VerifyPayOpenTickets.java
---
(0101250)
hgbot   
2017-12-26 08:47   
Repository: erp/pmods/org.openbravo.retail.discounts.bypaymentmethod
Changeset: d89962ef0739402e070ae5bb2f78a32ae7bb01c7
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Dec 26 13:16:46 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bypaymentmethod/rev/d89962ef0739402e070ae5bb2f78a32ae7bb01c7 [^]

Related to issue 34856 : Payment method should discount should not be applied for Multi Order and Layaways

---
M web/org.openbravo.retail.discounts.bypaymentmethod/js/paymentmethod-discount.js
---
(0101252)
hgbot   
2017-12-26 11:34   
Repository: erp/pmods/org.openbravo.retail.discounts.bypaymentmethod
Changeset: 22d53a5c36c3bdbd73b8375f8f3a2ddd36de8fbc
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Dec 26 16:03:50 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bypaymentmethod/rev/22d53a5c36c3bdbd73b8375f8f3a2ddd36de8fbc [^]

Related to issue 34856 : Discount should not applied if the receipt doesn't have selected payment

---
M web/org.openbravo.retail.discounts.bypaymentmethod/js/paymentmethod-discount.js
---
(0101256)
hgbot   
2017-12-26 14:45   
Repository: tools/automation/pi-mobile
Changeset: af921a54b0b2861661d707b51cfa1f77499d12a7
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Dec 26 19:15:23 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/af921a54b0b2861661d707b51cfa1f77499d12a7 [^]

Verifies issue 34856 : Moved test from quaratine to discount by payment method location

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I33511_VerifyLayaway.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I33512_VerifyPayOpenTickets.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I30305_VerifyDiscountByMultiPayment.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I30305_VerifyDiscountByMultiPaymentII.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I31850_VerifyDiscountByPaymentMethod.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I34856_VerifyDiscountWithMultiProduct.java
R src-test/org/openbravo/test/mobile/quarantine/extmodules/RAN/discounts_bypaymentmethod/I30305_VerifyDiscountByMultiPayment.java
R src-test/org/openbravo/test/mobile/quarantine/extmodules/RAN/discounts_bypaymentmethod/I30305_VerifyDiscountByMultiPaymentII.java
R src-test/org/openbravo/test/mobile/quarantine/extmodules/RAN/discounts_bypaymentmethod/I31850_VerifyDiscountByPaymentMethod.java
R src-test/org/openbravo/test/mobile/quarantine/extmodules/RAN/discounts_bypaymentmethod/I34856_VerifyDiscountWithMultiProduct.java
---