Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036007Retail ModulesWeb POSpublic2017-05-16 12:162017-06-02 14:56
aaroncalero 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR17Q3 
marvintm
No
0036007: Return documentNo is not being set when service quantity rules are being applied
When the return document sequence in configured, when all lines in a ticket are negative the document number of the ticket is changed to follow the return sequence.
When a ticket contains a product and a related service, and the product is returned using the Return Line option, the service quantity rules are triggered and the service is also returned. However when this happens the document number of the ticket is not updated and it still shows the ticket sequence (instead of the return sequence).
Login in backend, go to the POS Terminal window, find the VBS-1 record and configure a Return No Prefix (i.e. VBSRET1).

Login in web pos.
Create a new ticket.
Add an Avalanche transceiver classic and a Phone consulting MK2 related to it.
Click on the Avalanche transceiver classic line and then on Return Line.
The Phone consulting MK2 qty will also change to -1, however the document number of the ticket will remain with the standard sequence.
Select the Phone consulting MK2 line and delete it. Now the document number will correctly show the return document sequence.
The main logic to change the document sequence from tickets to returns is placed inside the code that is also in charge of applying the quantity rules for services[1].
This code is protected against parallel executions using several control flags.
When the quantity rules are triggered, and the ticket changes into a negative ticket, the control flags prevent a new execution of the code, so the document change logic is not executed.
The document change logic should be placed either outside the "controlled code", or in a different handler to prevent these situations.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/cd13ce1880ca/web/org.openbravo.retail.posterminal/js/components/order.js#l706 [^]
No tags attached.
related to defect 0035971 closed ranjith_qualiantech_com It is possible to synchronize a POS Order with a Return document number 
Issue History
2017-05-16 12:16aaroncaleroNew Issue
2017-05-16 12:16aaroncaleroAssigned To => Retail
2017-05-16 12:16aaroncaleroResolution time => 1496095200
2017-05-16 12:16aaroncaleroTriggers an Emergency Pack => No
2017-05-17 12:54ranjith_qualiantech_comRelationship addedrelated to 0035971
2017-05-17 14:38ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-05-17 14:38ranjith_qualiantech_comStatusnew => scheduled
2017-05-19 11:48hgbotCheckin
2017-05-19 11:48hgbotNote Added: 0096681
2017-05-19 11:48hgbotStatusscheduled => resolved
2017-05-19 11:48hgbotResolutionopen => fixed
2017-05-19 11:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d1c919bcc91234e41caa589104776b85ad51e007 [^]
2017-05-19 11:49hgbotCheckin
2017-05-19 11:49hgbotNote Added: 0096682
2017-06-02 14:56marvintmReview Assigned To => marvintm
2017-06-02 14:56marvintmStatusresolved => closed
2017-06-02 14:56marvintmFixed in Version => RR17Q3

Notes
(0096681)
hgbot   
2017-05-19 11:48   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d1c919bcc91234e41caa589104776b85ad51e007
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri May 19 15:18:01 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d1c919bcc91234e41caa589104776b85ad51e007 [^]

Fixed issue 36007 : Return DocumentNo should be updated whenever receipt line properties changed

* New Listener created for Order line to check documentNo

---
M web/org.openbravo.retail.posterminal/js/components/order.js
---
(0096682)
hgbot   
2017-05-19 11:49   
Repository: tools/automation/pi-mobile
Changeset: 62f5b9a6e9fde24adf05784211595d19a2edd94a
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri May 19 15:15:32 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/62f5b9a6e9fde24adf05784211595d19a2edd94a [^]

Verifies issue 36007 : Added automated test 'I36007_VerifiedReturnsDocumentNoWithServices'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/returns/I36007_VerifiedReturnsDocumentNoWithServices.java
---