← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14594: PBF Payment Adjustment

 

------------------------------------------------------------
revno: 14594
committer: samta bajpayee<samta.bajpayee@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-04-02 05:48:04 +0100
message:
  PBF Payment Adjustment
modified:
  local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/javascript/paymentAdjustment.js
  local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/loadPaymentAdjustment.vm


--
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 'local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/javascript/paymentAdjustment.js'
--- local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/javascript/paymentAdjustment.js	2014-04-01 18:59:55 +0000
+++ local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/javascript/paymentAdjustment.js	2014-04-02 04:48:04 +0000
@@ -258,7 +258,7 @@
 	    	for ( i in json.periods ) {
 	    		addOptionToList( list, json.periods[i].isoDate, json.periods[i].name );
 	    	}
-	    	document.getElementById("amountAvail").value = json.amountAvailable;
+	    	
 	    } );
 	    
 	}	

=== modified file 'local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/loadPaymentAdjustment.vm'
--- local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/loadPaymentAdjustment.vm	2014-04-01 18:59:55 +0000
+++ local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/loadPaymentAdjustment.vm	2014-04-02 04:48:04 +0000
@@ -1,5 +1,9 @@
 
 <script type="text/javascript" >
+	jQuery(document).ready( function(){
+		document.getElementById("amountAvail").value = $amountAvailable;
+		adjustPer();
+	});
 	var total = 0;
 	var windowWidth = $(window).width();
 	var windowHeight = $(window).height();
@@ -20,7 +24,7 @@
 </script>
 
 <script >
-$(function() {
+jQuery(document).ready( function(){
 			Ext.QuickTips.init();
 			
 			var grid = Ext.create('Ext.ux.grid.TransformGrid', "paymentDetails", {				
@@ -123,8 +127,9 @@
         <script>
         	function calVal( ) {
         		var amount = 0.0;
-        		amount = parseFloat( '$!quantityValidatedMap.get( $dataElement.uid )' ) * parseFloat( '$!tariffDataValueMap.get( $dataElement.uid )' );
-        		$('#amount_'+$dataElement.id).text( amount.toFixed(2) );
+        		amount = parseFloat( $!quantityValidatedMap.get( $dataElement.uid ) ) * parseFloat( $!tariffDataValueMap.get( $dataElement.uid ) );
+        		document.getElementById("amount_"+$dataElement.id).firstChild.nodeValue = amount.toFixed(2);
+        		
         		total = total + parseFloat( amount  );
         		document.getElementById("total").value = total.toFixed(2) ;
         	}
@@ -133,10 +138,8 @@
 		#end
 		<tr>
 			<td>&nbsp; </td>			
-			<td colspan="2" >Unadjusted Amount </td>
-			<td colspan="2"><input type="text" name="total" id="total"/></td>
-			<td>&nbsp; </td>
-			<td>&nbsp; </td>>
+			<td colspan="3" >Unadjusted Amount </td>
+			<td colspan="3"><input type="text" name="total" id="total"/></td>			
 		</tr>
     </tbody>
 </table>