Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035058
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] Web POSminoralways2017-01-26 13:172017-09-28 17:17
ReportermalsasuaView Statuspublic 
Assigned Tomigueldejuana 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision6cb47196c793
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035058: it is possible to return twice the same receipt

Descriptionusing 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
Steps To Reproducein 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
Proposed Solutionsome 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.
TagsNo tags attached.
Attached Filesdiff file icon issue35058Posterminal17Q1.diff [^] (61,040 bytes) 2017-09-28 15:09 [Show Content]
diff file icon issue35058Posterminal16Q2.diff [^] (64,576 bytes) 2017-09-28 16:01 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 0040889 closedRetail Verified Return should confirm that the order to return is not present in Errors While Importing 
related to defect 0036826 newRetail Add tests for all cases of issue 35058 
related to defect 0040890 closedranjith_qualiantech_com Cancel and replace should review Errors While importing to see if the original ticket has been canceled before 

-  Notes
(0094132)
malsasua (developer)
2017-02-07 16:32

The customer suggests a message as "receipt has not been completed totally" should be displayed
(0098364)
hgbot (developer)
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 (developer)
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 (developer)
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 (developer)
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 (developer)
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 (manager)
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 (manager)
2017-08-28 10:57

see code review comments
(0098666)
marvintm (manager)
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 (developer)
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 (developer)
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 (developer)
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 (manager)
2017-09-18 12:54

Reviewed and tested
(0099294)
hudsonbot (developer)
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 (developer)
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

- Issue History
Date Modified Username Field Change
2017-01-26 13:17 malsasua New Issue
2017-01-26 13:17 malsasua Assigned To => Retail
2017-01-26 13:17 malsasua Triggers an Emergency Pack => No
2017-01-26 17:15 malsasua Proposed Solution updated
2017-02-07 16:32 malsasua Note Added: 0094132
2017-07-18 09:26 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2017-07-18 09:26 ranjith_qualiantech_com Status new => scheduled
2017-08-03 13:19 hgbot Checkin
2017-08-03 13:19 hgbot Note Added: 0098364
2017-08-03 13:19 hgbot Checkin
2017-08-03 13:19 hgbot Note Added: 0098365
2017-08-03 13:19 hgbot Checkin
2017-08-03 13:19 hgbot Note Added: 0098366
2017-08-03 13:19 hgbot Checkin
2017-08-03 13:19 hgbot Note Added: 0098367
2017-08-03 13:26 ranjith_qualiantech_com Status scheduled => resolved
2017-08-03 13:26 ranjith_qualiantech_com Resolution open => fixed
2017-08-08 08:55 hgbot Checkin
2017-08-08 08:55 hgbot Note Added: 0098415
2017-08-23 09:33 mtaal Review Assigned To => mtaal
2017-08-23 15:55 mtaal Note Added: 0098619
2017-08-28 10:57 mtaal Note Added: 0098665
2017-08-28 10:57 mtaal Status resolved => new
2017-08-28 10:57 mtaal Resolution fixed => open
2017-08-28 11:51 marvintm Note Added: 0098666
2017-08-30 14:48 jorge-garcia Assigned To ranjith_qualiantech_com => migueldejuana
2017-09-11 15:29 hgbot Checkin
2017-09-11 15:29 hgbot Note Added: 0098947
2017-09-11 15:30 hgbot Checkin
2017-09-11 15:30 hgbot Note Added: 0098948
2017-09-11 15:30 hgbot Checkin
2017-09-11 15:30 hgbot Note Added: 0098949
2017-09-11 15:30 hgbot Status new => resolved
2017-09-11 15:30 hgbot Resolution open => fixed
2017-09-11 15:30 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6cb47196c793a1f8b3e053600d09513bd25e292c [^]
2017-09-11 16:39 migueldejuana Relationship added related to 0036826
2017-09-18 12:54 mtaal Note Added: 0099106
2017-09-18 12:54 mtaal Status resolved => closed
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099294
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099376
2017-09-28 15:09 migueldejuana File Added: issue35058Posterminal17Q1.diff
2017-09-28 16:01 migueldejuana File Added: issue35058Posterminal16Q2.diff
2017-09-28 17:17 migueldejuana Proposed Solution updated
2019-05-16 12:27 marvintm Relationship added has duplicate 0040889
2019-05-16 14:49 marvintm Relationship added related to 0040890


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker