Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037769Retail ModulesWeb POSpublic2018-01-30 12:572018-02-26 09:08
malsasua 
rqueralta 
normalmajoralways
closedfixed 
5
RR17Q4 
RR18Q2 
marvintm
No
0037769: Verified returns is not working with scaled products: total line is set to 0
When a line of scaled product is selected in verified returns functionality, the line is added with 0 amount in the ticket
. reproducible in 17Q4, in pi there is another previous error
BO:
. create a new product (p1), with "is scaled" Y
. add in pricelist (price: 5) and assortment
. configure "pos terminal":
    hw manager: http://localhost:8090/printer [^] [^]
    Scale: http://localhost:8090/scale [^] [^]
. open hw manager in localhost

POS:
. create new ticket:
  . new line: p1 -> qty: 1.181
  . total ticket 5.91
  . pay ticket
. open verifier return selector:_
   . select previous ticket
   . select all lines and add them to the current ticket
     . line 1: p1 - qty: 1.181 - total 0 -> WRONG:it should be -5.91
     . total ticket: 0 -> WRONG: it should be -5.91
(see attachment)
No tags attached.
related to defect 0037762 closed rqueralta Verified returns is not working with scaled products 
related to defect 0037771 closed rqueralta Verified returns is not working with scaled products: loading window never is hidden 
png error.png (183,103) 2018-01-30 12:59
https://issues.openbravo.com/file_download.php?file_id=11501&type=bug
png
Issue History
2018-01-30 12:57malsasuaNew Issue
2018-01-30 12:57malsasuaAssigned To => Retail
2018-01-30 12:57malsasuaResolution time => 1519254000
2018-01-30 12:57malsasuaTriggers an Emergency Pack => No
2018-01-30 12:58malsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16609#r16609
2018-01-30 12:59malsasuaFile Added: error.png
2018-01-30 12:59malsasuaRelationship addedrelated to 0037762
2018-01-30 13:01malsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16611#r16611
2018-01-30 13:02malsasuaRelationship addedrelated to 0037771
2018-01-30 22:15rqueraltaAssigned ToRetail => rqueralta
2018-01-30 22:22rqueraltaStatusnew => scheduled
2018-02-06 15:21hgbotCheckin
2018-02-06 15:21hgbotNote Added: 0102220
2018-02-06 15:21hgbotStatusscheduled => resolved
2018-02-06 15:21hgbotResolutionopen => fixed
2018-02-06 15:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1009a30c23c729e4033b592b12e40d1e034fb7d4 [^]
2018-02-06 19:32marvintmNote Added: 0102228
2018-02-06 19:32marvintmStatusresolved => new
2018-02-06 19:32marvintmResolutionfixed => open
2018-02-08 14:33hgbotCheckin
2018-02-08 14:33hgbotNote Added: 0102272
2018-02-08 16:09marvintmStatusnew => scheduled
2018-02-08 16:09marvintmStatusscheduled => resolved
2018-02-08 16:09marvintmResolutionopen => fixed
2018-02-26 09:08marvintmReview Assigned To => marvintm
2018-02-26 09:08marvintmStatusresolved => closed
2018-02-26 09:08marvintmFixed in Version => RR18Q2

Notes
(0102220)
hgbot   
2018-02-06 15:21   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1009a30c23c729e4033b592b12e40d1e034fb7d4
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Fri Feb 02 14:43:38 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1009a30c23c729e4033b592b12e40d1e034fb7d4 [^]

Fixed issue 37769: Verified returns is not working with scaled products: total
line is set to 0

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0102228)
marvintm   
2018-02-06 19:32   
The fix is not exactly correct. In this case, the main problem comes from the fact that in the scale flow, the callback of the main _addProduct function is not executed. The solution shouldn't be just calculate the order, or the line, but to call the callback, so that we ensure that any other logic which may be required will also be executed.

Besides this, we should also most probably ensure that the hook OBPOS_PostAddProductToOrder, which should be executed always after a product is added to the order, is also called in this flow.
(0102272)
hgbot   
2018-02-08 14:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 570f8066840e820d7b973d21749591dc32b1e66c
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Wed Feb 07 14:17:27 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/570f8066840e820d7b973d21749591dc32b1e66c [^]

Related to issue 37769: Verified returns is not working with scaled products:
total line is set to 0

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---