Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014422 | Openbravo ERP | A. Platform | public | 2010-09-03 13:14 | 2010-10-19 00:00 |
Reporter | dbaz | ||||
Assigned To | iperdomo | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 20 | OS Version | Kubuntu 8.10 | |
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | No | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0014422: Strange code in F.getFormat in DynamicJS (related to number formatting) | ||||
Description | At the end of DynamicJS.js (loaded in the menu) there are the mechanism to translate a maskName (of the ones defined in Format.xml) to its maskFormat The function is var F = {"formats": [ {"name":"generalQtyEdition","output":"#0.######"}, {"name":"qtyEdition","output":"#0.###"}, {"name":"euroEdition","output":"#0.00"}, {"name":"generalQtyRelation","output":"#,##0.######"}, {"name":"priceEdition","output":"#0.00"}, {"name":"priceExcel","output":"#,##0.##"}, {"name":"euroRelation","output":"#,##0.00"}, {"name":"generalQtyExcel","output":"#,##0.######"}, {"name":"qtyExcel","output":"#,##0.###"}, {"name":"amountInform","output":"#,##0.00"}, {"name":"integerRelation","output":"#,##0"}, {"name":"integerExcel","output":"#,##0"}, {"name":"euroInform","output":"#,##0.00"}, {"name":"integerEdition","output":"#0"}, {"name":"priceRelation","output":"#,##0.00"}, {"name":"qtyRelation","output":"#,##0.###"}, {"name":"euroExcel","output":"#,##0.##"}, {"name":"priceInform","output":"#,##0.##"}, {"name":"integerInform","output":"#,##0"} ] }; F.getFormat=function(name) if(typeof name==='undefined'||name==='') { return'qtyEdition'; } for(var i=0;i<this.formats.length;i++){ if(this.formats[i].name===name){ return this.formats[i].output; } } return'qtyEdtion'; } The strange points are the in the validation statements of the F.getFormat function: * The return'qtyEdition'; -> an space is missing (but not crucial). Also it seems to be the wrong return (see third point). * The return'qtyEdtion'; -> an space is missing (but not crucial) but also there is a typo and an "i" is missing. Also it seems to be the wrong return (see third point). * This function pretends to return something like "#0.###" or whatever (depending of the name given as input)... and it seems that when name is not declared or it can not find anything, it is going to return the string "qtyEdition" or "qtyEdtion" respectively which it seems to be wrong... it should be something like: return F.getFormat('qtyEdition'); in both cases | ||||
Steps To Reproduce | |||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2010-09-03 13:14 | dbaz | New Issue | |||
2010-09-03 13:14 | dbaz | Assigned To | => iperdomo | ||
2010-09-03 13:14 | dbaz | OBNetwork customer | => No | ||
2010-09-06 08:10 | alostale | Status | new => scheduled | ||
2010-10-11 11:03 | hgbot | Checkin | |||
2010-10-11 11:03 | hgbot | Note Added: 0031743 | |||
2010-10-11 11:03 | hgbot | Status | scheduled => resolved | ||
2010-10-11 11:03 | hgbot | Resolution | open => fixed | ||
2010-10-11 11:03 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/adbb4479b500e9f962765b80ac9874e25bcd987a [^] | ||
2010-10-11 18:48 | hudsonbot | Checkin | |||
2010-10-11 18:48 | hudsonbot | Note Added: 0031766 | |||
2010-10-18 17:57 | dbaz | Status | resolved => closed | ||
2010-10-19 00:00 | anonymous | sf_bug_id | 0 => 3090005 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|