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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042603
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2019-12-18 18:542019-12-20 09:32
ReporterngarciaView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityurgentResolutionfixedFixed in VersionRR20Q1
StatusclosedFix in branchFixed in SCM revision3b75f5051534
ProjectionnoneETAnoneTarget Version
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

0042603: If a payment is modified in OBPOS_postAddPayment and the POS is refreshed (F5) that change is lost

DescriptionIf a payment is modified in OBPOS_postAddPayment and the POS is refreshed (F5) that change is lost
Steps To ReproduceIn the POS:
   Open the developers tools of the browser
   Add the following code in the console:
      OB.UTIL.HookManager.registerHook('OBPOS_postAddPayment', function(args, callbacks) {
    args.paymentAdded.set('newproperty', true);
    OB.UTIL.HookManager.callbackExecutor(args, callbacks);
});
   Create a new receipt
   Add a payment to it
   Check the 'newproperty' is present in the payment by
      OB.MobileApp.model.receipt.attributes.payments.models[0].attributes
   Push F5
   Check the 'newproperty' is not present in the payment by
      OB.MobileApp.model.receipt.attributes.payments.models[0].attributes
   Complete the receipt and check the JSON is sent without newproperty
Proposed SolutionChange the logic of saving the ticket after the hook:

if (saveChanges && !payment.get('changePayment')) {
   order.adjustPayment();
   order.trigger('displayTotal');
   order.save();
   order.trigger('saveCurrent');
}
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
causes defect 0042671 closedranjith_qualiantech_com Save on PostAddPaymentHook breaks custom functionality 

-  Notes
(0116447)
hgbot (developer)
2019-12-20 03:39

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3b75f505153444ce248669df317b4702da2330cf
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Dec 20 08:08:45 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3b75f505153444ce248669df317b4702da2330cf [^]

Fixed issue 42603 : Order should be saved after OBPOS_postAddPayment hook completed

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

- Issue History
Date Modified Username Field Change
2019-12-18 18:54 ngarcia New Issue
2019-12-18 18:54 ngarcia Assigned To => Retail
2019-12-18 18:54 ngarcia Resolution time => 1578438000
2019-12-18 18:54 ngarcia Triggers an Emergency Pack => No
2019-12-18 18:54 ngarcia Issue Monitored: networkb
2019-12-19 12:35 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2019-12-20 03:19 ranjith_qualiantech_com Status new => scheduled
2019-12-20 03:39 hgbot Checkin
2019-12-20 03:39 hgbot Note Added: 0116447
2019-12-20 03:39 hgbot Status scheduled => resolved
2019-12-20 03:39 hgbot Resolution open => fixed
2019-12-20 03:39 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3b75f505153444ce248669df317b4702da2330cf [^]
2019-12-20 09:32 marvintm Review Assigned To => marvintm
2019-12-20 09:32 marvintm Status resolved => closed
2019-12-20 09:32 marvintm Fixed in Version => RR20Q1
2020-01-02 08:54 guillermogil Relationship added causes 0042671


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker