Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0026884 | Openbravo ERP | A. Platform | public | 2014-06-17 10:02 | 2014-06-26 15:52 |
Reporter | daniOpenbravo | ||||
Assigned To | shankarb | ||||
Priority | high | Severity | major | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | 3.0PR14Q2 | ||||
Target Version | 3.0PR14Q3 | Fixed in Version | 3.0PR14Q3 | ||
Merge Request Status | |||||
Review Assigned To | AugustoMauch | ||||
OBNetwork customer | OBPS | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | 28380 | ||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0026884: Can not save credit type Fields (Operon) | ||||
Description | Operon has a problem when saving fields of type credit. The system does not save any record if the last field modified is a type credit field (credit, debit, etc). | ||||
Steps To Reproduce | - Go to Financial Account window (for example). - Click on "Add transaction" button. - Once the transaction is added, save the record. - After saving, try to modify field Deposit amount (or credit amount): The system does not allow to save the field. - However, try to change that field and after that, modify another field with no credit reference type: Now the system allow us to save. | ||||
Proposed Solution | As Augusto was investigating this issue the solution was adding a new parameter to a function in the following file: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitten/ob-formitem-number.js There is a function that contains 5 parameters but one of them is not always necessary and it is not defined in that way. However, in this case that parameter is necessary, so once it is added to that function the problem is solved. Try to replace the following code: // Make sure the number is rounded using the number of decimal digits specified in the number typeInstance if (isc.isA.String(this.getValue())) { value = OB.Utilities.Number.OBPlainToOBMasked(this.getValue(), this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator); this.setValue(OB.Utilities.Number.OBMaskedToJS(value, this.typeInstance.decSeparator, this.typeInstance.groupSeparator)); if (this.form.setTextualValue) { this.form.setTextualValue(this.name, value, this.typeInstance); } } using this new one: // Make sure the number is rounded using the number of decimal digits specified in the number typeInstance if (isc.isA.String(this.getValue())) { //if the string is a math expression do not perform rounding yet. if (this.getValue().indexOf('=') === -1) { value = OB.Utilities.Number.OBPlainToOBMasked(this.getValue(), this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator, OB.Format.defaultGroupingSize); } else { value = this.getValue(); } this.setValue(OB.Utilities.Number.OBMaskedToJS(value, this.typeInstance.decSeparator, this.typeInstance.groupSeparator)); if (this.form.setTextualValue) { this.form.setTextualValue(this.name, value, this.typeInstance); } } And replace too this code: // first check if the number is valid if (!isc.isA.String(value)) { // format the value displayed this.setElementValue(this.mapValueToDisplay(value)); } Using this new one: // first check if the number is valid if (!isc.isA.String(value)) { // format the value to be displayed. value = OB.Utilities.Number.OBPlainToOBMasked(value, this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator, OB.Format.defaultGroupingSize); this.setElementValue(this.mapValueToDisplay(value)); } | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-06-17 10:02 | daniOpenbravo | New Issue | |||
2014-06-17 10:02 | daniOpenbravo | Assigned To | => AugustoMauch | ||
2014-06-17 10:02 | daniOpenbravo | Modules | => Core | ||
2014-06-17 10:02 | daniOpenbravo | OBNetwork customer | => Yes | ||
2014-06-17 10:02 | daniOpenbravo | Support ticket | => 28380 | ||
2014-06-17 10:02 | daniOpenbravo | Triggers an Emergency Pack | => No | ||
2014-06-17 18:54 | jonalegriaesarte | Resolution time | => 1405461600 | ||
2014-06-24 19:37 | shankarb | Assigned To | AugustoMauch => shankarb | ||
2014-06-24 19:59 | shankarb | Review Assigned To | => AugustoMauch | ||
2014-06-24 19:59 | shankarb | Issue Monitored: AugustoMauch | |||
2014-06-24 20:02 | hgbot | Checkin | |||
2014-06-24 20:02 | hgbot | Note Added: 0068287 | |||
2014-06-24 20:02 | hgbot | Status | new => resolved | ||
2014-06-24 20:02 | hgbot | Resolution | open => fixed | ||
2014-06-24 20:02 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/6806e1475383528d8bc931f3032db9841578cdca [^] | ||
2014-06-25 16:29 | hudsonbot | Checkin | |||
2014-06-25 16:29 | hudsonbot | Note Added: 0068314 | |||
2014-06-26 15:52 | AugustoMauch | Note Added: 0068357 | |||
2014-06-26 15:52 | AugustoMauch | Status | resolved => closed | ||
2014-06-26 15:52 | AugustoMauch | Fixed in Version | => PR14Q3 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|