All pastes #190779 Raw Edit

Untitled

public text v1 · immutable
·published 2006-10-04 09:29 UTC
rendered paste body

<!-- TMPL_LOOP name="allfile" -->
	<!-- TMPL_LOOP name="loop_pay" -->
<tr>
	<td><select name="payfine<!-- TMPL_VAR name="i" -->">
	<option value="no">Unpaid</option>
	<option value="yes">Paid</option>
	<option value="wo">Writeoff</option>
	</select>
	<input type="hidden" name="itemnumber<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="itemnumber" -->" />
	<input type="hidden" name="accounttype<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="accounttype" -->" />
	<input type="hidden" name="amount<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="amount" -->" />
	<input type="hidden" name="out<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="amountoutstanding" -->" />
	<input type="hidden" name="bornum<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="bornum" -->" />
	<input type="hidden" name="accountno<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="accountno" -->" />
	<input type="hidden" name="notify_id<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="notify_id" -->" />
	<input type="hidden" name="notify_level<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="notify_level" -->" />
	<input type="hidden" name="totals<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="totals" -->" />
	</td>
	<td><!-- TMPL_VAR name="description" --><!-- TMPL_VAR name="title" --></td>
	<td><!-- TMPL_VAR name="accounttype" --></td>
	<td><!--<!--<a href="javascript:Dopop('notify_details.pl?notify_id=<!--TMPL_VAR NAME="notify_id"-->');">-->--><!-- TMPL_VAR name="notify_id" --></a></td>
	<td><!-- TMPL_VAR name="notify_level" --></td>
	<td class="debit"><!-- TMPL_VAR name="amount" --></td>
	<td class="debit"><!-- TMPL_VAR name="amountoutstanding" --></td>
</tr>
<!-- /TMPL_LOOP  -->
<tr>

	<td colspan="6">Total Due</td>
	<td><!-- TMPL_VAR name="total" --></td>
</tr>
<!-- /TMPL_LOOP  -->











##################################le pl##########################


 	my $numberofnotify=scalar(@notify);
  	for (my $j=0;$j<scalar(@notify);$j++){
	
 	my ($numaccts,$accts,$total)=getboracctrecord('',\%bor,$notify[$j]);

# warn"$numaccts,$accts,$total";

# 	my $totals[$j]=$total;
	#il faut que je fasse une boucle sur les notify comme ca c bon
#il faut que je fasse une requete qui calcul le nombre de dossier different pour un meme bborrowers

	for (my $i=0;$i<$numaccts;$i++){
		my %line;
		if ($accts->[$i]{'amountoutstanding'} > 0){
			$accts->[$i]{'amount'}+=0.00;
			$accts->[$i]{'amountoutstanding'}+=0.00;
			
			$line{i}=$i;
			$line{itemnumber} = $accts->[$i]{'itemnumber'};
			$line{accounttype} = $accts->[$i]{'accounttype'};
			$line{amount} = sprintf("%.2f",$accts->[$i]{'amount'});
			$line{amountoutstanding} = sprintf("%.2f",$accts->[$i]{'amountoutstanding'});
			$line{bornum} = $bornum;
			$line{accountno} = $accts->[$i]{'accountno'};
			$line{description} = $accts->[$i]{'description'};
			$line{title} = $accts->[$i]{'title'};
			$line{notify_id} = $accts->[$i]{'notify_id'};
			$line{notify_level} = $accts->[$i]{'notify_level'};
			
			}
	
 	push(@loop_pay ,\%line);
	}
	
	push @allfile, {'loop_pay'=>\@loop_pay, 'notify'=>$notify[$j]};
  }

	$template->param(				
							allfile => \@allfile,
							firstname => $data->{'firstname'},
							surname => $data->{'surname'},
							bornum => $bornum,
							loop_pay => \@loop_pay,
							total => sprintf("%.2f",$total));
	print "Content-Type: text/html\n\n", $template->output;