Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037674
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POSmajorhave not tried2017-12-05 16:202018-01-25 11:26
ReporteraaroncaleroView Statuspublic 
Assigned Toranjith_qualiantech_com 
PrioritynormalResolutionfixedFixed in VersionRR18Q1
StatusclosedFix in branchFixed in SCM revisionf881064aaca4
ProjectionnoneETAnoneTarget VersionRR18Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037674: The cancellation of the OBPOS_PreOrderSave hook is not correctly handled in Pay Open Tickets

DescriptionThe cancellation of the OBPOS_PreOrderSave hook is not handled correctly in Pay Open Tickets. Depending on which ticket cancels the hook, it might leave the previous tickets saved in websql with the hasbeenpaid attribute to 'Y', but not synchronized, making it impossible to update them afterwards.
This can lead to cashup differences if the payments change between synchronization retries (because the "locked" ticket won't be updated).
Steps To ReproduceLogin in web pos.
Create two tickets in draft and add products to both of them.
Go to the Menu > Pay Open Tickets and select the tickets created in the first step.
Open the browser console and execute the following:
OB.MobileApp.model.attributes.permissions["OBMOBC_SynchronizedMode"] = true
OB.FAILCONDITION = true
OB.FAILDOCNO = the_documentNo_of_the_second_ticket
OB.UTIL.HookManager.registerHook('OBPOS_PreOrderSave', function(a,b){
  if(OB.FAILCONDITION && a.receipt.get('documentNo') === OB.FAILDOCNO){
    OB.MobileApp.model.hideSynchronizingDialog();
    a.cancellation = true;
  }
  OB.UTIL.HookManager.callbackExecutor(a,b);
})

Add a full payment in Card and click on Done. The process will stop because of the hook.
Remove the Card payment.
Add a full payment in Voucher.
Execute the following in the browser console:
OB.FAILCONDITION = false;

Click on the Done button again. This time the hook will not cancel the execution and the tickets will be synchronized, although the following error will appear in the console:
[checkBlocked][no-transaction][hasbeenpaid_is_yes] Wrong write in c_order avoided.

Load both tickets again in WebPOS:
The first ticket will be paid with Card (although the card payment was completely removed).
The second ticket will be paid with Voucher.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0037436 closedranjith_qualiantech_com The cancellation of the OBPOS_PreOrderSave hook is not correctly handled in Pay Open Tickets 

-  Notes
(0101803)
hgbot (developer)
2018-01-19 15:10

Repository: retail/backports/3.0RR18Q1/org.openbravo.retail.posterminal
Changeset: f881064aaca4b0fe0da323aba49b74ad47b3d8a6
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jan 19 19:40:28 2018 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR18Q1/org.openbravo.retail.posterminal/rev/f881064aaca4b0fe0da323aba49b74ad47b3d8a6 [^]

Fixed issue 37674 : Restore Receipt and Payments on PreOrderSave hook cancel

* In Pay open tickets, if PreOrderSave hook is cancelled then receipts and payments should be restored with original values
* Refactored multiorder close function, (validate multiorder with PreOrderSave hook, save receipt, runSyncProcess)

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---

- Issue History
Date Modified Username Field Change
2018-01-18 18:32 marvintm Type defect => backport
2018-01-18 18:32 marvintm Target Version => RR18Q1
2018-01-19 15:10 hgbot Checkin
2018-01-19 15:10 hgbot Note Added: 0101803
2018-01-19 15:10 hgbot Status scheduled => resolved
2018-01-19 15:10 hgbot Resolution open => fixed
2018-01-19 15:10 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5d2c8347e44c29bd53a4130dbb341602d46a1695 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q1/org.openbravo.retail.posterminal/rev/f881064aaca4b0fe0da323aba49b74ad47b3d8a6 [^]
2018-01-25 11:26 marvintm Review Assigned To => marvintm
2018-01-25 11:26 marvintm Status resolved => closed
2018-01-25 11:26 marvintm Fixed in Version => RR18Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker