From 52a3126df1df4983b5723d8aae2136f235ad2cc3 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Mon, 28 Oct 2002 21:44:33 +0000 Subject: [PATCH] Merging changes from rel-1-2 to trunk --- opac/opac-account.pl | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 opac/opac-account.pl diff --git a/opac/opac-account.pl b/opac/opac-account.pl new file mode 100755 index 0000000000..94fc308ab8 --- /dev/null +++ b/opac/opac-account.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl + +# wrriten 15/10/2002 by finlay@katipo.oc.nz +# script to display borrowers account details in the opac + +use strict; +use C4::Output; +use CGI; +use C4::Search; +use C4::Circulation::Circ2; +use C4::Auth; + +my $query = new CGI; + +my $flagsrequired; +$flagsrequired->{borrow}=1; + +my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 0, $flagsrequired); + +my $template = gettemplate("opac-account.tmpl", "opac"); + +# get borrower information .... +my $borrowernumber = getborrowernumber($loggedinuser); +my ($borr, $flags) = getpatroninformation(undef, $borrowernumber); + +my @bordat; +$bordat[0] = $borr; + +$template->param( BORROWER_INFO => \@bordat ); + + +#get account details +my ($numaccts,$accts,$total) = getboracctrecord(undef,$borr); + +for (my $i=0;$i<$numaccts;$i++){ + $accts->[$i]{'amount'}+=0.00; + $accts->[$i]{'amountoutstanding'}+=0.00; + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $accts->[$i]{'print_title'}; + } +} + +$template->param( ACCOUNT_LINES => $accts ); + +$template->param( total => $total ); + +$template->param( loggedinuser => $loggedinuser ); +print "Content-Type: text/html\n\n", $template->output; -- 2.39.5