[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.21.2.9,1.21.2.10
From: |
Finlay Thompson |
Subject: |
[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.21.2.9,1.21.2.10 |
Date: |
Tue, 01 Oct 2002 17:41:43 -0700 |
Update of /cvsroot/koha/koha/C4/Circulation
In directory usw-pr-cvs1:/tmp/cvs-serv5752/Circulation
Modified Files:
Tag: rel-1-2
Circ2.pm
Log Message:
Cleaned out some warn statements.
Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.21.2.9
retrieving revision 1.21.2.10
diff -C2 -r1.21.2.9 -r1.21.2.10
*** Circ2.pm 1 Oct 2002 07:12:52 -0000 1.21.2.9
--- Circ2.pm 2 Oct 2002 00:41:41 -0000 1.21.2.10
***************
*** 137,140 ****
--- 137,142 ----
$sth->execute;
my $borrower = $sth->fetchrow_hashref;
+ my $amount = checkaccount($env, $borrowernumber, $dbh);
+ $borrower->{'amountoutstanding'} = $amount;
my $flags = patronflags($env, $borrower, $dbh);
my $accessflagshash;
***************
*** 150,154 ****
$dbh->disconnect;
$borrower->{'flags'}=$flags;
! return($borrower, $flags, $accessflagshash);
}
--- 152,156 ----
$dbh->disconnect;
$borrower->{'flags'}=$flags;
! return ($borrower, $flags, $accessflagshash);
}
***************
*** 710,714 ****
my %flags;
my ($env, $patroninformation, $dbh) = @_;
! my $amount = checkaccount($env, $patroninformation->{'borrowernumber'},
$dbh);
if ($amount > 0) {
my %flaginfo;
--- 712,716 ----
my %flags;
my ($env, $patroninformation, $dbh) = @_;
! my $amount = $patroninformation->{'amountoutstanding'};
if ($amount > 0) {
my %flaginfo;
***************
*** 910,913 ****
--- 912,916 ----
issues.date_due AS date_due,
items.biblionumber AS biblionumber,
+ items.itemnumber AS itemnumber,
items.barcode AS barcode,
biblio.title AS title,
***************
*** 967,996 ****
sub checkaccount {
! # Stolen from Accounts.pm
! #take borrower number
! #check accounts and list amounts owing
my ($env,$bornumber,$dbh,$date)address@hidden;
! my $select="Select sum(amountoutstanding) from accountlines where
! borrowernumber=$bornumber and amountoutstanding<>0";
if ($date ne ''){
! $select.=" and date < '$date'";
}
- # print $select;
my $sth=$dbh->prepare($select);
$sth->execute;
! my $total=0;
! while (my $data=$sth->fetchrow_hashref){
! $total=$total+$data->{'sum(amountoutstanding)'};
! }
$sth->finish;
! # output(1,2,"borrower owes $total");
! #if ($total > 0){
! # # output(1,2,"borrower owes $total");
! # if ($total > 5){
! # reconcileaccount($env,$dbh,$bornumber,$total);
! # }
! #}
! # pause();
! return($total);
}
--- 970,988 ----
sub checkaccount {
! # returns total amount oweing.
my ($env,$bornumber,$dbh,$date)address@hidden;
! my $select="SELECT SUM(amountoutstanding) AS total
! FROM accountlines
! WHERE borrowernumber = $bornumber
! AND amountoutstanding<>0";
if ($date ne ''){
! $select.=" AND date < '$date'";
}
my $sth=$dbh->prepare($select);
$sth->execute;
! my $data=$sth->fetchrow_hashref;
! my $total = $data->{'total'};
$sth->finish;
! return ($total);
}
***************
*** 1074,1078 ****
# Stolen from Issues.pm
# calculate charges due
- warn "Im in calc_charges!\n";
my ($env, $dbh, $itemno, $bornum)address@hidden;
--- 1066,1069 ----
***************
*** 1086,1090 ****
and (biblioitems.biblioitemnumber = items.biblioitemnumber)
and (biblioitems.itemtype = itemtypes.itemtype)";
! warn "$q1\n";
my $sth1= $dbh->prepare($q1);
--- 1077,1081 ----
and (biblioitems.biblioitemnumber = items.biblioitemnumber)
and (biblioitems.itemtype = itemtypes.itemtype)";
!
my $sth1= $dbh->prepare($q1);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.21.2.9,1.21.2.10,
Finlay Thompson <=
- Prev by Date:
[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.5.2.9,1.5.2.10 Auth.pm,1.9.2.11,1.9.2.12
- Next by Date:
[Koha-cvs] CVS: koha/opac opac-userupdate.pl,NONE,1.1.2.1
- Previous by thread:
[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.5.2.9,1.5.2.10 Auth.pm,1.9.2.11,1.9.2.12
- Next by thread:
[Koha-cvs] CVS: koha/opac opac-userupdate.pl,NONE,1.1.2.1
- Index(es):