package C4::Circulation::Circ2;
+# $Id$
+
#package to deal with Returns
#written 3/11/99 by olwen@katipo.co.nz
while (($accdata=$msth->fetchrow_hashref) and ($amountleft>0)){
if ($accdata->{'amountoutstanding'} < $amountleft) {
$newamtos = 0;
+ # FIXME - -=
$amountleft = $amountleft - $accdata->{'amountoutstanding'};
} else {
$newamtos = $accdata->{'amountoutstanding'} - $amountleft;
$sth->execute;
my $total=0;
while (my $data=$sth->fetchrow_hashref){
+ # FIXME = +=
$total=$total+$data->{'sum(amountoutstanding)'};
}
$sth->finish;
return($total);
}
+# FIXME - This is identical to &C4::Circulation::Renewals::renewstatus.
+# Pick one and stick with it.
sub renewstatus {
# Stolen from Renewals.pm
# check renewal status
return ($charge);
}
+# FIXME - A virtually identical function appears in
+# C4::Circulation::Issues. Pick one and stick with it.
sub createcharge {
#Stolen from Issues.pm
my ($env,$dbh,$itemno,$bornum,$charge) = @_;
#'
# FIXME - This API is bogus: just return the record, or undef if none
# was found.
+# FIXME - There's also a &C4::Circulation::Returns::find_reserves, but
+# that one looks rather different.
sub find_reserves {
# Stolen from Returns.pm
my ($itemno) = @_;
return ($resfound,$lastrec);
}
-END { } # module clean-up code here (global destructor)
-
1;
__END__