FIX: Incorrect parameters given to function Stats::UpdateStats in

issuebook and returnbook functions
This commit is contained in:
plugz 2003-06-20 12:48:09 +00:00
parent e1e291d69b
commit 878b64dadd

View file

@ -628,7 +628,7 @@ sub issuebook {
createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $patroninformation->{'borrowernumber'}, $charge); createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $patroninformation->{'borrowernumber'}, $charge);
$iteminformation->{'charge'} = $charge; $iteminformation->{'charge'} = $charge;
} }
&UpdateStats($env,$env->{'branchcode'},'renew',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'}); &UpdateStats($env,$env->{'branchcode'},'renew',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'},$patroninformation->{'borrowernumber'});
renewbook($env,$dbh, $patroninformation->{'borrowernumber'}, $iteminformation->{'itemnumber'}); renewbook($env,$dbh, $patroninformation->{'borrowernumber'}, $iteminformation->{'itemnumber'});
$noissue=1; $noissue=1;
} else { } else {
@ -760,7 +760,7 @@ sub issuebook {
$iteminformation->{'charge'}=$charge; $iteminformation->{'charge'}=$charge;
} }
# Record the fact that this book was issued. # Record the fact that this book was issued.
&UpdateStats($env,$env->{'branchcode'},'issue',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'}); &UpdateStats($env,$env->{'branchcode'},'issue',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'},$patroninformation->{'borrowernumber'});
} }
if ($iteminformation->{'charge'}) { if ($iteminformation->{'charge'}) {
@ -892,7 +892,7 @@ sub returnbook {
} }
# update stats? # update stats?
# Record the fact that this book was returned. # Record the fact that this book was returned.
UpdateStats(\%env, $branch ,'return','0','',$iteminformation->{'itemnumber'}); UpdateStats(\%env, $branch ,'return','0','',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'},$borrower->{'borrowernumber'});
return ($doreturn, $messages, $iteminformation, $borrower); return ($doreturn, $messages, $iteminformation, $borrower);
} }