Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035058Retail ModulesWeb POSpublic2017-01-26 13:172017-09-28 17:17
malsasua 
migueldejuana 
normalminoralways
closedfixed 
5
 
 
mtaal
No
0035058: it is possible to return twice the same receipt
using the verified return option, it is possible to return the same receipt twice, if the first return receipt is stuck in errors while importing window
in backoffice:
. close the period to current date (so, the receipt synced from POS will be stuck in Errors While Importing window)

in POS:
. go to "verified return" option
. select receipt X
. select all lines to return
. complete the return receipt
(the return receipt is stuck in Errors While Importing Window)

. go to "verified return" option
. select receipt X
It is possible to select the lines again and return the receipt again
some flag should be activated in the POS informing that there are receipts not processed in the backoffice, stored in "Errors while importing" window or in "Data Import Entry" window.

Also, it should be useful if when a receipt is synced to backoffice, and this receipt is stuck in Errors While Importing, one warning message could be returned from backoffice to the POS, so the cashier will know that the last receipt has not been processed in backoffice.

We must check if there are errors related with loaded order(layaway, quotation, return...). All receipts loaded through PaidReceipts.java will check this error information.
No tags attached.
has duplicate defect 0040889 closed Retail Verified Return should confirm that the order to return is not present in Errors While Importing 
related to defect 0036826 new Retail Add tests for all cases of issue 35058 
related to defect 0040890 closed ranjith_qualiantech_com Cancel and replace should review Errors While importing to see if the original ticket has been canceled before 
diff issue35058Posterminal17Q1.diff (61,040) 2017-09-28 15:09
https://issues.openbravo.com/file_download.php?file_id=11118&type=bug
diff issue35058Posterminal16Q2.diff (64,576) 2017-09-28 16:01
https://issues.openbravo.com/file_download.php?file_id=11120&type=bug
Issue History
2017-01-26 13:17malsasuaNew Issue
2017-01-26 13:17malsasuaAssigned To => Retail
2017-01-26 13:17malsasuaTriggers an Emergency Pack => No
2017-01-26 17:15malsasuaProposed Solution updated
2017-02-07 16:32malsasuaNote Added: 0094132
2017-07-18 09:26ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-07-18 09:26ranjith_qualiantech_comStatusnew => scheduled
2017-08-03 13:19hgbotCheckin
2017-08-03 13:19hgbotNote Added: 0098364
2017-08-03 13:19hgbotCheckin
2017-08-03 13:19hgbotNote Added: 0098365
2017-08-03 13:19hgbotCheckin
2017-08-03 13:19hgbotNote Added: 0098366
2017-08-03 13:19hgbotCheckin
2017-08-03 13:19hgbotNote Added: 0098367
2017-08-03 13:26ranjith_qualiantech_comStatusscheduled => resolved
2017-08-03 13:26ranjith_qualiantech_comResolutionopen => fixed
2017-08-08 08:55hgbotCheckin
2017-08-08 08:55hgbotNote Added: 0098415
2017-08-23 09:33mtaalReview Assigned To => mtaal
2017-08-23 15:55mtaalNote Added: 0098619
2017-08-28 10:57mtaalNote Added: 0098665
2017-08-28 10:57mtaalStatusresolved => new
2017-08-28 10:57mtaalResolutionfixed => open
2017-08-28 11:51marvintmNote Added: 0098666
2017-08-30 14:48jorge-garciaAssigned Toranjith_qualiantech_com => migueldejuana
2017-09-11 15:29hgbotCheckin
2017-09-11 15:29hgbotNote Added: 0098947
2017-09-11 15:30hgbotCheckin
2017-09-11 15:30hgbotNote Added: 0098948
2017-09-11 15:30hgbotCheckin
2017-09-11 15:30hgbotNote Added: 0098949
2017-09-11 15:30hgbotStatusnew => resolved
2017-09-11 15:30hgbotResolutionopen => fixed
2017-09-11 15:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6cb47196c793a1f8b3e053600d09513bd25e292c [^]
2017-09-11 16:39migueldejuanaRelationship addedrelated to 0036826
2017-09-18 12:54mtaalNote Added: 0099106
2017-09-18 12:54mtaalStatusresolved => closed
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099294
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099376
2017-09-28 15:09migueldejuanaFile Added: issue35058Posterminal17Q1.diff
2017-09-28 16:01migueldejuanaFile Added: issue35058Posterminal16Q2.diff
2017-09-28 17:17migueldejuanaProposed Solution updated
2019-05-16 12:27marvintmRelationship addedhas duplicate 0040889
2019-05-16 14:49marvintmRelationship addedrelated to 0040890

Notes
(0094132)
malsasua   
2017-02-07 16:32   
The customer suggests a message as "receipt has not been completed totally" should be displayed
(0098364)
hgbot   
2017-08-03 13:19   
Repository: tools/automation/pi-mobile
Changeset: 94f49fe5ff6c4c1613ae5737485da85b223e4bfc
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Aug 03 16:47:39 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/94f49fe5ff6c4c1613ae5737485da85b223e4bfc [^]

Verifies issue 35058 : Modified MobileCoreTerminalHelper to truncate obpos_error and obpos_error_line

---
M src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java
---
(0098365)
hgbot   
2017-08-03 13:19   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 18e082088d48792f1f85bc206f464eb19602917a
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Aug 03 16:47:43 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/18e082088d48792f1f85bc206f464eb19602917a [^]

Related to issue 35058 : Adding recordId in ImportEntry

* If JsonData is added in ImportEntry, respective id of the Jsondata must be updated in recordId column

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java
---
(0098366)
hgbot   
2017-08-03 13:19   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d2eed2c0da23faacf0e5109b39cbb00088f8e405
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Aug 03 16:47:36 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d2eed2c0da23faacf0e5109b39cbb00088f8e405 [^]

Related to issue 35058 : Create table obpos_error_line to maintain receipt errors

* If error occurs in OrderLoader, then receipt id and associated receipt id should be added to "obpos_error_line" table.
  Table obpos_error_line will be used to validate if receipt has not completely synced

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_TABLE.xml
M src/org/openbravo/retail/posterminal/ClearErrorActionHandler.java
M src/org/openbravo/retail/posterminal/POSDataSynchronizationErrorHandler.java
M src/org/openbravo/retail/posterminal/PaidReceipts.java
M web/org.openbravo.retail.posterminal/js/components/modalpaidreceipts.js
A src-db/database/model/tables/OBPOS_ERRORS_LINE.xml
---
(0098367)
hgbot   
2017-08-03 13:19   
Repository: erp/devel/pi
Changeset: 5c0c3e9c06ffdd3c7b1e95e2dd81071944d9458d
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Aug 03 16:48:09 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/5c0c3e9c06ffdd3c7b1e95e2dd81071944d9458d [^]

Related to issue 35058 : Adding recordId column to c_import_entry, c_import_entry_archeive table

* If JsonData is added in ImportEntry, respective id of the Jsondata must be updated in recordId column

---
M src-db/database/model/tables/C_IMPORT_ENTRY.xml
M src-db/database/model/tables/C_IMPORT_ENTRY_ARCHIVE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src/org/openbravo/service/importprocess/ImportEntryManager.java
---
(0098415)
hgbot   
2017-08-08 08:55   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 50fd60a8a585f848d0c3f5d09aa2339b2d19e0df
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Aug 08 12:24:52 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/50fd60a8a585f848d0c3f5d09aa2339b2d19e0df [^]

Related to issue 35058 : Create table obpos_error_line to maintain receipt errors

* If error occurs in OrderLoader, then receipt id and associated receipt id should be added to "obpos_error_line" table.
  Table obpos_error_line will be used to validate if receipt has not completely synced

---
M src/org/openbravo/retail/posterminal/POSDataSynchronizationErrorHandler.java
---
(0098619)
mtaal   
2017-08-23 15:55   
Review remarks:
Larger remarks:
- there is an obpos_errors_line table probably to handle multiple orders by pos_error, but I don't think it is needed as a separate pos_error record is created for each ticket/order
- on the other hand, for importentry: the json can contain more than one order, the current code for import entry only handles if there is one order in the json as there is only one recordid column. I think importentry would need to have an importentry line table to handle this, but this can get really cumbersome. So I would suggest differently. As the case that an import entry is in error should not happen often I would handle it in the paidreceiptsheader to load the import entries from the same pos terminal for the data type Order in error and just parse/search the json for the orderids. This is probably handier than having a separate import entry line table.

Smaller remarks:
- The check order in error, only checks the obpos error but not import entry in error state.
- Also include the json message in the logged error message [2]
- Why is this line needed [1]:
      orderIdList.remove(null);

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d2eed2c0da23faacf0e5109b39cbb00088f8e405#l7.51 [^]

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/18e082088d48792f1f85bc206f464eb19602917a#l1.29 [^]

[3]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d2eed2c0da23faacf0e5109b39cbb00088f8e405#l8.38 [^]
(0098665)
mtaal   
2017-08-28 10:57   
see code review comments
(0098666)
marvintm   
2017-08-28 11:51   
Hi,

Regarding the obpos_errors_line table, I think the use-case for it is the following:

- Create ticket 1
- Create ticket 2
- Make a verified return of ticket 1 and 2 on the same ticket.
- This verified return then fails in the backend for some reason, so a single error is created, but this error affects both ticket 1 and 2, because it should not be possible to return either 1 or 2.

I agree that we also need to handle the import entry case, and it's better to avoid creating a table in this case because getting an import entry in error status in the Web POS is a very unlikely case (in most cases, we create errors in the errors table instead of leaving the import entry in error status).

So for the import entry case, it's better to just go through the import entries in error status and verify that none of them references the id we are interested in.
(0098947)
hgbot   
2017-09-11 15:29   
Repository: erp/devel/pi
Changeset: 93358be727d8fd51ca7fe0f8849d6ac6227c70b8
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri Sep 08 14:49:36 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/93358be727d8fd51ca7fe0f8849d6ac6227c70b8 [^]

Related to issue 0035058: it is possible to return twice the same receipt

- Backout changeset 5c0c3e9c06ff
- We won't need a new column in ImportEntry because we will look for ids inside the json

---
M src-db/database/model/tables/C_IMPORT_ENTRY.xml
M src-db/database/model/tables/C_IMPORT_ENTRY_ARCHIVE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src/org/openbravo/service/importprocess/ImportEntryManager.java
---
(0098948)
hgbot   
2017-09-11 15:30   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4938ba49119cd857255c6c66a823bf8c6141cd47
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri Sep 08 14:50:58 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4938ba49119cd857255c6c66a823bf8c6141cd47 [^]

Related to issue 0035058: it is possible to return twice the same receipt

- Backout changeset 18e082088d48
- The recordId won't exist

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java
---
(0098949)
hgbot   
2017-09-11 15:30   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6cb47196c793a1f8b3e053600d09513bd25e292c
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Sep 11 15:27:51 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6cb47196c793a1f8b3e053600d09513bd25e292c [^]

Fixed issue 0035058: it is possible to return twice the same receipt

- Save order and lines owner sales order id(return) and check them in obposErrors and in importEntry

---
M src/org/openbravo/retail/posterminal/PaidReceiptLinesProperties.java
M src/org/openbravo/retail/posterminal/PaidReceipts.java
---
(0099106)
mtaal   
2017-09-18 12:54   
Reviewed and tested
(0099294)
hudsonbot   
2017-09-21 16:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test
(0099376)
hudsonbot   
2017-09-21 16:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test