From a067d70c35276a2bf64df48b141492c5a9c1a9de Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 13 Dec 2002 10:36:22 +0000 Subject: [PATCH] code cleaning --- C4/Accounts2.pm | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/C4/Accounts2.pm b/C4/Accounts2.pm index 40e81ae7a8..ab5f6dc54d 100755 --- a/C4/Accounts2.pm +++ b/C4/Accounts2.pm @@ -319,25 +319,16 @@ sub manualinvoice{ my $data=$sth->fetchrow_hashref; $sth->finish; $desc.=" ".$itemnum; - $desc=$dbh->quote($desc); - $dbh->do(<{'itemnumber'}') -EOT + my $sth=$dbh->prepare("INSERT INTO accountlines + (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, itemnumber) + VALUES (?, ?, now(), ?,?, ?,?,?)"); + $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft, $data->{'itemnumber'}); } else { $desc=$dbh->quote($desc); - $dbh->do(<prepare("INSERT INTO accountlines + (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding) + VALUES (?, ?, now(), ?, ?, ?, ?)"); + $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft); } } -- 2.39.2