use C4::Output;
use CGI;
use C4::Members;
-use C4::Accounts2;
+use C4::Accounts;
use C4::Stats;
use C4::Koha;
-use C4::Circulation::Fines;
+use C4::Overdues;
use C4::Branch; # GetBranches
my $input = new CGI;
}
# get borrower details
-my $data = borrdata( '', $borrowernumber );
+my $data = GetMember( $borrowernumber,'borrowernumber' );
my $user = $input->remote_user;
# get account details
-my %bor;
-$bor{'borrowernumber'} = $borrowernumber;
my $branches = GetBranches();
my $printers = GetPrinters();
my $branch = GetBranch( $input, $branches );
$check = 2;
}
}
-my %env;
-
-$env{'branchcode'} = $branch;
my $total = $input->param('total');
if ( $check == 0 ) {
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
);
if ( $total ne '' ) {
- recordpayment( \%env, $borrowernumber, $total );
+ recordpayment( $borrowernumber, $total );
}
- my ( $numaccts, $accts, $total ) = getboracctrecord( '', \%bor );
+ my ( $total, $accts, $numaccts) = GetBorrowerAcctRecord( $borrowernumber );
# creation d'une fonction qui va nous retourner le notify_id dans un tableau
my ( $borrowernumber, $accountnum, $itemnum, $accounttype, $amount ) = @_;
my $user = $input->remote_user;
my $dbh = C4::Context->dbh;
- my $env;
my $sth =
$dbh->prepare(
"Update accountlines set amountoutstanding=0 where (accounttype='Res' OR accounttype='FU' OR accounttype ='IP' OR accounttype='CH' OR accounttype='N' OR accounttype='F' OR accounttype='A' OR accounttype='M' OR accounttype='L' OR accounttype='RE' OR accounttype='RL') and accountno=? and borrowernumber=?"
$sth->execute( $borrowernumber, $account->{'max(accountno)'},
$itemnum, $amount );
$sth->finish;
- UpdateStats( $env, $branch, 'writeoff', $amount, '', '', '',
+ UpdateStats( $branch, 'writeoff', $amount, '', '', '',
$borrowernumber );
}