Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041448Retail ModulesWeb POSpublic2019-07-24 16:312019-07-25 16:45
aaroncalero 
ranjith_qualiantech_com 
urgentmajorhave not tried
closedfixed 
5
 
RR19Q4 
adrianromero
No
0041448: Receipt is not loaded correctly in WebPOS when one of the addresses is not active
Receipt is not loaded correctly in WebPOS when one of the addresses is not active. Some lines are not loaded at all, changing the total amount of the ticket loaded in webpos.
Log in backend.
Go to the Preference window and configure the following preferences:
* 'Enable Remote for Product' with value Y
* 'Enable Remote for Customer' with value Y

Log in WebPOS
Search for the customer Carl Studson
Add a new address for the customer.

Create a new ticket
Assign the customer Carl Studson
Assing one of the addresses for shipping and the other for invoicing.
Add three different products to the ticket.
Complete the receipt.

Log in backend, go to the Business Partner window, find Carl Studson and deactivate the shipping address used in the ticket.

Go back to WebPOS and try to load the ticket again.

Randomly one or two lines won't load, and the ticket total amount will change.
The problem seems to be on the newPaidReceipt function [1]
If at least one of the locations is not available in Web POS (i.e. because it was deactivated) the code calls loadBusinesPartner and in its callback it is calling locationForBpartner, which eventually calls loadProducts, which adds the lines to the ticket.
At the same time, loadBusinesPartner executes most of the newPaidReceipt code again when it finishes, which causes duplicated calls to locationForBpartner (and finally to loadProducts)


[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/web/org.openbravo.retail.posterminal/js/model/order.js#l10071 [^]
No tags attached.
related to defect 0041513 closed ranjith_qualiantech_com A receipt cannot be returned correctly in WebPOS when one of the addresses is not active 
patch issue 41448 source posterminal.patch (1,254) 2019-07-25 09:12
https://issues.openbravo.com/file_download.php?file_id=13174&type=bug
Issue History
2019-07-24 16:31aaroncaleroNew Issue
2019-07-24 16:31aaroncaleroAssigned To => Retail
2019-07-24 16:31aaroncaleroResolution time => 1565128800
2019-07-24 16:31aaroncaleroTriggers an Emergency Pack => No
2019-07-24 16:35aaroncaleroSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19191#r19191
2019-07-24 16:43aaroncaleroProposed Solution updated
2019-07-24 16:49aaroncaleroDescription Updatedbug_revision_view_page.php?rev_id=19193#r19193
2019-07-25 08:38ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-07-25 09:12ranjith_qualiantech_comFile Added: issue 41448 source posterminal.patch
2019-07-25 09:35ranjith_qualiantech_comStatusnew => scheduled
2019-07-25 14:34hgbotCheckin
2019-07-25 14:34hgbotNote Added: 0113647
2019-07-25 14:34hgbotStatusscheduled => resolved
2019-07-25 14:34hgbotResolutionopen => fixed
2019-07-25 14:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c8ccf50bc538a92d5a7303fa394555bff3abed0f [^]
2019-07-25 16:45adrianromeroReview Assigned To => adrianromero
2019-07-25 16:45adrianromeroNote Added: 0113649
2019-07-25 16:45adrianromeroStatusresolved => closed
2019-07-25 16:45adrianromeroFixed in Version => RR19Q4
2019-07-31 17:32guillermogilRelationship addedrelated to 0041513

Notes
(0113647)
hgbot   
2019-07-25 14:34   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c8ccf50bc538a92d5a7303fa394555bff3abed0f
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 25 18:03:59 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c8ccf50bc538a92d5a7303fa394555bff3abed0f [^]

Fixed issue 41448 : Customer and Location should be loaded from backoffice

* Customer and Location should be loaded from backoffice if its not present in
  the local db.
* Backoffice Customer and location will be updated in loadBusinesPartner callback.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0113649)
adrianromero   
2019-07-25 16:45   
Verified