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;
12 use C4::Interface::CGI::Output;
16 my ($template, $borrowernumber, $cookie)
17 = get_template_and_user({template_name => "opac-account.tmpl",
21 flagsrequired => {borrow => 1},
25 # get borrower information ....
26 my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
31 $template->param( BORROWER_INFO => \@bordat );
35 my ($numaccts,$accts,$total) = getboracctrecord(undef,$borr);
37 for (my $i=0;$i<$numaccts;$i++){
38 $accts->[$i]{'amount'}+=0.00;
39 $accts->[$i]{'amountoutstanding'}+=0.00;
40 if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){
41 $accts->[$i]{'print_title'};
47 foreach my $row (@$accts) {
48 $row->{'even'} = 1 if $num % 2 == 0;
49 $row->{'odd'} = 1 if $num % 2 == 1;
54 $template->param( ACCOUNT_LINES => $accts );
56 $template->param( total => $total );
58 #$template->param(loggeninuser => $loggedinuser);
59 output_html_with_http_headers $query, $cookie, $template->output;