Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0036622 | Retail Modules | Web POS | public | 2017-08-08 07:22 | 2017-10-11 13:22 |
|
Reporter | guillermogil | |
Assigned To | ranjith_qualiantech_com | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | RR17Q4 | |
Merge Request Status | |
Review Assigned To | marvintm |
OBNetwork customer | |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0036622: Add a not needed payment can generate wrong data |
Description | If you add a not needed payment (e.g.- add a payment when the total has been paid) if that payment is check as cash it can generate wrong data due to cash change.
It should not be possible to allow that. |
Steps To Reproduce | - Add this hook to your code:
OB.UTIL.HookManager.registerHook('OBPOS_preAddPayment', function (args, callbacks) {
if (args.paymentToAdd.get('amount') < 0) {
args.paymentToAdd.set('paid', args.paymentToAdd.get('amount'));
args.paymentToAdd.set('origAmount', args.paymentToAdd.get('amount'))
args.paymentToAdd.set('paymentData', {
change: 'change payment'
});
}
OB.UTIL.HookManager.callbackExecutor(args, callbacks);
});
- Load WebPOS
- Add an Avalanche transceiver
- Pay totally with card
- Add 5€ as cash
Look the backend, you will see that total payment is wrong, |
Proposed Solution | It should have 2 different solutions:
- It should not be possible to add a payment (first lines of addPayment function) if amount is positive (to grant change) and pending is <= 0
- There should be an additionnal check to ensure that if something has happend with the payments, to not allow it (e.g.- Add a product that cost 10, pay it, then on the same ticket return a product that cost 20) Those cases are not taken into account properly
Update: another case should also be taken into account: if a payment was added to a positive receipt, and then the receipt total changes to a negative amount (because negative lines are added, or a positive line is changed into a negative line), then the payment should also be considered invalid, and the user should also not be able to complete the ticket. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0037264 | | closed | ranjith_qualiantech_com | Returning change in a payment method with payment data generates a wrong payment plan | causes | defect | 0037224 | | closed | ranjith_qualiantech_com | It is not possible to finish a refund with multiple means of payment | causes | defect | 0037809 | | closed | ranjith_qualiantech_com | [RR18q1] "Unneeded Payments" Error message is not taking conversion rate into account |
|
Attached Files | issue 36622 17Q2 source posterminal 8064.patch (10,907) 2017-10-11 13:22 https://issues.openbravo.com/file_download.php?file_id=11169&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2017-08-08 07:22 | guillermogil | New Issue | |
2017-08-08 07:22 | guillermogil | Assigned To | => Retail |
2017-08-08 07:22 | guillermogil | Resolution time | => 1503957600 |
2017-08-08 07:22 | guillermogil | Triggers an Emergency Pack | => No |
2017-08-10 13:12 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2017-08-10 13:12 | ranjith_qualiantech_com | Status | new => scheduled |
2017-08-23 12:29 | hgbot | Checkin | |
2017-08-23 12:29 | hgbot | Note Added: 0098610 | |
2017-08-23 12:29 | hgbot | Checkin | |
2017-08-23 12:29 | hgbot | Note Added: 0098611 | |
2017-08-30 14:33 | jorge-garcia | Assigned To | ranjith_qualiantech_com => jorge-garcia |
2017-08-31 08:17 | hgbot | Checkin | |
2017-08-31 08:17 | hgbot | Note Added: 0098741 | |
2017-08-31 08:17 | hgbot | Status | scheduled => resolved |
2017-08-31 08:17 | hgbot | Resolution | open => fixed |
2017-08-31 08:17 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2254e99d8586af60e5de058547a90637a4381cec [^] |
2017-08-31 14:26 | hgbot | Checkin | |
2017-08-31 14:26 | hgbot | Note Added: 0098757 | |
2017-08-31 14:26 | jorge-garcia | Note Added: 0098758 | |
2017-08-31 14:26 | jorge-garcia | Status | resolved => new |
2017-08-31 14:26 | jorge-garcia | Resolution | fixed => open |
2017-09-04 17:19 | marvintm | Note Added: 0098818 | |
2017-09-04 17:19 | marvintm | Proposed Solution updated | |
2017-09-07 07:37 | hgbot | Checkin | |
2017-09-07 07:37 | hgbot | Note Added: 0098876 | |
2017-09-07 08:07 | hgbot | Checkin | |
2017-09-07 08:07 | hgbot | Note Added: 0098879 | |
2017-09-08 15:22 | hgbot | Checkin | |
2017-09-08 15:22 | hgbot | Note Added: 0098920 | |
2017-09-08 15:22 | hgbot | Status | new => resolved |
2017-09-08 15:22 | hgbot | Resolution | open => fixed |
2017-09-08 15:22 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2254e99d8586af60e5de058547a90637a4381cec [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/57d9b039b05973d2c55d261800073125f05f35d6 [^] |
2017-09-08 15:22 | hgbot | Checkin | |
2017-09-08 15:22 | hgbot | Note Added: 0098921 | |
2017-09-11 09:36 | jorge-garcia | Assigned To | jorge-garcia => ranjith_qualiantech_com |
2017-09-11 11:32 | marvintm | Review Assigned To | => marvintm |
2017-09-11 11:32 | marvintm | Status | resolved => closed |
2017-09-11 11:32 | marvintm | Fixed in Version | => RR17Q4 |
2017-10-11 13:22 | ranjith_qualiantech_com | File Added: issue 36622 17Q2 source posterminal 8064.patch | |
2017-11-06 07:47 | guillermogil | Relationship added | causes 0037224 |
2017-11-08 15:28 | aaroncalero | Relationship added | related to 0037264 |
2018-02-05 09:02 | ranjith_qualiantech_com | Relationship added | causes 0037809 |
Notes |
|
(0098610)
|
hgbot
|
2017-08-23 12:29
|
|
|
|
(0098611)
|
hgbot
|
2017-08-23 12:29
|
|
Repository: tools/automation/pi-mobile
Changeset: 521702944e3290b2a46edffcfa37d03dec865e24
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Aug 23 15:59:00 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/521702944e3290b2a46edffcfa37d03dec865e24 [^]
Verifies issue 36622 : Added automated test 'I36622_VerifyReceiptExactPayment'
---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/reversepayments/ReversePaymentTests.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I32826_VerifyOverpaymentByCashCardII.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I36622_VerifyReceiptExactPayment.java
---
|
|
|
(0098741)
|
hgbot
|
2017-08-31 08:17
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2254e99d8586af60e5de058547a90637a4381cec
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Aug 30 14:27:36 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2254e99d8586af60e5de058547a90637a4381cec [^]
Fixed issue 36622: Add a not needed payment can generate wrong data
An additional check has been added when done button is clicked.
The check has been also added to multiorders addPayment function.
For reverse payment, it has been added to set in client side the
attribute is ReversePayment for those payment lines loaded from the
backend.
---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
|
|
|
(0098757)
|
hgbot
|
2017-08-31 14:26
|
|
|
|
(0098758)
|
jorge-garcia
|
2017-08-31 14:26
|
|
The last change breaks the cancel and replace functionality |
|
|
|
Update: another case should also be taken into account: if a payment was added to a positive receipt, and then the receipt total changes to a negative amount (because negative lines are added, or a positive line is changed into a negative line), then the payment should also be considered invalid, and the user should also not be able to complete the ticket. |
|
|
(0098876)
|
hgbot
|
2017-09-07 07:37
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 45d7ea5660a207217a0530424598adc422edd4cd
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Sep 06 17:56:48 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/45d7ea5660a207217a0530424598adc422edd4cd [^]
Related to issue 36622: Add a not needed payment can generate wrong data
An additional check has been added when done button is clicked.
The check has been also added to multiorders addPayment function.
For reverse payment, it has been added to set in client side the
attribute is ReversePayment for those payment lines loaded from the
backend.
---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
|
|
|
(0098879)
|
hgbot
|
2017-09-07 08:07
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 540d54be7475372ed50da85190839550b80180e4
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Sep 07 11:37:18 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/540d54be7475372ed50da85190839550b80180e4 [^]
Related to issue 36622: Add a not needed payment can generate wrong data
Backed out changeset: 45d7ea5660a2
Tests failed in try
---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
|
|
|
(0098920)
|
hgbot
|
2017-09-08 15:22
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 57d9b039b05973d2c55d261800073125f05f35d6
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Sep 08 18:51:41 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/57d9b039b05973d2c55d261800073125f05f35d6 [^]
Fixed issue 36622: Add a not needed payment can generate wrong data
An additional check has been added when done button is clicked.
The check has been also added to multiorders addPayment function.
For reverse payment, it has been added to set in client side the
attribute is ReversePayment for those payment lines loaded from the
backend.
---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
|
|
|
(0098921)
|
hgbot
|
2017-09-08 15:22
|
|
Repository: tools/automation/pi-mobile
Changeset: b207e1da409b029f6e3f2fd4e69a5d5864e24a6a
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Sep 08 18:51:05 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/b207e1da409b029f6e3f2fd4e69a5d5864e24a6a [^]
Verifies issue 36622 : Modified automated test 'CancelAndRplcPartiallyReduced'
Modified automated test 'I36622_VerifyReceiptExactPayment'
---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/CancelAndRplcPartiallyReduced.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I35279_CancelAndRplcLayawayII.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I36622_VerifyReceiptExactPayment.java
---
|
|