Untitled

 avatar
unknown
plain_text
5 months ago
1.9 kB
8
Indexable
function fiatFill(ind,size) {
	      var i;
	      var counter = 0;
	      var adjAmout = 0.0;
	      form = document.claimForm;
		  claimtotal = 0.00;
		  var zeroConditionCount = form.zeroFaultCount.value;
		  adjAmout = eval("form.clmAdjustment.value");
		  condtotal = eval("form.A_COND_TOT_CALCD"+ind+".value");
		  ischecked = eval("form.conditionChk"+ind+".checked");
		  condtotal =  round(-(condtotal), 2);
		  if(ischecked) 
		  {
		     eval("form.Chargeback_CondAmount"+ind+".value=condtotal");
		     eval("form.isCondChecked"+ind+".value='checked'");
		     
		     for(i=0;i<size;i++)
		     {
		         ct = eval("form.Chargeback_CondAmount"+i+".value");
		         if(ct=="") ct=0.00; 
		         ct = parseFloat(ct);
		         claimtotal = claimtotal + ct;
	         }
	      
	         for (i=0;i<size;i++)
	         {   
	             if (eval("form.conditionChk"+i+".checked"))
	                 counter++;
	         }

	         if (counter == (size-zeroConditionCount))
	             form.isTotChkd.checked = true;	
	         else
	             form.isTotChkd.checked = false;
	         
	         claimtotal = claimtotal - (-adjAmout);
	             
		     form.Chargeback_Total.value = claimtotal.toFixed(2);

		  }   
		  else
		  {
		      ct = eval("form.Chargeback_CondAmount"+ind+".value");
		      if(ct=="") ct=0.00; 
		      ct = parseFloat(ct);
		      claimtotal = parseFloat(form.Chargeback_Total.value);
		      claimtotal = claimtotal - ct;
		      eval("form.Chargeback_CondAmount"+ind+".value=''");
		      eval("form.isCondChecked"+ind+".value=''");
		      form.Chargeback_Total.value = claimtotal.toFixed(2);
	          if (size == 1)
	              form.Chargeback_Total.value = "";
	           
	          form.isTotChkd.checked = false;

	      }   
	      
	      return false;
	   }
Editor is loading...
Leave a Comment