[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha updateitem.pl,1.8,1.8.2.1
From: |
MJ Ray |
Subject: |
[Koha-cvs] CVS: koha updateitem.pl,1.8,1.8.2.1 |
Date: |
Thu, 08 Jan 2004 08:34:38 -0800 |
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv4860
Modified Files:
Tag: rel_2_0
updateitem.pl
Log Message:
DBI call fix for bug 662.
Index: updateitem.pl
===================================================================
RCS file: /cvsroot/koha/koha/updateitem.pl,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -r1.8 -r1.8.2.1
*** updateitem.pl 18 Mar 2003 11:15:37 -0000 1.8
--- updateitem.pl 8 Jan 2004 16:34:36 -0000 1.8.2.1
***************
*** 89,94 ****
if ($lost ==1){
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("Select * from issues where (itemnumber='$itemnum')
and (returndate is null)");
! $sth->execute;
my $data=$sth->fetchrow_hashref;
if ($data->{'borrowernumber'} ne '') {
--- 89,94 ----
if ($lost ==1){
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("Select * from issues where (itemnumber=?) and
(returndate is null)");
! $sth->execute($itemnum);
my $data=$sth->fetchrow_hashref;
if ($data->{'borrowernumber'} ne '') {
***************
*** 96,109 ****
my $accountno=getnextacctno($env,$data->{'borrowernumber'},$dbh);
my $item=getiteminformation($env, $itemnum);
! my $account="Insert into accountlines
(borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
values
!
('$data->{'borrowernumber'}','$accountno',now(),'$item->{'replacementprice'}',
! 'Lost Item $item->{'title'} $item->{'barcode'}','L',
! '$item->{'replacementprice'}','$itemnum')";
! my $sth2=$dbh->prepare($account);
! # print $input->header;
! # print $account;
! $sth2->execute;
$sth2->finish;
}
--- 96,106 ----
my $accountno=getnextacctno($env,$data->{'borrowernumber'},$dbh);
my $item=getiteminformation($env, $itemnum);
! my $sth2=$dbh->prepare("Insert into accountlines
(borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
values
! (?,?,now(),?,?,'L',?,?)");
!
$sth2->execute($data->{'borrowernumber'},$accountno,$item->{'replacementprice'},
! "Lost Item $item->{'title'} $item->{'barcode'}",
! $item->{'replacementprice'},$itemnum);
$sth2->finish;
}
***************
*** 124,129 ****
$flag=1;
}
! my $sth=$dbh->prepare("Select * from issues where (itemnumber='$itemnum')
and (returndate is null)");
! $sth->execute;
my $data=$sth->fetchrow_hashref;
if ($data->{'borrowernumber'} ne '') {
--- 121,126 ----
$flag=1;
}
! my $sth=$dbh->prepare("Select * from issues where (itemnumber=?) and
(returndate is null)");
! $sth->execute($itemnum);
my $data=$sth->fetchrow_hashref;
if ($data->{'borrowernumber'} ne '') {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha updateitem.pl,1.8,1.8.2.1,
MJ Ray <=