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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029302
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2015-03-16 18:532015-06-19 10:40
ReporterjecharriView Statuspublic 
Assigned Toaaroncalero 
PriorityurgentResolutionfixedFixed in VersionRR15Q3
StatusclosedFix in branchFixed in SCM revision9013ba1d307c
ProjectionnoneETAnoneTarget VersionRR15Q3
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

0029302: In paymentmethodcashup table one ticket can be added 2 times

DescriptionIn paymentmethodcashup table one ticket can be added 2 times. It seems that under some circumstances is possible to press 2 times done button and this will create the problem with paymentmethod cash up table.
Steps To Reproduce-Go to Web POS
-Do a ticket
-Press in total
-Add the payment
-Press done
-Before the order is saved press F5, you will be able to press again done button and the receipt will be added again to the paymentmethodcashup table
TagsNo tags attached.
Attached Filesdiff file icon transactions_refactor_mobile_core.diff [^] (4,866 bytes) 2015-04-20 16:50 [Show Content]
diff file icon transactions_refactor_retail_posterminal.diff [^] (20,173 bytes) 2015-04-20 16:51 [Show Content]
patch file icon Q2.1_posterminal_29302.patch [^] (16,991 bytes) 2015-06-16 09:23 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
depends on feature request 0029478RR15Q3 closedaaroncalero Provide an API to do transactional OB.Dal calls 
depends on backport 0030210RR15Q2.3 closedaaroncalero In paymentmethodcashup table one ticket can be added 2 times 

-  Notes
(0076311)
hgbot (developer)
2015-04-01 14:23

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c7d219d6065e4fd2ebce51011a459e16574f918e
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 01 14:21:37 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c7d219d6065e4fd2ebce51011a459e16574f918e [^]

Fixed issue 29302: In paymentmethodcashup table one ticket can be added 2 times

Refactored the ticket closing process to be done in a sql transaction. Now if the user reloads the application while the closing process is active, all the changes done to the local database will be rolled back

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---
(0076322)
hgbot (developer)
2015-04-01 16:48

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 90a87c12a1a978070d077c146aa241904daf086e
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 01 16:47:15 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/90a87c12a1a978070d077c146aa241904daf086e [^]

Fixed issue 29302: Added missing transactional Dal calls

---
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---
(0076326)
hgbot (developer)
2015-04-01 17:24

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a53ee2b45659b5636ba492aa06e4fe5917d9c658
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 01 17:23:50 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a53ee2b45659b5636ba492aa06e4fe5917d9c658 [^]

Related to issue 29302: Changed the way a new ticket is created with multiorders

After closing the last receipt in a multiorder ticket, a new receipt will be created if the receipt list is empty (this is done automatically when deleting an order). At the moment of finishing closing the multiorder we only need to synchronize the open ticket if needed, in order to update its document number.

---
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0076339)
aaroncalero (manager)
2015-04-01 18:34

Multiorders flow is failing because the runSyncProcess is being executed before all the operations inside the transaction have finished.
(0076340)
hgbot (developer)
2015-04-01 18:36

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d7e7e0a39c29a7a46ae3fd0560676f420d7c514c
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 01 18:29:38 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d7e7e0a39c29a7a46ae3fd0560676f420d7c514c [^]

Related to issue 29302: Backed out changesets a53ee2b45659, 90a87c12a1a9 and c7d219d6065e until we find a way to apply it correctly to the multiorders flow

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---
(0076396)
hgbot (developer)
2015-04-09 09:51

Repository: retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal
Changeset: c7d219d6065e4fd2ebce51011a459e16574f918e
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 01 14:21:37 2015 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal/rev/c7d219d6065e4fd2ebce51011a459e16574f918e [^]

Fixed issue 29302: In paymentmethodcashup table one ticket can be added 2 times

Refactored the ticket closing process to be done in a sql transaction. Now if the user reloads the application while the closing process is active, all the changes done to the local database will be rolled back

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---
(0076398)
hgbot (developer)
2015-04-09 09:51

Repository: retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal
Changeset: 90a87c12a1a978070d077c146aa241904daf086e
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 01 16:47:15 2015 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal/rev/90a87c12a1a978070d077c146aa241904daf086e [^]

Fixed issue 29302: Added missing transactional Dal calls

---
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---
(0076399)
hgbot (developer)
2015-04-09 09:51

Repository: retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal
Changeset: a53ee2b45659b5636ba492aa06e4fe5917d9c658
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 01 17:23:50 2015 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal/rev/a53ee2b45659b5636ba492aa06e4fe5917d9c658 [^]

Related to issue 29302: Changed the way a new ticket is created with multiorders

After closing the last receipt in a multiorder ticket, a new receipt will be created if the receipt list is empty (this is done automatically when deleting an order). At the moment of finishing closing the multiorder we only need to synchronize the open ticket if needed, in order to update its document number.

---
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0076400)
hgbot (developer)
2015-04-09 09:51

Repository: retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal
Changeset: d7e7e0a39c29a7a46ae3fd0560676f420d7c514c
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 01 18:29:38 2015 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal/rev/d7e7e0a39c29a7a46ae3fd0560676f420d7c514c [^]

Related to issue 29302: Backed out changesets a53ee2b45659, 90a87c12a1a9 and c7d219d6065e until we find a way to apply it correctly to the multiorders flow

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---
(0076462)
hgbot (developer)
2015-04-13 10:50

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9a2aae52ffdfa9e0c8abb30fe055825fa33ec86e
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Mon Apr 13 10:38:25 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9a2aae52ffdfa9e0c8abb30fe055825fa33ec86e [^]

Fixed issue 29302: In paymentmethodcashup table one ticket can be added 2 times

Reapplied changes to the standard order flow to close tickets in a transactional way.

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---
(0076638)
adrianromero (manager)
2015-04-20 16:48

The code works as expected. but the transactions implementation for WebSQL can be improved:

* Hides the native transaction object adding complexity, is error prone and forces to use two vars: transactionName and finalizationCallback(), when in the original WEBSQL implementation only is required the transaction object. There is no need to make the API more complex. I suggest to use the original transaction construction:

  var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024);
  db.transaction(function (tx) {
     tx.executeSql('CREATE TABLE IF NOT EXISTS LOGS (id unique, log)');
  });

* Functions xxxxInTransaction() fails when no transaction name supplied, but the general use in POS is that if there is no transaction a new transaction is created. In consequence a lot of code is duplicated to implement the required behaviour. For example, the following piece of code is duplicated several times:

  findIfInTransaction = function (model, whereClause, success, error,
 args) {
    if (trxName) {
      OB.Dal.findInTransaction(trxName, model, whereClause, success, error, args);
    } else {
      OB.Dal.find(model, whereClause, success, error, args);
    }
  };

Please, consider the attached refactor that implements the previous points. As an indicator it reduces 140 lines of code.
(0076671)
hgbot (developer)
2015-04-22 09:17

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9013ba1d307c9485a2141b400cb65ddd0f2cc7e6
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Apr 22 09:15:53 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9013ba1d307c9485a2141b400cb65ddd0f2cc7e6 [^]

Fixed issue 29302: In paymentmethodcashup table one ticket can be added 2 times

Applied refactor to remove duplicated code and reduce complexity

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/utils/cashUpReportUtils.js
---

- Issue History
Date Modified Username Field Change
2015-03-16 18:53 jecharri New Issue
2015-03-16 18:53 jecharri Assigned To => marvintm
2015-03-16 18:53 jecharri Resolution time => 1426719600
2015-03-16 18:53 jecharri Triggers an Emergency Pack => No
2015-03-25 15:56 aaroncalero Assigned To marvintm => aaroncalero
2015-03-30 14:01 jonalegriaesarte Target Version RR15Q2 => RR15Q3
2015-04-01 14:23 hgbot Checkin
2015-04-01 14:23 hgbot Note Added: 0076311
2015-04-01 14:23 hgbot Status new => resolved
2015-04-01 14:23 hgbot Resolution open => fixed
2015-04-01 14:23 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c7d219d6065e4fd2ebce51011a459e16574f918e [^]
2015-04-01 16:48 hgbot Checkin
2015-04-01 16:48 hgbot Note Added: 0076322
2015-04-01 16:48 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c7d219d6065e4fd2ebce51011a459e16574f918e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/90a87c12a1a978070d077c146aa241904daf086e [^]
2015-04-01 17:24 hgbot Checkin
2015-04-01 17:24 hgbot Note Added: 0076326
2015-04-01 18:34 aaroncalero Note Added: 0076339
2015-04-01 18:34 aaroncalero Status resolved => new
2015-04-01 18:34 aaroncalero Resolution fixed => open
2015-04-01 18:36 hgbot Checkin
2015-04-01 18:36 hgbot Note Added: 0076340
2015-04-09 09:51 hgbot Checkin
2015-04-09 09:51 hgbot Note Added: 0076396
2015-04-09 09:51 hgbot Status new => resolved
2015-04-09 09:51 hgbot Resolution open => fixed
2015-04-09 09:51 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/90a87c12a1a978070d077c146aa241904daf086e [^] => http://code.openbravo.com/retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal/rev/c7d219d6065e4fd2ebce51011a459e16574f918e [^]
2015-04-09 09:51 hgbot Checkin
2015-04-09 09:51 hgbot Note Added: 0076398
2015-04-09 09:51 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal/rev/c7d219d6065e4fd2ebce51011a459e16574f918e [^] => http://code.openbravo.com/retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal/rev/90a87c12a1a978070d077c146aa241904daf086e [^]
2015-04-09 09:51 hgbot Checkin
2015-04-09 09:51 hgbot Note Added: 0076399
2015-04-09 09:51 hgbot Checkin
2015-04-09 09:51 hgbot Note Added: 0076400
2015-04-13 09:08 aaroncalero Status resolved => new
2015-04-13 09:08 aaroncalero Resolution fixed => open
2015-04-13 10:50 hgbot Checkin
2015-04-13 10:50 hgbot Note Added: 0076462
2015-04-13 10:50 hgbot Status new => resolved
2015-04-13 10:50 hgbot Resolution open => fixed
2015-04-13 10:50 hgbot Fixed in SCM revision http://code.openbravo.com/retail/backports/3.0RR15Q2/org.openbravo.retail.posterminal/rev/90a87c12a1a978070d077c146aa241904daf086e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9a2aae52ffdfa9e0c8abb30fe055825fa33ec86e [^]
2015-04-20 16:48 adrianromero Note Added: 0076638
2015-04-20 16:48 adrianromero Status resolved => new
2015-04-20 16:48 adrianromero Resolution fixed => open
2015-04-20 16:50 adrianromero File Added: transactions_refactor_mobile_core.diff
2015-04-20 16:51 adrianromero File Added: transactions_refactor_retail_posterminal.diff
2015-04-22 09:12 aaroncalero Relationship added depends on 0029478
2015-04-22 09:17 hgbot Checkin
2015-04-22 09:17 hgbot Note Added: 0076671
2015-04-22 09:17 hgbot Status new => resolved
2015-04-22 09:17 hgbot Resolution open => fixed
2015-04-22 09:17 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9a2aae52ffdfa9e0c8abb30fe055825fa33ec86e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9013ba1d307c9485a2141b400cb65ddd0f2cc7e6 [^]
2015-05-13 18:10 marvintm Review Assigned To => marvintm
2015-05-13 18:10 marvintm Status resolved => closed
2015-05-13 18:10 marvintm Fixed in Version => RR15Q3
2015-06-16 09:23 Orekaria File Added: Q2.1_posterminal_29302.patch
2015-06-19 10:39 Orekaria Status closed => new
2015-06-19 10:39 Orekaria Resolution fixed => open
2015-06-19 10:39 Orekaria Fixed in Version RR15Q3 =>
2015-06-19 10:39 Orekaria Status new => scheduled
2015-06-19 10:39 Orekaria Status scheduled => resolved
2015-06-19 10:39 Orekaria Fixed in Version => RR15Q3
2015-06-19 10:39 Orekaria Resolution open => fixed
2015-06-19 10:40 Orekaria Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker