Notes |
|
(0076311)
|
hgbot
|
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
|
2015-04-01 16:48
|
|
|
|
(0076326)
|
hgbot
|
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
---
|
|
|
|
Multiorders flow is failing because the runSyncProcess is being executed before all the operations inside the transaction have finished. |
|
|
(0076340)
|
hgbot
|
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
|
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
|
2015-04-09 09:51
|
|
|
|
(0076399)
|
hgbot
|
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
|
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
|
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
---
|
|
|
|
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
|
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
---
|
|