Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039868Retail ModulesWeb POSpublic2019-01-02 17:112019-01-11 08:34
ngarcia 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR19Q2 
marvintm
No
0039868: Some amounts and prices are rounded to 2 instead of using the currency's precisions
Some amounts and prices are rounded to 2 instead of using the currency's precisions

web/org.openbravo.retail.posterminal/js/model/order.js: this.set('change', OB.DEC.abs(OB.DEC.sub(totalPaid, OB.Utilities.Number.roundJSNumber(total, 2), precision)));
web/org.openbravo.retail.posterminal/js/model/order.js: this.set('change', OB.DEC.abs(OB.DEC.sub(totalPaid, OB.Utilities.Number.roundJSNumber(total, 2), precision)));
web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js: newprice = OB.Utilities.Number.roundJSNumber(oldprice + amount / relatedQty, 2);
web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js: newprice = OB.Utilities.Number.roundJSNumber(oldprice + amount / relatedQty, 2);
web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js: newprice = OB.Utilities.Number.roundJSNumber(oldprice + price.at(0).get('listPrice'), 2);
web/org.openbravo.retail.posterminal/js/closecash/model/cashup-model.js: mod.set('difference', OB.DEC.sub(mod.get('counted'), OB.Utilities.Number.roundJSNumber(mod.get('expected'), 2)));
web/org.openbravo.retail.posterminal/js/closecash/model/cashup-model.js: mod.set('foreignDifference', OB.DEC.sub(mod.get('foreignCounted'), OB.Utilities.Number.roundJSNumber(mod.get('foreignExpected'), 2)));
web/org.openbravo.retail.posterminal/js/closecash/view/tabcashpayments.js: this.payment.set('foreignDifference', OB.DEC.sub(totalCounted, OB.Utilities.Number.roundJSNumber(this.payment.get('foreignExpected'), 2)));
web/org.openbravo.retail.posterminal/js/closecash/view/closecash.js: this.model.set("totalDifference", OB.DEC.sub(this.model.get('totalCounted'), OB.Utilities.Number.roundJSNumber(this.model.get('totalExpected'), 2)));
The terminal needs to be configured with a currency with more than two decimals such as OMR, BHR...

Prices should have also 3 decimals, so in order to configure them, the Format.xml file should be configured to show at least 3 decimals for amounts (euro...) and prices (price...)

Each case will have their steps to reproduce the problem
No tags attached.
related to defect 0039618 closed rqueralta Cash Up goes to Errors While Importing POS Data if the currency has more than 2 decimals and negative total 
related to defect 0039861 closed ranjith_qualiantech_com Under some circumstances Cash Up goes to Errors While Importing POS Data if the currency has more than 2 decimals 
Issue History
2019-01-02 17:11ngarciaNew Issue
2019-01-02 17:11ngarciaAssigned To => Retail
2019-01-02 17:11ngarciaResolution time => 1548198000
2019-01-02 17:11ngarciaTriggers an Emergency Pack => No
2019-01-02 17:11ngarciaRelationship addedrelated to 0039618
2019-01-02 17:12ngarciaIssue Monitored: networkb
2019-01-02 17:16ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18081#r18081
2019-01-02 17:17ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18082#r18082
2019-01-03 09:38rafarodaIssue Monitored: rafaroda
2019-01-04 10:40ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-01-04 10:46ranjith_qualiantech_comStatusnew => scheduled
2019-01-07 08:51rafarodaRelationship addedrelated to 0039861
2019-01-07 16:14hgbotCheckin
2019-01-07 16:14hgbotNote Added: 0108844
2019-01-07 16:14hgbotStatusscheduled => resolved
2019-01-07 16:14hgbotResolutionopen => fixed
2019-01-07 16:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7b2b7eef0662a5d89dddf99a1e8b4afd4bcd91e4 [^]
2019-01-11 08:34marvintmReview Assigned To => marvintm
2019-01-11 08:34marvintmStatusresolved => closed
2019-01-11 08:34marvintmFixed in Version => RR19Q2

Notes
(0108844)
hgbot   
2019-01-07 16:14   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7b2b7eef0662a5d89dddf99a1e8b4afd4bcd91e4
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jan 07 20:43:34 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7b2b7eef0662a5d89dddf99a1e8b4afd4bcd91e4 [^]

Fixed issue 39868 : Removed static precision while doing mathematical operations

---
M web/org.openbravo.retail.posterminal/js/closecash/model/cashup-model.js
M web/org.openbravo.retail.posterminal/js/closecash/view/closecash.js
M web/org.openbravo.retail.posterminal/js/closecash/view/tabcashpayments.js
M web/org.openbravo.retail.posterminal/js/closecash/view/tabcashtokeep.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js
---