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;
16 $flagsrequired->{borrow}=1;
18 my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 0, $flagsrequired);
20 my $template = gettemplate("opac-account.tmpl", "opac");
22 # get borrower information ....
23 my $borrowernumber = getborrowernumber($loggedinuser);
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'};
43 $template->param( ACCOUNT_LINES => $accts );
45 $template->param( total => $total );
47 $template->param( loggedinuser => $loggedinuser );
48 print "Content-Type: text/html\n\n", $template->output;