From e57535b581e1b238b114dcaa573e2a2f10527752 Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 23 Apr 2003 12:20:26 +0000 Subject: [PATCH] fix for #297 and some others bugs --- C4/Accounts2.pm | 11 ++++++----- koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl | 12 ++++++------ mancredit.pl | 2 +- maninvoice.pl | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/C4/Accounts2.pm b/C4/Accounts2.pm index ab5f6dc54d..446b311844 100755 --- a/C4/Accounts2.pm +++ b/C4/Accounts2.pm @@ -314,15 +314,16 @@ sub manualinvoice{ $amountleft=refund('',$bornum,$amount); } if ($itemnum ne ''){ - my $sth=$dbh->prepare("Select * from items where barcode='$itemnum'"); - $sth->execute; - my $data=$sth->fetchrow_hashref; - $sth->finish; +# my $sth=$dbh->prepare("Select * from items where barcode='$itemnum'"); +# $sth->execute; +# my $data=$sth->fetchrow_hashref; +# $sth->finish; $desc.=" ".$itemnum; 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'}); +# $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft, $data->{'itemnumber'}); + $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft, $itemnum); } else { $desc=$dbh->quote($desc); my $sth=$dbh->prepare("INSERT INTO accountlines diff --git a/koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl b/koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl index ae4c73098f..1eff5fd411 100644 --- a/koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl @@ -2,10 +2,10 @@ -Account for

- +Account for ">

+/images/create-man-invoice.gif border=0>   - +/images/create-man-credit.gif border=0>

@@ -14,9 +14,9 @@ - - - + + + diff --git a/mancredit.pl b/mancredit.pl index 449bfb184e..300e0a26c5 100755 --- a/mancredit.pl +++ b/mancredit.pl @@ -43,7 +43,7 @@ if ($add){ $amount = -$amount; my $type=$input->param('type'); manualinvoice($bornum,$itemnum,$desc,$type,$amount); - print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); + print $input->redirect("/cgi-bin/koha/boraccount.pl?bornum=$bornum"); } else { my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "mancredit.tmpl", diff --git a/maninvoice.pl b/maninvoice.pl index de1385e305..62d3d6fb06 100755 --- a/maninvoice.pl +++ b/maninvoice.pl @@ -43,7 +43,7 @@ if ($add){ my $amount=$input->param('amount'); my $type=$input->param('type'); manualinvoice($bornum,$itemnum,$desc,$type,$amount); - print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); + print $input->redirect("/cgi-bin/koha/boraccount.pl?bornum=$bornum"); } else { my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "maninvoice.tmpl", -- 2.39.2
FINES & CHARGESAMOUNTSTILL OWING/images/background-mem.gif" colspan=2>FINES & CHARGES/images/background-mem.gif" colspan=1>AMOUNT/images/background-mem.gif" colspan=1>STILL OWING