3 #script to show list of budgets and bookfunds
4 #written 4/2/00 by chris@katipo.co.nz
5 #called as an include by the acquisitions index page
12 my ($count,@results)=bookfunds;
17 <TABLE width="40%" cellspacing=0 cellpadding=5 border=1 >
18 <FORM ACTION="/cgi-bin/koha/search.pl">
20 <TD bgcolor="99cc33" background="/images/background-mem.gif" colspan=2><b>BUDGETS AND BOOKFUNDS</b></TD></TR>
26 <b>Budgets</B></TD> <TD><b>Total</B></TD> <TD><b>Spent</B></TD><TD><b>Comtd</B></TD><TD><b>Avail</B></TD></TR>
33 for (my $i=0;$i<$count;$i++){
34 my ($spent,$comtd)=bookfundbreakdown($results[$i]->{'bookfundid'});
35 my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd);
38 $results[$i]->{'bookfundname'} </TD>
39 <TD>$results[$i]->{'budgetamount'}</TD> <TD>
42 printf ("%.2f", $spent);
44 printf ("%.2f",$comtd);
46 printf ("%.2f",$avail);
48 $total+=$results[$i]->{'budgetamount'};
56 <hr size=1 noshade></TD></TR>
59 Total </TD> <TD>$total</TD> <TD>
62 printf ("%.2f",$totspent);
64 printf ("%.2f",$totcomtd);
66 printf ("%.2f",$totavail);
70 Use your reload button [ctrl + r] to get the most recent figures.
71 Committed figures are approximate only, as exchange rates will affect the amount actually paid.