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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027922
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2014-10-20 23:402014-10-27 13:05
ReporterjecharriView Statuspublic 
Assigned Tomarvintm 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision9d640fb98a34
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomigueldejuana
Regression levelProduction - Confirmed Stable
Regression date2014-05-17
Regression introduced in releaseRR14Q2
Regression introduced by commithttps://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e7c8bb410309 [^]
Triggers an Emergency PackNo
Summary

0027922: You will receive errors in Web POS if you work with created Currency

DescriptionYou will receive errors in Web POS if you work with created Currency

The problem happens when you insert a new value in currency window and you use it in Web POS
Steps To Reproduce-Create a new currency and configure a terminal with that currency

You will receive error:

Uncaught TypeError: Cannot read property 'getFinancialAmountOf' of undefined 1ba93fe1eda59989e009edf875db1766_OBMOBCR.js:19193OB.UTIL.currency.toDefaultCurrency 1ba93fe1eda59989e009edf875db1766_OBMOBCR.js:19193OB.UTIL.calculateCurrentCash.OB.Dal.find.OB.Dal.find._.each.OB.Dal.find.me 1ba93fe1eda59989e009edf875db1766_OBMOBCR.js:21376(anonymous function)

The problem is function
toDefaultCurrency: function (fromCurrencyId, amount) {
and line
 fromCurrencyId = parseInt(fromCurrencyId, 10);

The problem is that when you create a new currency, the currency_id is not a number as it happens in the Openbravo sampledata, so when it tries to convert to int something that it is an Id you will receive NaN error.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0071111)
hgbot (developer)
2014-10-22 09:48

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9d640fb98a34911d1c7e8ac50422b09bbded8e63
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Oct 22 09:48:01 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9d640fb98a34911d1c7e8ac50422b09bbded8e63 [^]

Fixes issue 27922: The 'currencyId' in OB.UTIL.currency is not enforced to be an 'int'

The problem was that the new ids are uuids and the webpos sampledata used 'int's, so the code was develop assuming there would be 'int's

- the ids are normalized to 'String's
- the argument checks use the OB.UTIL.Debug.isDefined method
- removed 'DEVELOPER'

---
M web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js
---
(0071193)
migueldejuana (developer)
2014-10-27 13:05

Tested and reviewed in d308fc27eca9

- Issue History
Date Modified Username Field Change
2014-10-20 23:40 jecharri New Issue
2014-10-20 23:40 jecharri Assigned To => marvintm
2014-10-20 23:40 jecharri Regression level => Production - Confirmed Stable
2014-10-20 23:40 jecharri Regression date => 2014-05-17
2014-10-20 23:40 jecharri Regression introduced in release => RR14Q2
2014-10-20 23:40 jecharri Regression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e7c8bb410309 [^]
2014-10-20 23:40 jecharri Triggers an Emergency Pack => No
2014-10-21 10:51 caristu Issue Monitored: caristu
2014-10-22 09:48 hgbot Checkin
2014-10-22 09:48 hgbot Note Added: 0071111
2014-10-22 09:48 hgbot Status new => resolved
2014-10-22 09:48 hgbot Resolution open => fixed
2014-10-22 09:48 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9d640fb98a34911d1c7e8ac50422b09bbded8e63 [^]
2014-10-27 11:40 Orekaria Issue Monitored: guillermogil
2014-10-27 13:05 migueldejuana Review Assigned To => migueldejuana
2014-10-27 13:05 migueldejuana Note Added: 0071193
2014-10-27 13:05 migueldejuana Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker