Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034148Retail ModulesWeb POSpublic2016-09-30 13:302016-10-24 09:37
adrianromero 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
RR17Q1 
marvintm
No
0034148: [SER QA 1820] Closing layaway fails if the preference Save Removed tickets is activated
If The preference Web POS Save Removed Tickets is activated then closing a layaway that has been loaded from the backend is sent to the server and an exception is thrown.

Actually it does not save inconsistent data because the order loader fails when the POS tries to sent incorrectly a layaway to be saved as deleted.
* Set the preference Web POS Save Removed Tickets to 'Y'
* Create a layaway and process it without any payment
* Go to the menu option "Layaways" and select the layaway created
* Tap on the button "X" and close the layaway

Observe in the Openbravo logs the exception raised:

java.lang.NullPointerException
    at org.openbravo.retail.posterminal.UpdateCashup.getAndUpdateCashUp(UpdateCashup.java:90)
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:209)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:198)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:155)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:87)
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:42)
    at org.openbravo.retail.posterminal.importprocess.OrderImportEntryProcessor$OrderLoaderRunnable.processEntry(OrderImportEntryProcessor.java:58)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:369)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:291)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Tapping on "X" to close the loaded layaway does not have to send the document to the server side, just remove it form the editing documents in the Web POS. The proposed patch just does this. if the ticket is not editable the preference to save deleted tickets is not checked.
SER-QA
patch Issue1820_LayawayCloseIssue.patch (1,157) 2016-10-04 09:19
https://issues.openbravo.com/file_download.php?file_id=9887&type=bug
Issue History
2016-09-30 13:30adrianromeroNew Issue
2016-09-30 13:30adrianromeroAssigned To => prakashmurugesan88
2016-09-30 13:30adrianromeroTriggers an Emergency Pack => No
2016-09-30 13:48adrianromeroSummaryClosing layaway fails if the preference Save Removed tickets is activated => [SER QA 1820] Closing layaway fails if the preference Save Removed tickets is activated
2016-10-04 09:17adrianromeroTag Attached: SER-QA
2016-10-04 09:19adrianromeroResolution time => 1476741600
2016-10-04 09:19adrianromeroProposed Solution updated
2016-10-04 09:19adrianromeroFile Added: Issue1820_LayawayCloseIssue.patch
2016-10-04 09:21adrianromeroDescription Updatedbug_revision_view_page.php?rev_id=13313#r13313
2016-10-04 09:22adrianromeroAssigned Toprakashmurugesan88 => Retail
2016-10-04 09:45ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2016-10-04 09:47ranjith_qualiantech_comStatusnew => scheduled
2016-10-14 09:25hgbotCheckin
2016-10-14 09:25hgbotNote Added: 0090575
2016-10-14 09:26hgbotCheckin
2016-10-14 09:26hgbotNote Added: 0090576
2016-10-14 09:26hgbotStatusscheduled => resolved
2016-10-14 09:26hgbotResolutionopen => fixed
2016-10-14 09:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b8709e58401bff9661f99cda4320c92c303b89f3 [^]
2016-10-21 13:06marvintmNote Added: 0090765
2016-10-24 09:36marvintmNote Added: 0090803
2016-10-24 09:37marvintmReview Assigned To => marvintm
2016-10-24 09:37marvintmStatusresolved => closed
2016-10-24 09:37marvintmFixed in Version => RR17Q1

Notes
(0090575)
hgbot   
2016-10-14 09:25   
Repository: tools/automation/pi-mobile
Changeset: d6b206536e43ad6cfeff30528793eeef1616b7b9
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Oct 14 12:50:15 2016 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/d6b206536e43ad6cfeff30528793eeef1616b7b9 [^]

Verifies issue 34148 : Added automated test 'I34148_VerifyPrefSaveRemovedTicket'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I34148_VerifyPrefSaveRemovedTicket.java
---
(0090576)
hgbot   
2016-10-14 09:26   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b8709e58401bff9661f99cda4320c92c303b89f3
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Oct 14 12:50:39 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b8709e58401bff9661f99cda4320c92c303b89f3 [^]

Fixes issue 34148 : Preference "Save Removed tickets" should work if the receipt is editable

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0090765)
marvintm   
2016-10-21 13:06   
The change can be slightly simpler: instead of adding yet another condition to the removeOrder function, it would be better just not to call the function if the order is not editable. In this way, the code would be easier to understand.
(0090803)
marvintm   
2016-10-24 09:36   
Finally it has been decided that the current change is correct, as there are several things (such as removing the order from the list) that need to happen even if the order is not editable.