Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037098Retail ModulesWeb POSpublic2017-10-18 11:062017-11-09 14:32
aaroncalero 
ranjith_qualiantech_com 
normalmajoralways
closedduplicate 
5
 
 
marvintm
OBPS
No
0037098: It is possible to click on Void Layaway before the calculateReceipt of the loaded layaway has finished
When a layaway is loaded in the POS, the calculateReceipt function is executed to generate the totals of the layaway.
When the Void Layaway menu option is used, the gross of the void layaway (total cash to return) is calculated based on the current total of the layaway and the payments added previously.
If the first calculateReceipt finishes after the void layaway has been clicked, then the calculatereceipt resets the gross of the layaway and the POS asks the cashier to return money when it should not.
Login in webpos
Create a new layaway, add some products, and synchronize the Layaway without payments by clicking on Layaway.
Open the browser console and execute this[1] code to implement a hook and make the calculateReceipt slow.
Go to the menu and load the previously created layaway.
Quickly, go to the menu and click on Void Layaway.
The POS will change to the payments tab, and after a few seconds the payment tab will show "<amount_of_the_layaway>€ remaining to return." instead of "Total is zero. No payment needed".

[1] OB.UTIL.HookManager.registerHook('OBPOS_PreCheckDiscount', function(args, callback){
setTimeout(function(){
  OB.UTIL.HookManager.callbackExecutor(args, callback);
}, 5000)
})
It should not be possible to click on the menu while the calculateReceipt of the loaded layaway is being executed.
No tags attached.
duplicate of design defect 0037044 closed jorge-garcia [SER QA 3365] Wrong ticket amount when action made before ticke total amount calculated 
Issue History
2017-10-18 11:06aaroncaleroNew Issue
2017-10-18 11:06aaroncaleroAssigned To => Retail
2017-10-18 11:06aaroncaleroOBNetwork customer => Yes
2017-10-18 11:06aaroncaleroResolution time => 1509490800
2017-10-18 11:06aaroncaleroTriggers an Emergency Pack => No
2017-10-18 11:18aaroncaleroSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16126#r16126
2017-10-23 09:12ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-10-23 09:13ranjith_qualiantech_comStatusnew => scheduled
2017-11-09 14:32marvintmReview Assigned To => marvintm
2017-11-09 14:32marvintmRelationship addedduplicate of 0037044
2017-11-09 14:32marvintmNote Added: 0100387
2017-11-09 14:32marvintmStatusscheduled => closed
2017-11-09 14:32marvintmResolutionopen => duplicate

Notes
(0100387)
marvintm   
2017-11-09 14:32   
Will be fixed as part of issue 37044