[Koha-cvs] CVS: koha/C4 Maintainance.pm,1.12,1.13 Reserves.pm,1.5,1.6
Paul POULAIN
tipaul at users.sourceforge.net
Mon Dec 22 20:17:00 CET 2003
- Previous message: [Koha-cvs] CVS: koha/misc bulkmarcimport.pl,1.6,1.7 fines2.pl,1.9,1.10 Install.pm,1.69,1.70
- Next message: [Koha-cvs] CVS: koha/admin aqbudget.pl,1.15,1.16 authorised_values.pl,1.11,1.12 checkmarc.pl,1.5,1.6 systempreferences.pl,1.15,1.16 thesaurus.pl,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv17960/C4
Modified Files:
Maintainance.pm Reserves.pm
Log Message:
sync'ing with rel_2_0 (mostly prepare/execute pb, bug #662)
Index: Maintainance.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Maintainance.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** Maintainance.pm 3 Dec 2003 02:19:25 -0000 1.12
--- Maintainance.pm 22 Dec 2003 19:16:58 -0000 1.13
***************
*** 136,140 ****
$sth->execute($bib,$bi);
$sth->finish;
- $query="";
$sth=$dbh->prepare("update items set biblionumber=? where biblioitemnumber=?");
$sth->execute($bib,$bi);
--- 136,139 ----
Index: Reserves.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Reserves.pm 13 Oct 2002 08:30:23 -0000 1.5
--- Reserves.pm 22 Dec 2003 19:16:58 -0000 1.6
***************
*** 29,34 ****
use C4::Accounts;
use C4::Stats;
! use C4::InterfaceCDK;
! use C4::Interface::ReserveentCDK;
use C4::Circulation::Main;
use C4::Circulation::Borrower;
--- 29,34 ----
use C4::Accounts;
use C4::Stats;
! #use C4::InterfaceCDK;
! #use C4::Interface::ReserveentCDK;
use C4::Circulation::Main;
use C4::Circulation::Borrower;
***************
*** 117,128 ****
my $cnt_it = @items;
my $dbh = C4::Context->dbh;
! my $query = "Select * from biblio where biblionumber = $biblionumber";
! my $sth = $dbh->prepare($query);
! $sth->execute;
my $data=$sth->fetchrow_hashref;
$sth->finish;
my @branches;
! my $query = "select * from branches where issuing=1 order by branchname";
! my $sth=$dbh->prepare($query);
$sth->execute;
while (my $branchrec=$sth->fetchrow_hashref) {
--- 117,127 ----
my $cnt_it = @items;
my $dbh = C4::Context->dbh;
! my $query = "";
! my $sth = $dbh->prepare("Select * from biblio where biblionumber = ?");
! $sth->execute($biblionumber);
my $data=$sth->fetchrow_hashref;
$sth->finish;
my @branches;
! my $sth=$dbh->prepare("select * from branches where issuing=1 order by branchname");
$sth->execute;
while (my $branchrec=$sth->fetchrow_hashref) {
***************
*** 165,173 ****
my $dbh = C4::Context->dbh;
my $const = lc substr($constraint,0,1);
! my $query = "select * from borrowers,categories
! where (borrowernumber = '$borrnum')
! and (borrowers.categorycode = categories.categorycode)";
! my $sth = $dbh->prepare($query);
! $sth->execute;
my $data = $sth->fetchrow_hashref;
$sth->finish();
--- 164,171 ----
my $dbh = C4::Context->dbh;
my $const = lc substr($constraint,0,1);
! my $sth = $dbh->prepare("select * from borrowers,categories
! where (borrowernumber = ?)
! and (borrowers.categorycode = categories.categorycode)");
! $sth->execute($borrnum);
my $data = $sth->fetchrow_hashref;
$sth->finish();
***************
*** 178,186 ****
# first find biblioitem records
my @biblioitems;
! my $query1 = "select * from biblio,biblioitems
! where (biblio.biblionumber = '$biblionumber')
! and (biblio.biblionumber = biblioitems.biblionumber)";
! my $sth1 = $dbh->prepare($query1);
! $sth1->execute();
while (my $data1=$sth1->fetchrow_hashref) {
if ($const eq "a") {
--- 176,183 ----
# first find biblioitem records
my @biblioitems;
! my $sth1 = $dbh->prepare("select * from biblio,biblioitems
! where (biblio.biblionumber = ?)
! and (biblio.biblionumber = biblioitems.biblionumber)");
! $sth1->execute($biblionumber);
while (my $data1=$sth1->fetchrow_hashref) {
if ($const eq "a") {
***************
*** 206,218 ****
while ($x < $cntitemsfound) {
my $bitdata = @biblioitems[$x];
! my $query2 = "select * from items
! where biblioitemnumber = '$bitdata->{'biblioitemnumber'}'";
! my $sth2 = $dbh->prepare($query2);
! $sth2->execute;
while (my $itdata=$sth2->fetchrow_hashref) {
! my $query3 = "select * from issues
! where itemnumber = '$itdata->{'itemnumber'}' and returndate is null";
! my $sth3 = $dbh->prepare($query3);
! $sth3->execute();
if (my $isdata=$sth3->fetchrow_hashref) { } else {$allissued = 0; }
}
--- 203,213 ----
while ($x < $cntitemsfound) {
my $bitdata = @biblioitems[$x];
! my $sth2 = $dbh->prepare("select * from items
! where biblioitemnumber = ?");
! $sth2->execute($bitdata->{'biblioitemnumber'});
while (my $itdata=$sth2->fetchrow_hashref) {
! my $sth3 = $dbh->prepare("select * from issues
! where itemnumber = ? and returndate is null");
! $sth3->execute($itdata->{'itemnumber'});
if (my $isdata=$sth3->fetchrow_hashref) { } else {$allissued = 0; }
}
***************
*** 220,227 ****
}
if ($allissued == 0) {
! my $rquery = "select * from reserves
! where biblionumber = '$biblionumber'";
! my $rsth = $dbh->prepare($rquery);
! $rsth->execute();
if (my $rdata = $rsth->fetchrow_hashref) { } else {
$fee = 0;
--- 215,221 ----
}
if ($allissued == 0) {
! my $rsth = $dbh->prepare("select * from reserves
! where biblionumber = ?");
! $rsth->execute($biblionumber);
if (my $rdata = $rsth->fetchrow_hashref) { } else {
$fee = 0;
***************
*** 246,259 ****
if ($fee > 0) {
my $nextacctno = &getnextacctno($env,$borrnum,$dbh);
! my $updquery = "insert into accountlines
(borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding)
! values ($borrnum,$nextacctno,now(),$fee,'Reserve Charge','Res',$fee)";
! my $usth = $dbh->prepare($updquery);
! $usth->execute;
$usth->finish;
}
! my $query="insert into reserves (borrowernumber,biblionumber,reservedate,branchcode,constrainttype) values ('$borrnum','$biblionumber','$resdate','$branch','$const')";
! my $sth = $dbh->prepare($query);
! $sth->execute();
if (($const eq "o") || ($const eq "e")) {
my $numitems = @$bibitems;
--- 240,251 ----
if ($fee > 0) {
my $nextacctno = &getnextacctno($env,$borrnum,$dbh);
! my $usth = $dbh->prepare("insert into accountlines
(borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding)
! values (?,?,now(),?,'Reserve Charge','Res',?)");
! $usth->execute($borrnum,$nextacctno,$fee,$fee);
$usth->finish;
}
! my $sth = $dbh->prepare("insert into reserves (borrowernumber,biblionumber,reservedate,branchcode,constrainttype) values (?,?,?,?,?)");
! $sth->execute($borrnum,$biblionumber,$resdate,$branch,$const);
if (($const eq "o") || ($const eq "e")) {
my $numitems = @$bibitems;
***************
*** 261,269 ****
while ($i < $numitems) {
my $biblioitem = @$bibitems[$i];
! my $query = "insert into reserveconstraints
(borrowernumber,biblionumber,reservedate,biblioitemnumber)
! values ('$borrnum','$biblionumber','$resdate','$biblioitem')";
! my $sth = $dbh->prepare($query);
! $sth->execute();
$i++;
}
--- 253,260 ----
while ($i < $numitems) {
my $biblioitem = @$bibitems[$i];
! my $sth = $dbh->prepare("insert into reserveconstraints
(borrowernumber,biblionumber,reservedate,biblioitemnumber)
! values (?,?,?,?)");
! $sth->execute($borrnum,$biblionumber,$resdate,$biblioitem);
$i++;
}
- Previous message: [Koha-cvs] CVS: koha/misc bulkmarcimport.pl,1.6,1.7 fines2.pl,1.9,1.10 Install.pm,1.69,1.70
- Next message: [Koha-cvs] CVS: koha/admin aqbudget.pl,1.15,1.16 authorised_values.pl,1.11,1.12 checkmarc.pl,1.5,1.6 systempreferences.pl,1.15,1.16 thesaurus.pl,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Koha-cvs
mailing list