fix for #297 and some others bugs
This commit is contained in:
parent
5a6aa81047
commit
e57535b581
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
<!-- The manual invoice and credit buttons -->
|
||||
|
||||
<FONT SIZE=6><em>Account for <TMPL_VAR NAME=firstname> <TMPL_VAR NAME=surname></em></FONT><P>
|
||||
<a href="/cgi-bin/koha/maninvoice.pl?bornum=<TMPL_VAR NAME=bornum>"><image src=/images/create-man-invoice.gif border=0></a>
|
||||
<FONT SIZE=6><em>Account for <a href="moremember.pl?bornum=<TMPL_VAR name="bornum">"><TMPL_VAR NAME=firstname> <TMPL_VAR NAME=surname></a></em></FONT><P>
|
||||
<a href="/cgi-bin/koha/maninvoice.pl?bornum=<TMPL_VAR NAME=bornum>"><image src=<TMPL_VAR name="themelang">/images/create-man-invoice.gif border=0></a>
|
||||
|
||||
<a href="/cgi-bin/koha/mancredit.pl?bornum=<TMPL_VAR NAME=bornum>"><image src=/images/create-man-credit.gif border=0></a>
|
||||
<a href="/cgi-bin/koha/mancredit.pl?bornum=<TMPL_VAR NAME=bornum>"><image src=<TMPL_VAR name="themelang">/images/create-man-credit.gif border=0></a>
|
||||
<center>
|
||||
<p>
|
||||
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
<TABLE CELLSPACING=0 CELLPADDING=5 border=1 >
|
||||
|
||||
<TR VALIGN=TOP>
|
||||
<td bgcolor="#99cc33" background="/images/background-mem.gif" colspan=2><B>FINES & CHARGES</TD>
|
||||
<td bgcolor="#99cc33" background="/images/background-mem.gif" colspan=1><B>AMOUNT</TD>
|
||||
<td bgcolor="#99cc33" background="/images/background-mem.gif" colspan=1><B>STILL OWING</TD>
|
||||
<td bgcolor="#99cc33" background="<TMPL_VAR name="themelang">/images/background-mem.gif" colspan=2><B>FINES & CHARGES</TD>
|
||||
<td bgcolor="#99cc33" background="<TMPL_VAR name="themelang">/images/background-mem.gif" colspan=1><B>AMOUNT</TD>
|
||||
<td bgcolor="#99cc33" background="<TMPL_VAR name="themelang">/images/background-mem.gif" colspan=1><B>STILL OWING</TD>
|
||||
</TR>
|
||||
|
||||
<TMPL_LOOP NAME=accounts>
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue