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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038847
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2018-06-27 13:472018-07-26 10:03
ReporterguilleaerView Statuspublic 
Assigned Toguilleaer 
PrioritynormalResolutionfixedFixed in VersionRR18Q4
StatusclosedFix in branchFixed in SCM revision3c658d4c71ce
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

0038847: Wrong asynchrony point in in cash managment process

DescriptionWrong asynchrony point in in cash managment process

file: cashmgmt.js
line: 172 & 184

this.model.get('cashMgmtDropEvents').on('click', function (model) {
  this.model.depsdropstosave.trigger('paymentDone', model,
  this.currentPayment);
  delete this.currentPayment;
}, this);

delete this.currentPayment -> is being executed after trigger, but trigger is creating asynchrony. This is wrong.

delete this.currentPayment should be executed when trigger execution really finishes. To do that trigger admits a callbacf function as a parameter. Is there where the instruction should be executed.
Steps To ReproduceAdd this log

      OB.info('[CashMgmnt] Items to be processed (Apart from new one): ' + JSON.stringify(this.model.depsdropstosave.models.map(function (item) {
        return item.get('id') + ' Amount: ' + item.get('amount') + ' origAmount: ' + item.get('origAmount') + ' currency: ' + item.get('isocode') + ' paymentMethodId: ' + item.get('paymentMethodId') + ' cashup_id: ' + item.get('cashup_id')
      })));

just before

delete this.currentPayment;

You will se that log will show that the cash managment action is not already added
TagsNo tags attached.
Attached Filesdiff file icon 38847_PI.diff [^] (4,290 bytes) 2018-06-28 17:21 [Show Content]
diff file icon 38847_2_PI.diff [^] (1,186 bytes) 2018-07-02 14:06 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0038848 closedguilleaer Poor log for cash management process 

-  Notes
(0105572)
hgbot (developer)
2018-07-04 14:12

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3c658d4c71ce95f1e520f743635820a3cee2adec
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Wed Jul 04 14:09:16 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3c658d4c71ce95f1e520f743635820a3cee2adec [^]

Fixed issue 38847: Fixed some asynchrony points in cash managment process

---
M web/org.openbravo.retail.posterminal/js/cashmgmt/model/cashmgmt-model.js
M web/org.openbravo.retail.posterminal/js/cashmgmt/view/cashmgmt.js
---

- Issue History
Date Modified Username Field Change
2018-06-27 13:47 guilleaer New Issue
2018-06-27 13:47 guilleaer Assigned To => Retail
2018-06-27 13:47 guilleaer Triggers an Emergency Pack => No
2018-06-28 15:27 guilleaer Relationship added related to 0038848
2018-06-28 16:01 egoitz Issue Monitored: egoitz
2018-06-28 17:20 guilleaer Assigned To Retail => guilleaer
2018-06-28 17:20 guilleaer Status new => scheduled
2018-06-28 17:21 guilleaer File Added: 38847_PI.diff
2018-06-28 17:42 guilleaer Resolution time => 1531951200
2018-07-02 14:06 guilleaer File Added: 38847_2_PI.diff
2018-07-04 14:12 hgbot Checkin
2018-07-04 14:12 hgbot Note Added: 0105572
2018-07-04 14:12 hgbot Status scheduled => resolved
2018-07-04 14:12 hgbot Resolution open => fixed
2018-07-04 14:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3c658d4c71ce95f1e520f743635820a3cee2adec [^]
2018-07-26 10:03 marvintm Review Assigned To => marvintm
2018-07-26 10:03 marvintm Status resolved => closed
2018-07-26 10:03 marvintm Fixed in Version => RR18Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker