dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38742
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19690: avoid adding unnecessary decimal point
------------------------------------------------------------
revno: 19690
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-07-28 10:09:53 +0200
message:
avoid adding unnecessary decimal point
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-07-17 08:14:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-07-28 08:09:53 +0000
@@ -1108,7 +1108,7 @@
answer = eval(dhisfunctionsevaluated);
}
if(dhis2.validation.isNumber(answer)){
- answer = Number(answer).toFixed(2);
+ answer = Math.round(answer*100)/100;
}
return answer;
};