3 # wrriten 15/10/2002 by finlay@katipo.oc.nz
4 # script to display borrowers account details in the opac
10 use C4::Circulation::Circ2;
14 my ($template, $borrowernumber, $cookie)
15 = get_template_and_user({template_name => "opac-account.tmpl",
19 flagsrequired => {borrow => 1},
23 # get borrower information ....
24 my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
29 $template->param( BORROWER_INFO => \@bordat );
33 my ($numaccts,$accts,$total) = getboracctrecord(undef,$borr);
35 for (my $i=0;$i<$numaccts;$i++){
36 $accts->[$i]{'amount'}+=0.00;
37 $accts->[$i]{'amountoutstanding'}+=0.00;
38 if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){
39 $accts->[$i]{'print_title'};
45 foreach my $row (@$accts) {
46 $row->{'even'} = 1 if $num % 2 == 0;
47 $row->{'odd'} = 1 if $num % 2 == 1;
52 $template->param( ACCOUNT_LINES => $accts );
54 $template->param( total => $total );
56 print $query->header(-cookie => $cookie), $template->output;