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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0026884
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorsometimes2014-06-17 10:022014-06-26 15:52
ReporterdaniOpenbravoView Statuspublic 
Assigned Toshankarb 
PriorityhighResolutionfixedFixed in Version3.0PR14Q3
StatusclosedFix in branchFixed in SCM revision6806e1475383
ProjectionnoneETAnoneTarget Version3.0PR14Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0PR14Q2SCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0026884: Can not save credit type Fields (Operon)

DescriptionOperon 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 SolutionAs 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));
}
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0068287)
hgbot (developer)
2014-06-24 20:02

Repository: erp/devel/pi
Changeset: 6806e1475383528d8bc931f3032db9841578cdca
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Jun 24 23:31:11 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/6806e1475383528d8bc931f3032db9841578cdca [^]

Fixes Issue 26884: Can not save credit type Fields (Operon)

Set the last parameter to OB.Utilities.Number.OBPlainToOBMasked method calls in number reference.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
---
(0068314)
hudsonbot (developer)
2014-06-25 16:29

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ad0fdac14ade [^]
Maturity status: Test
(0068357)
AugustoMauch (manager)
2014-06-26 15:52

Code reviewed and verified in pi@174b96a6fa01

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker