Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038845Retail ModulesWeb POSpublic2018-06-26 17:502018-07-09 12:44
asiermartirena 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
 
migueldejuana
No
0038845: The related receipts of an order are not being loaded correctly
When having the 'Open related receipts' functionality configured for a POS Terminal Type, the opened related documents are not being selected correctly.

The popup that appears to select the receipts to load is not managing correctly the orders, and is possible to load a ticket that is not selected, and a ticket that is selected is not loaded.
In the POS Terminal Type window, set the 'Open related receipts' check activated.

Load the Web POS.
Created three layaways for the 'Arturo Montoro' without any payment.
Open the 'Open receipt' selector, and select one of those three layaways to load in the Web POS.
The popup to open the related receipts appears with the other two orders.
Uncheck the first order and click the 'Apply' button.

Realize that in addition to the initial order, the first order is being loaded instead of the second one, when the first one was the unchecked order.
Attached the proposed solution in an export file.
No tags attached.
? issue_38845.export (1,728) 2018-06-26 17:57
https://issues.openbravo.com/file_download.php?file_id=11903&type=bug
Issue History
2018-06-26 17:50asiermartirenaNew Issue
2018-06-26 17:50asiermartirenaAssigned To => Retail
2018-06-26 17:50asiermartirenaResolution time => 1531173600
2018-06-26 17:50asiermartirenaTriggers an Emergency Pack => No
2018-06-26 17:57asiermartirenaFile Added: issue_38845.export
2018-06-26 17:58asiermartirenaProposed Solution updated
2018-06-29 12:15ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2018-06-29 12:15ranjith_qualiantech_comStatusnew => scheduled
2018-07-05 14:06hgbotCheckin
2018-07-05 14:06hgbotNote Added: 0105639
2018-07-05 14:06hgbotStatusscheduled => resolved
2018-07-05 14:06hgbotResolutionopen => fixed
2018-07-05 14:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/382e07c384576868b38187818bb5a118f30c1aeb [^]
2018-07-09 12:44migueldejuanaReview Assigned To => migueldejuana
2018-07-09 12:44migueldejuanaNote Added: 0105674
2018-07-09 12:44migueldejuanaStatusresolved => closed

Notes
(0105639)
hgbot   
2018-07-05 14:06   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 382e07c384576868b38187818bb5a118f30c1aeb
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Thu Jul 05 17:36:15 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/382e07c384576868b38187818bb5a118f30c1aeb [^]

Fixed issue 38845: The related receipts of an order are not being loaded correctly

Now, to remove a record from the this.selectedOrders array (the array that stores the orders to load) a 'for' loop is used instead of the 'indexOf' function, that was not working correctly. Also, when adding again an order to the array, instead of introducing the full backbone model, only the json with the properties is stored, to maintain the consistency.

---
M web/org.openbravo.retail.posterminal/js/components/openRelatedReceiptsModal.js
---
(0105674)
migueldejuana   
2018-07-09 12:44   
Tested and reviewed