Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033920Retail ModulesWeb POSpublic2016-09-07 14:282018-07-27 15:33
aaroncalero 
migueldejuana 
highmajoralways
closedfixed 
5
 
RR16Q4 
marvintm
No
0033920: [SERQA 1762] Quantity rules are wrongly calculated when creating a deferred sale
When a deferred sale for a service is created, and the same service is added from different lines (related to different product lines), the quantity rule is not correctly calculated, and the service line quantity is wrong.
The service needs to be defined with a quantity rule "Unique quantity", which means that the line qty should always be one.
Using standard Retail sampledata:
Login into the ERP, go to the Product Window, open the Customize Coat product and enable the "Allow deferred sales" checkbox (under the Service Product field group).
Verify that the quantity rule of the service is Unique Quantity.

Login in the web pos.
(1) Create and pay two tickets, with one unit of Coat on each.
(2) Load both tickets in web pos.
(3) Go to the first ticket and click on the related services button. Try to add the Customize Coat service.
(4) The Not Editable Receipt popup will appear, allowing to create a deferred sale. Select "* Create new Receipt" and click on apply. A new ticket will be created with a unit of Customize Coat. Note the document No. of the ticket.
(5) Go to the second ticket and click on the related services button. Try to add the Customize Coat service.
(6) The Not Editable Receipt popup will appear, allowing to create a deferred sale. Select the ticket with the service and click on Apply.
The service will be linked now to two different lines, and the quantity of the line will be 2, which is wrong. Since the service is configured as Unique Quantity, the line must have only une unit.
Attached a patch with a possible solution.
The problem is that after adding a deferred product, only the price rule calculation was triggered. The patch changes the event to fire the quantity rule calculation instead.
SER-QA
related to defect 0034084 new Retail Pending test to be developed 
diff Issue33920.diff (819) 2016-09-07 14:29
https://issues.openbravo.com/file_download.php?file_id=9794&type=bug
Issue History
2016-09-07 14:28aaroncaleroNew Issue
2016-09-07 14:28aaroncaleroAssigned To => Retail
2016-09-07 14:28aaroncaleroResolution time => 1474408800
2016-09-07 14:28aaroncaleroTriggers an Emergency Pack => No
2016-09-07 14:29aaroncaleroFile Added: Issue33920.diff
2016-09-07 14:31aaroncaleroSummaryQuantity rules are wrongly calculated when creating a deferred sale => [SERQA 1762] Quantity rules are wrongly calculated when creating a deferred sale
2016-09-07 14:31aaroncaleroTag Attached: SER-QA
2016-09-26 10:51migueldejuanaAssigned ToRetail => migueldejuana
2016-09-26 10:51migueldejuanaStatusnew => scheduled
2016-09-26 10:54VictorVillarResolution time1474408800 => 1475445600
2016-09-28 07:37hgbotCheckin
2016-09-28 07:37hgbotNote Added: 0090323
2016-09-28 07:37hgbotStatusscheduled => resolved
2016-09-28 07:37hgbotResolutionopen => fixed
2016-09-28 07:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bae23bf03d13fda42ba4609cdfea9413b05ca223 [^]
2016-09-30 12:02jorge-garciaRelationship addedrelated to 0034084
2016-10-10 13:40marvintmReview Assigned To => marvintm
2016-10-10 13:40marvintmStatusresolved => closed
2016-10-10 13:40marvintmFixed in Version => RR16Q4
2018-07-27 15:33hgbotCheckin
2018-07-27 15:33hgbotNote Added: 0105990

Notes
(0090323)
hgbot   
2016-09-28 07:37   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: bae23bf03d13fda42ba4609cdfea9413b05ca223
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Sep 26 12:00:31 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bae23bf03d13fda42ba4609cdfea9413b05ca223 [^]

Fixed issue 0033920: [SERQA 1762] Quantity rules are wrongly calculated when creating a deferred sale

- Trigger updateRelations per each line

---
M web/org.openbravo.retail.posterminal/js/components/modalselectopenreceipts.js
---
(0105990)
hgbot   
2018-07-27 15:33   
Repository: tools/automation/pi-mobile
Changeset: 06529464193a41c422054141da6beb216685c306
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Mon Jul 23 10:04:14 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/06529464193a41c422054141da6beb216685c306 [^]

Related to issue 33920: added automated test

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/I33920_VerifyQuantityRulesInDeferredSale.java
---