[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4/Circulation Renewals2.pm,1.5,1.6
From: |
Andrew Arensburger |
Subject: |
[Koha-cvs] CVS: koha/C4/Circulation Renewals2.pm,1.5,1.6 |
Date: |
Sat, 05 Oct 2002 02:55:01 -0700 |
Update of /cvsroot/koha/koha/C4/Circulation
In directory usw-pr-cvs1:/tmp/cvs-serv23760/C4/Circulation
Modified Files:
Renewals2.pm
Log Message:
Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.
Index: Renewals2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Renewals2.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Renewals2.pm 14 Aug 2002 18:12:52 -0000 1.5
--- Renewals2.pm 5 Oct 2002 09:54:59 -0000 1.6
***************
*** 29,33 ****
require Exporter;
use DBI;
- use C4::Database;
use C4::Stats;
use C4::Accounts2;
--- 29,32 ----
***************
*** 84,88 ****
# check renewal status
my ($env,$bornum,$itemno)address@hidden;
! my $dbh=C4Connect;
my $renews = 1;
my $renewokay = 0;
--- 83,87 ----
# check renewal status
my ($env,$bornum,$itemno)address@hidden;
! my $dbh = C4::Context->dbh;
my $renews = 1;
my $renewokay = 0;
***************
*** 109,113 ****
}
$sth1->finish;
- $dbh->disconnect;
return($renewokay);
}
--- 108,111 ----
***************
*** 117,121 ****
# mark book as renewed
my ($env,$bornum,$itemno,$datedue)address@hidden;
! my $dbh=C4Connect;
if ($datedue eq "" ) {
#debug_msg($env, "getting date");
--- 115,119 ----
# mark book as renewed
my ($env,$bornum,$itemno,$datedue)address@hidden;
! my $dbh = C4::Context->dbh;
if ($datedue eq "" ) {
#debug_msg($env, "getting date");
***************
*** 164,178 ****
# print $account;
}
- $dbh->disconnect;
# return();
}
!
sub calc_charges {
# calculate charges due
my ($env, $itemno, $bornum)address@hidden;
my $charge=0;
! my $dbh=C4Connect;
my $item_type;
my $q1 = "select itemtypes.itemtype,rentalcharge from
--- 162,178 ----
# print $account;
}
# return();
}
! # FIXME - This is very similar to
! # &C4::Circulation::Issues::calc_charges and
! # &C4::Circulation::Circ2::calc_charges.
! # Pick one and stick with it.
sub calc_charges {
# calculate charges due
my ($env, $itemno, $bornum)address@hidden;
my $charge=0;
! my $dbh = C4::Context->dbh;
my $item_type;
my $q1 = "select itemtypes.itemtype,rentalcharge from
***************
*** 200,204 ****
}
$sth1->finish;
- $dbh->disconnect;
# print "item $item_type";
return ($charge,$item_type);
--- 200,203 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4/Circulation Renewals2.pm,1.5,1.6,
Andrew Arensburger <=