← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11452: (PT) Rounding issue fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 11452 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-07-19 18:43:51 +0200
message:
  (PT) Rounding issue fixed.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js
  dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.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-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2013-06-09 16:56:45 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2013-07-19 16:42:11 +0000
@@ -3056,7 +3056,7 @@
 		});
 
 		button = Ext.create('Ext.button.Button', {
-			text: GIS.i18n.download,
+			text: GIsvS.i18n.download,
 			handler: function() {
 				var type = format.getValue(),
 					title = name.getValue(),

=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js	2013-07-19 08:37:53 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js	2013-07-19 16:42:11 +0000
@@ -1599,7 +1599,7 @@
 								type: 'valueTotal',
 								cls: 'pivot-value-total',
 								value: total,
-								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(total).toString() : '&nbsp;',
+								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(total, 2)).toString() : '&nbsp;',
 								empty: !Ext.Array.contains(empty, false)
 							});
 
@@ -1664,7 +1664,7 @@
 										type: 'valueSubtotal',
 										cls: 'pivot-value-subtotal',
 										value: rowSubTotal,
-										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(rowSubTotal).toString() : '&nbsp',
+										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(rowSubTotal, 2)).toString() : '&nbsp',
 										empty: !Ext.Array.contains(empty, false),
 										collapsed: !Ext.Array.contains(collapsed, false)
 									});
@@ -1746,7 +1746,7 @@
 									tmpValueObjects[tmpCount++].push({
 										type: item.type === 'value' ? 'valueSubtotal' : 'valueSubtotalTotal',
 										value: subTotal,
-										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(subTotal).toString() : '&nbsp;',
+										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(subTotal, 2)).toString() : '&nbsp;',
 										collapsed: collapsed,
 										cls: item.type === 'value' ? 'pivot-value-subtotal' : 'pivot-value-subtotal-total'
 									});
@@ -1772,7 +1772,7 @@
 									type: 'valueTotalSubgrandtotal',
 									cls: 'pivot-value-total-subgrandtotal',
 									value: subTotal,
-									htmlValue: Ext.Array.contains(empty, false) ? parseFloat(subTotal).toString() : '&nbsp;',
+									htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(subTotal, 2)).toString() : '&nbsp;',
 									empty: !Ext.Array.contains(empty, false),
 									collapsed: !Ext.Array.contains(collapsed, false)
 								});
@@ -1838,7 +1838,7 @@
 							totalColObjects.push({
 								type: 'valueTotal',
 								value: total,
-								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(total).toString() : '&nbsp;',
+								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(total, 2)).toString() : '&nbsp;',
 								empty: !Ext.Array.contains(empty, false),
 								cls: 'pivot-value-total'
 							});
@@ -1863,7 +1863,7 @@
 									tmp.push({
 										type: 'valueTotalSubgrandtotal',
 										value: subTotal,
-										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(subTotal).toString() : '&nbsp;',
+										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(subTotal, 2)).toString() : '&nbsp;',
 										empty: !Ext.Array.contains(empty, false),
 										cls: 'pivot-value-total-subgrandtotal'
 									});
@@ -1902,7 +1902,7 @@
 							a.push(getTdHtml({
 								type: 'valueGrandTotal',
 								cls: 'pivot-value-grandtotal',
-								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(total).toString() : '&nbsp;',
+								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(total, 2)).toString() : '&nbsp;',
 								empty: !Ext.Array.contains(empty, false)
 							}));
 						}