Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035830Retail ModulesWeb POSpublic2017-04-25 12:312023-07-11 08:50
adrianromero 
Retail 
urgentmajorhave not tried
newopen 
5
 
 
No
0035830: [SER-QA 2681] One payment overpayments should be checked before invoking payment provider
Overpayment functionality is executed at the end, when payment providers has been invoked because this functionality needs to review all payments, check between all payments what payment allow overpayments and what not, to distribute the total overpayment between payments.

In the case of just one payment that does not allow overpayment, can be done an extra verification just to prevent the invocation of the payment provider and this way prevent a cancellation that is reject at the very beginning when a payment that does not allow overpayments if the payment amount is greater than the total of the receipt. This new check will avoid most of errors in payments that do not allow overpayments.
N/A
SER-QA
related to defect 0033238 closed migueldejuana Multi currency payments not working 
patch issue 35830 possible fix source posterminal 8335.patch (10,714) 2017-05-30 13:44
https://issues.openbravo.com/file_download.php?file_id=10807&type=bug
patch issue 35830 possible fix test 8335.patch (12,822) 2017-05-30 13:44
https://issues.openbravo.com/file_download.php?file_id=10808&type=bug
patch issue 35830 possible fix source posterminal v2.patch (11,377) 2017-06-07 10:05
https://issues.openbravo.com/file_download.php?file_id=10826&type=bug
Issue History
2017-04-25 12:31adrianromeroNew Issue
2017-04-25 12:31adrianromeroAssigned To => Retail
2017-04-25 12:31adrianromeroResolution time => 1557352800
2017-04-25 12:31adrianromeroTriggers an Emergency Pack => No
2017-04-25 12:31adrianromeroTag Attached: SER-QA
2017-04-25 12:31adrianromeroSummaryOne payment overpayments should be checked before invoking payment provider => [SER-QA 2681] One payment overpayments should be checked before invoking payment provider
2017-04-28 10:59marvintmTypefeature request => defect
2017-04-28 16:44mario_castelloAssigned ToRetail => mario_castello
2017-04-28 16:45mario_castelloStatusnew => acknowledged
2017-04-28 16:45mario_castelloStatusacknowledged => scheduled
2017-05-05 16:43hgbotCheckin
2017-05-05 16:43hgbotNote Added: 0096426
2017-05-05 16:43hgbotStatusscheduled => resolved
2017-05-05 16:43hgbotResolutionopen => fixed
2017-05-05 16:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/abe131fd8eceeaa85fc66b131a6e80df7aed0eae [^]
2017-05-08 12:48maiteResolution time1557352800 => 1494280800
2017-05-16 10:28hgbotCheckin
2017-05-16 10:28hgbotNote Added: 0096614
2017-05-16 10:29migueldejuanaNote Added: 0096616
2017-05-16 10:29migueldejuanaStatusresolved => new
2017-05-16 10:29migueldejuanaResolutionfixed => open
2017-05-16 16:33mario_castelloAssigned Tomario_castello => Retail
2017-05-19 12:21ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-05-19 12:21ranjith_qualiantech_comStatusnew => scheduled
2017-05-30 13:44ranjith_qualiantech_comFile Added: issue 35830 possible fix source posterminal 8335.patch
2017-05-30 13:44ranjith_qualiantech_comFile Added: issue 35830 possible fix test 8335.patch
2017-06-02 16:59guilleaerNote Added: 0097109
2017-06-02 17:01guilleaerNote Edited: 0097109bug_revision_view_page.php?bugnote_id=0097109#r15288
2017-06-02 17:01guilleaerNote Edited: 0097109bug_revision_view_page.php?bugnote_id=0097109#r15289
2017-06-02 17:06guilleaerNote Edited: 0097109bug_revision_view_page.php?bugnote_id=0097109#r15290
2017-06-07 10:05ranjith_qualiantech_comFile Added: issue 35830 possible fix source posterminal v2.patch
2017-06-07 10:23asiermartirenaIssue Monitored: asiermartirena
2017-06-07 17:22migueldejuanaRelationship addedrelated to 0033238
2017-06-09 11:50ranjith_qualiantech_comNote Added: 0097275
2017-06-09 12:01hgbotCheckin
2017-06-09 12:01hgbotNote Added: 0097276
2017-06-09 12:01hgbotStatusscheduled => resolved
2017-06-09 12:01hgbotResolutionopen => fixed
2017-06-09 12:01hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/abe131fd8eceeaa85fc66b131a6e80df7aed0eae [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b62a7f268b87217cd4d4e06f8e9e3d7cdc02209a [^]
2017-06-09 12:01hgbotCheckin
2017-06-09 12:01hgbotNote Added: 0097279
2017-06-09 14:03ranjith_qualiantech_comStatusresolved => new
2017-06-09 14:03ranjith_qualiantech_comResolutionfixed => open
2017-06-09 14:04hgbotCheckin
2017-06-09 14:04hgbotNote Added: 0097290
2017-06-09 14:04hgbotCheckin
2017-06-09 14:04hgbotNote Added: 0097291
2017-06-16 10:11marvintmResolution time1494280800 =>
2017-06-16 10:11marvintmTypedefect => design defect
2017-06-16 10:12marvintmNote Added: 0097436
2023-07-11 08:50ranjith_qualiantech_comAssigned Toranjith_qualiantech_com => Retail

Notes
(0096426)
hgbot   
2017-05-05 16:43   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: abe131fd8eceeaa85fc66b131a6e80df7aed0eae
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Wed May 03 07:49:25 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/abe131fd8eceeaa85fc66b131a6e80df7aed0eae [^]

Fixed issue 0035830: [SER-QA 2681] One payment overpayments should be checked before invoking payment provider

- Added validation for payment provider to check the new payment before the provider will be executed

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboard-toolbars.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0096614)
hgbot   
2017-05-16 10:28   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: cd13ce1880cacd17a67146e9961babdbc91309e7
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon May 15 17:59:08 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cd13ce1880cacd17a67146e9961babdbc91309e7 [^]

Related issue 35830, related issue 35623

It is breaking I35623_OpenReceiptAndPaymentProvider

Backed out changeset abe131fd8ece

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboard-toolbars.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0096616)
migueldejuana   
2017-05-16 10:29   
It is breaking I35623_OpenReceiptAndPaymentProvider test
(0097109)
guilleaer   
2017-06-02 16:59   
(edited on: 2017-06-02 17:06)
Checking patches provided by Ranjith:

Note: Credit card is configured as "not overpayment" === 0 and provider === dialog

A:
1. Mark voucher with amount to change 0.
2. Add a product with value 18.90
3. Pay with 20 using voucher
4. Error: Systems alerts but you can confirm the receipt

B:
1. Having voucher configured to allow change/overpayment
2. Add a product with value 18.90
3. Pay 10 with voucher (allowed to change)
4. pay 10 with credit card (Not allowed change = 0)
5. It is not possible because car is not allowed to overpay
however doing the following
1. Having voucher configured to allow change/overpayment
2. Add a product with value 18.90
3. Pay 10 with credit card (Not allowed change = 0)
4. pay 10 with voucher (allowed to change)
5. You can complete the overpayment because it is assumed by voucher.

I think in both above scenarios the behavior should be equal, even more taking into account the next scenario

C:
1. Add a product with value 18.90
2. Pay 10 with cash
3. pay 10 with credit card (Not allowed change = 0)
4. It is possible because change can be given back by cash

In case B (first example) it is not working with voucher.

D:
Do a cashup keeping 0 in cash and repeat previous step
The system will allow to add the credit card payment, but later on it will say that you don't have enough cash to give back change so the operation cannot be finished. This case also should be supported since it is quite similar to the case reported in this issue.


Apart from above scenarios, I'm not able to pay with credit card using pay open tickets:

1) create an order with product with value 18.90
2) create other new order with product with value 18.90
3) open pay open tickets
4) select tickets created above
5) try to pay 40 with credit card

JS error is raised!

(0097275)
ranjith_qualiantech_com   
2017-06-09 11:50   
Seperate issue https://issues.openbravo.com/view.php?id=36218 [^] raised for note B from https://issues.openbravo.com/view.php?id=35830#c97109 [^]
(0097276)
hgbot   
2017-06-09 12:01   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b62a7f268b87217cd4d4e06f8e9e3d7cdc02209a
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 09 15:30:15 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b62a7f268b87217cd4d4e06f8e9e3d7cdc02209a [^]

Fixed issue 35830 : Payment method amount should be prevalidated if it is configured with provider

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboard-toolbars.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0097279)
hgbot   
2017-06-09 12:01   
Repository: tools/automation/pi-mobile
Changeset: 768f87a4b568f7f9691db5b573254ca3c46ce172
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 09 15:10:39 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/768f87a4b568f7f9691db5b573254ca3c46ce172 [^]

Verifies issue 35830 : Added automated test 'I35830_VerifyPreValidationPaymentProvider'

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/reversepayments/NoCashWhenReverse.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I35830_VerifyPreValidationPaymentProvider.java
---
(0097290)
hgbot   
2017-06-09 14:04   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b8b3b65277f94b7e7e809b8720da53c569383f28
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 09 17:33:20 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b8b3b65277f94b7e7e809b8720da53c569383f28 [^]

Related to issue 35830 : Backedout changeset due to functionality change
Backed out changeset: b62a7f268b87

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboard-toolbars.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0097291)
hgbot   
2017-06-09 14:04   
Repository: tools/automation/pi-mobile
Changeset: a3d7997cb2afa868a262c6b451fa480f01e8f055
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 09 17:34:26 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/a3d7997cb2afa868a262c6b451fa480f01e8f055 [^]

Related to issue 35830 : Backedout changeset due to functionality change
Backed out changeset: 768f87a4b568

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/reversepayments/NoCashWhenReverse.java
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I35830_VerifyPreValidationPaymentProvider.java
---
(0097436)
marvintm   
2017-06-16 10:12   
This change cannot be done currently as it is, because we would be breaking the existing API of the payment method providers, and several current implementations would be broken already.

Most likely a new payment gateway API should be designed, taking into account all the automatic checks which didn't exist when the original payment gateway API was implemented.