[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha acqui/acqui-home.pl acqui/neworderempty.pl...
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha acqui/acqui-home.pl acqui/neworderempty.pl... |
Date: |
Mon, 23 Apr 2007 13:10:09 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Changes by: Henri-Damien LAURENT <hdl> 07/04/23 13:10:08
Modified files:
acqui : acqui-home.pl neworderempty.pl
C4 : Accounts.pm Circulation.pm Members.pm
circ : circulation.pl
koha-tmpl/intranet-tmpl/prog/en/installer: step3.tmpl
koha-tmpl/intranet-tmpl/prog/en/members: moremember.tmpl
members : boraccount.pl borrowers_details.pl deletemem.pl
guarantor_search.pl mancredit.pl maninvoice.pl
memberentry.pl member.pl moremember.pl pay.pl
readingrec.pl
misc/notifys : fines.pl
opac : opac-account.pl opac-detail.pl
opac-ISBDdetail.pl opac-main.pl
opac-readingrecord.pl opac-user.pl
reserve : placerequest.pl request.pl
reviews : reviewswaiting.pl
serials : member-search.pl routing.pl routing-preview.pl
tools : cleanborrowers.pl
Log message:
Code Cleaning Members.
- checkaccount and getborraccountno => GetBorrowerAcctRecord
Many changes in names,
some changes in function signature.
Will be detailed in a mail to kohadevel.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/acqui-home.pl?cvsroot=koha&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/neworderempty.pl?cvsroot=koha&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Accounts.pm?cvsroot=koha&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation.pm?cvsroot=koha&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Members.pm?cvsroot=koha&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/koha/circ/circulation.pl?cvsroot=koha&r1=1.105&r2=1.106
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/installer/step3.tmpl?cvsroot=koha&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl?cvsroot=koha&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/koha/members/boraccount.pl?cvsroot=koha&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/koha/members/borrowers_details.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/members/deletemem.pl?cvsroot=koha&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/koha/members/guarantor_search.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/members/mancredit.pl?cvsroot=koha&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/koha/members/maninvoice.pl?cvsroot=koha&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/koha/members/memberentry.pl?cvsroot=koha&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/koha/members/member.pl?cvsroot=koha&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/koha/members/moremember.pl?cvsroot=koha&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/koha/members/pay.pl?cvsroot=koha&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/koha/members/readingrec.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/misc/notifys/fines.pl?cvsroot=koha&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-account.pl?cvsroot=koha&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-detail.pl?cvsroot=koha&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-ISBDdetail.pl?cvsroot=koha&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-main.pl?cvsroot=koha&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-readingrecord.pl?cvsroot=koha&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-user.pl?cvsroot=koha&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/koha/reserve/placerequest.pl?cvsroot=koha&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/koha/reserve/request.pl?cvsroot=koha&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/koha/reviews/reviewswaiting.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/serials/member-search.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/serials/routing.pl?cvsroot=koha&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/koha/serials/routing-preview.pl?cvsroot=koha&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/koha/tools/cleanborrowers.pl?cvsroot=koha&r1=1.3&r2=1.4
Patches:
Index: acqui/acqui-home.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/acqui-home.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- acqui/acqui-home.pl 9 Mar 2007 14:27:05 -0000 1.17
+++ acqui/acqui-home.pl 23 Apr 2007 13:10:07 -0000 1.18
@@ -15,7 +15,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: acqui-home.pl,v 1.17 2007/03/09 14:27:05 tipaul Exp $
+# $Id: acqui-home.pl,v 1.18 2007/04/23 13:10:07 hdl Exp $
=head1 NAME
@@ -65,7 +65,8 @@
);
# budget
-my ( $flags, $homebranch ) = GetFlagsAndBranchFromBorrower($loggedinuser);
+my $borrower= GetBorrower($loggedinuser);
+my ( $flags, $homebranch )= ($borrower->{'flags'},$borrower->{'branchcode'});
my @results = GetBookFunds($homebranch);
my $count = scalar @results;
Index: acqui/neworderempty.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/neworderempty.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- acqui/neworderempty.pl 9 Mar 2007 14:28:54 -0000 1.4
+++ acqui/neworderempty.pl 23 Apr 2007 13:10:07 -0000 1.5
@@ -185,7 +185,8 @@
$template->param( branchloop => address@hidden );
# build bookfund list
-my ($flags, $homebranch) = GetFlagsAndBranchFromBorrower($loggedinuser);
+my $borrower= GetBorrower($loggedinuser);
+my ( $flags, $homebranch )= ($borrower->{'flags'},$borrower->{'branchcode'});
my $count2;
my @bookfund;
Index: C4/Accounts.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Accounts.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- C4/Accounts.pm 18 Apr 2007 17:00:14 -0000 1.20
+++ C4/Accounts.pm 23 Apr 2007 13:10:08 -0000 1.21
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Accounts.pm,v 1.20 2007/04/18 17:00:14 tipaul Exp $
+# $Id: Accounts.pm,v 1.21 2007/04/23 13:10:08 hdl Exp $
use strict;
require Exporter;
@@ -28,7 +28,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.20 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.21 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
=head1 NAME
@@ -50,51 +50,9 @@
=cut
@ISA = qw(Exporter);
address@hidden = qw(&checkaccount &recordpayment &fixaccounts &makepayment
&manualinvoice
address@hidden = qw(&recordpayment &fixaccounts &makepayment &manualinvoice
&getnextacctno &reconcileaccount);
-=head2 checkaccount
-
- $owed = &checkaccount($borrowernumber, $dbh, $date);
-
-Looks up the total amount of money owed by a borrower (fines, etc.).
-
-C<$borrowernumber> specifies the borrower to look up.
-
-C<$dbh> is a DBI::db handle for the Koha database.
-
-=cut
-
-#'
-sub checkaccount {
- #take borrower number
- #check accounts and list amounts owing
- my ($borrowernumber,$dbh,$date)address@hidden;
- my $select="SELECT SUM(amountoutstanding) AS total
- FROM accountlines
- WHERE borrowernumber = ?
- AND amountoutstanding<>0";
- my @bind = ($borrowernumber);
- if ($date && $date ne ''){
- $select.=" AND date < ?";
- push(@bind,$date);
- }
- # print $select;
- my $sth=$dbh->prepare($select);
- $sth->execute(@bind);
- my $data=$sth->fetchrow_hashref;
- my $total = $data->{'total'} || 0;
- $sth->finish;
- # output(1,2,"borrower owes $total");
- #if ($total > 0){
- # # output(1,2,"borrower owes $total");
- # if ($total > 5){
- # reconcileaccount($dbh,$borrowernumber,$total);
- # }
- #}
- # pause();
- return($total);
-}
=head2 recordpayment
@@ -286,7 +244,7 @@
sub returnlost{
my ($borrowernumber,$itemnum)address@hidden;
my $dbh = C4::Context->dbh;
- my $borrower=borrdata('',$borrowernumber);
+ my $borrower=GetMember($borrowernumber,'borrowernumber');
my $sth=$dbh->prepare("Update issues set returndate=now() where
borrowernumber=? and itemnumber=? and returndate is null");
$sth->execute($borrowernumber,$itemnum);
Index: C4/Circulation.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- C4/Circulation.pm 18 Apr 2007 17:00:14 -0000 1.14
+++ C4/Circulation.pm 23 Apr 2007 13:10:08 -0000 1.15
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Circulation.pm,v 1.14 2007/04/18 17:00:14 tipaul Exp $
+# $Id: Circulation.pm,v 1.15 2007/04/23 13:10:08 hdl Exp $
use strict;
require Exporter;
@@ -26,7 +26,6 @@
use C4::Reserves2;
use C4::Koha;
use C4::Biblio;
-use C4::Accounts;
use C4::Reserves2;
use C4::Members;
use C4::Date;
@@ -44,7 +43,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.14 $' =~ /\d+/g; shift(@v).".".join(
"_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.15 $' =~ /\d+/g; shift(@v).".".join(
"_", map { sprintf "%03d", $_ } @v ); };
=head1 NAME
@@ -714,8 +713,8 @@
#
# DEBTS
- my $amount =
- checkaccount( $borrower->{'borrowernumber'}, $dbh, $duedate );
+ my ($amount) =
+ GetBorrowerAcctRecord( $borrower->{'borrowernumber'}, $duedate );
if ( C4::Context->preference("IssuingInProcess") ) {
my $amountlimit = C4::Context->preference("noissuescharge");
if ( $amount > $amountlimit && !$inprocess ) {
@@ -1661,7 +1660,7 @@
my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber );
if ( $charge > 0 ) {
my $accountno = getnextacctno( $borrowernumber );
- my $item = GetBiblioFromItemNumbe(r$itemnumber);
+ my $item = GetBiblioFromItemNumber($itemnumber);
$sth = $dbh->prepare(
"INSERT INTO accountlines
(borrowernumber,accountno,date,amount,
Index: C4/Members.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Members.pm,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- C4/Members.pm 18 Apr 2007 17:00:14 -0000 1.42
+++ C4/Members.pm 23 Apr 2007 13:10:08 -0000 1.43
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Members.pm,v 1.42 2007/04/18 17:00:14 tipaul Exp $
+# $Id: Members.pm,v 1.43 2007/04/23 13:10:08 hdl Exp $
use strict;
require Exporter;
@@ -26,13 +26,12 @@
use Digest::MD5 qw(md5_base64);
use Date::Calc qw/Today Add_Delta_YM/;
use C4::Log; # logaction
-use C4::Accounts;
use C4::Overdues;
use C4::Reserves2;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = do { my @v = '$Revision: 1.42 $' =~ /\d+/g; shift(@v) . "." . join(
"_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.43 $' =~ /\d+/g; shift(@v) . "." . join(
"_", map { sprintf "%03d", $_ } @v ); };
=head1 NAME
@@ -54,32 +53,74 @@
@ISA = qw(Exporter);
address@hidden = qw(
- &BornameSearch &GetMember &GetMemberDetails
- &borrdata &borrdata2
- &fixup_cardnumber &findguarantees &findguarantor &GuarantornameSearch
- &modmember &newmember &changepassword &borrissues &allissues
- &checkuniquemember &getzipnamecity &getidcity &getguarantordata
&getcategorytype
- &DeleteBorrower
- &calcexpirydate &checkuserpassword
- &getboracctrecord
- &GetborCatFromCatType &getborrowercategory
- &fixEthnicity
- ðnicitycategories &get_institutions add_member_orgs
- &get_age &GetBorrowersFromSurname &GetBranchCodeFromBorrowers
- &GetFlagsAndBranchFromBorrower
- &GetCities &GetRoadTypes &GetRoadTypeDetails &GetBorNotifyAcctRecord
+#Get data
+push @EXPORT, qw(
+ &SearchBorrower
+ &GetMemberDetails
+ &GetMember
+
+ &GetGuarantees
+ &findguarantor
+ &GuarantornameSearch
+
+ &GetBorrowerIssuesAndFines
+ &GetPendingIssues
+ &GetAllIssues
+
+ &get_institutions
+ &getzipnamecity
+ &getidcity
+
+ &GetAge
+ &GetCities
+ &GetRoadTypes
+ &GetRoadTypeDetails
+
+ &GetBorrowerAcctRecord
+
+ &GetborCatFromCatType
+ &GetBorrowercategory
+
+ &GetBorNotifyAcctRecord
&GetMembeReregistration
&GetSortDetails
+
&GetBorrowersTitles
&GetBorrowersWhoHaveNotBorrowedSince
&GetBorrowersWhoHaveNeverBorrowed
&GetBorrowersWithIssuesHistoryOlderThan
+ &GetBorrowersFromSurname
+
+ &GetExpiryDate
+);
+
+#Modify data
+push @EXPORT, qw(
+ &ModMember
+ &fixup_cardnumber
+ &changepassword
);
-=item BornameSearch
+#Delete data
+push @EXPORT, qw(
+ &DelMember
+);
+
+#Insert data
+push @EXPORT, qw(
+ &AddMember
+ &checkuniquemember
+ &checkuserpassword
+ &fixEthnicity
+ ðnicitycategories
+ &add_member_orgs
+
+ &MoveMemberToDeleted
+);
+
+=item Searchborrower
- ($count, $borrowers) = &BornameSearch($searchstring, $type);
+ ($count, $borrowers) = &SearchBorrower($searchstring, $type);
Looks up patrons (borrowers) by name.
@@ -91,7 +132,7 @@
must match the beginning a borrower's surname, first name, or other
name.
-C<&BornameSearch> returns a two-element list. C<$borrowers> is a
+C<&SearchBorrower> returns a two-element list. C<$borrowers> is a
reference-to-array; each element is a reference-to-hash, whose keys
are the fields of the C<borrowers> table in the Koha database.
C<$count> is the number of elements in C<$borrowers>.
@@ -101,8 +142,8 @@
#'
#used by member enquiries from the intranet
#called by member.pl
-sub BornameSearch {
- my ($searchstring, $orderby, $type ) = @_;
+sub SearchBorrower {
+ my ($searchstring, $orderby, $type,$category_type ) = @_;
my $dbh = C4::Context->dbh;
my $query = "";
my $count;
@@ -113,8 +154,9 @@
{
$query =
"SELECT * FROM borrowers
- LEFT JOIN categories ON
borrowers.categorycode=categories.categorycode
- WHERE surname LIKE ? ORDER BY $orderby";
+ LEFT JOIN categories ON
borrowers.categorycode=categories.categorycode ".
+ ($category_type?" AND category_type =
".$dbh->quote($category_type):"").
+ " WHERE surname LIKE ? ORDER BY $orderby";
@bind = ("$searchstring%");
}
else # advanced search looking in surname, firstname and othernames
@@ -126,7 +168,8 @@
WHERE ((surname LIKE ? OR surname LIKE ?
OR firstname LIKE ? OR firstname LIKE ?
OR othernames LIKE ? OR othernames LIKE ?)
- ";
+ ".
+ ($category_type?" AND category_type =
".$dbh->quote($category_type):"");
@bind = (
"$data[0]%", "% $data[0]%", "$data[0]%", "% $data[0]%",
"$data[0]%", "% $data[0]%"
@@ -163,80 +206,6 @@
return ( $cnt, address@hidden );
}
-=head3 GetFlagsAndBranchFromBorrower
-
-=over 4
-
-($flags, $homebranch) = GetFlagsAndBranchFromBorrower($loggedinuser);
-
-this function read on the database to get flags and homebranch for a user
-given on input arg.
-
-return :
-it returns the $flags & the homebranch in scalar context.
-
-=back
-
-=cut
-
-sub GetFlagsAndBranchFromBorrower {
- my $loggedinuser = @_;
- my $dbh = C4::Context->dbh;
- my $query = "
- SELECT flags, branchcode
- FROM borrowers
- WHERE borrowernumber = ?
- ";
- my $sth = $dbh->prepare($query);
- $sth->execute($loggedinuser);
-
- return $sth->fetchrow;
-}
-
-=item GetMember
-
- $borrower = &GetMember($cardnumber, $borrowernumber);
-
-Looks up information about a patron (borrower) by either card number
-or borrower number. If $borrowernumber is specified, C<&borrdata>
-searches by borrower number; otherwise, it searches by card number.
-
-C<&GetMember> returns a reference-to-hash whose keys are the fields of
-the C<borrowers> table in the Koha database.
-
-=cut
-
-sub GetMember {
- my ( $cardnumber, $borrowernumber ) = @_;
- $cardnumber = uc $cardnumber;
- my $dbh = C4::Context->dbh;
- my $sth;
- if ( $borrowernumber eq '' ) {
- $sth = $dbh->prepare("Select * from borrowers where cardnumber=?");
- $sth->execute($cardnumber);
- }
- else {
- $sth = $dbh->prepare("Select * from borrowers where borrowernumber=?");
- $sth->execute($borrowernumber);
- }
- my $data = $sth->fetchrow_hashref;
- $sth->finish;
- if ($data) {
- return ($data);
- }
- else { # try with firstname
- if ($cardnumber) {
- my $sth =
- $dbh->prepare("select * from borrowers where firstname=?");
- $sth->execute($cardnumber);
- my $data = $sth->fetchrow_hashref;
- $sth->finish;
- return ($data);
- }
- }
- return undef;
-}
-
=head2 GetMemberDetails
($borrower, $flags) = &GetMemberDetails($borrowernumber, $cardnumber);
@@ -350,7 +319,7 @@
return undef;
}
my $borrower = $sth->fetchrow_hashref;
- my $amount = C4::Accounts::checkaccount( $borrowernumber, $dbh );
+ my ($amount) = GetBorrowerAcctRecord( $borrowernumber);
$borrower->{'amountoutstanding'} = $amount;
my $flags = patronflags( $borrower, $dbh );
my $accessflagshash;
@@ -412,9 +381,9 @@
sub patronflags {
my %flags;
- my ( $patroninformation, $dbh ) = @_;
- my $amount =
- C4::Accounts::checkaccount( $patroninformation->{'borrowernumber'}, $dbh
);
+ my ( $patroninformation) = @_;
+ my $dbh=C4::Context->dbh;
+ my ($amount) = GetBorrowerAcctRecord(
$patroninformation->{'borrowernumber'});
if ( $amount > 0 ) {
my %flaginfo;
my $noissuescharge = C4::Context->preference("noissuescharge");
@@ -485,38 +454,40 @@
}
-=item borrdata
+=item GetMember
- $borrower = &borrdata($cardnumber, $borrowernumber);
+ $borrower = &GetMember($information, $type);
Looks up information about a patron (borrower) by either card number
-or borrower number. If $borrowernumber is specified, C<&borrdata>
-searches by borrower number; otherwise, it searches by card number.
+,firstname, or borrower number, depending on $type value.
+If C<$type> == 'cardnumber', C<&GetBorrower>
+searches by cardnumber then by firstname if not found in cardnumber;
+otherwise, it searches by borrowernumber.
-C<&borrdata> returns a reference-to-hash whose keys are the fields of
+C<&GetBorrower> returns a reference-to-hash whose keys are the fields of
the C<borrowers> table in the Koha database.
=cut
#'
-sub borrdata {
- my ( $cardnumber, $borrowernumber ) = @_;
- $cardnumber = uc $cardnumber;
+sub GetMember {
+ my ( $information, $type ) = @_;
my $dbh = C4::Context->dbh;
my $sth;
- if ( $borrowernumber eq '' ) {
+ if ($type eq 'cardnumber' || $type eq 'firstname'|| $type eq 'userid'||
$type eq 'borrowernumber'){
+ $information = uc $information;
$sth =
$dbh->prepare(
-"Select borrowers.*,categories.category_type from borrowers left join
categories on borrowers.categorycode=categories.categorycode where cardnumber=?"
+"Select borrowers.*,categories.category_type,categories.description from
borrowers left join categories on
borrowers.categorycode=categories.categorycode where $type=?"
);
- $sth->execute($cardnumber);
+ $sth->execute($information);
}
else {
$sth =
$dbh->prepare(
-"Select borrowers.*,categories.category_type from borrowers left join
categories on borrowers.categorycode=categories.categorycode where
borrowernumber=?"
+"Select borrowers.*,categories.category_type, categories.description from
borrowers left join categories on
borrowers.categorycode=categories.categorycode where borrowernumber=?"
);
- $sth->execute($borrowernumber);
+ $sth->execute($information);
}
my $data = $sth->fetchrow_hashref;
@@ -524,12 +495,12 @@
if ($data) {
return ($data);
}
- elsif ($cardnumber) { # try with firstname
+ elsif ($type eq 'cardnumber' ||$type eq 'firstname') { # try with
firstname
my $sth =
$dbh->prepare(
-"Select borrowers.*,categories.category_type from borrowers left join
categories on borrowers.categorycode=categories.categorycode where firstname=?"
+"Select borrowers.*,categories.category_type,categories.description from
borrowers left join categories on
borrowers.categorycode=categories.categorycode where firstname like ?"
);
- $sth->execute($cardnumber);
+ $sth->execute($information);
my $data = $sth->fetchrow_hashref;
$sth->finish;
return ($data);
@@ -539,14 +510,14 @@
}
}
-=item borrdata2
+=item GetBorrowerIssuesAndFines
- ($borrowed, $due, $fine) = &borrdata2($borrowernumber);
+ ($borrowed, $due, $fine) = &GetBorrowerIssuesAndFines($borrowernumber);
Returns aggregate data about items borrowed by the patron with the
given borrowernumber.
-C<&borrdata2> returns a three-element array. C<$borrowed> is the
+C<&GetBorrowerIssuesAndFines> returns a three-element array. C<$borrowed> is
the
number of books the patron currently has borrowed. C<$due> is the
number of overdue items the patron currently has borrowed. C<$fine> is
the total fine currently due by the borrower.
@@ -554,7 +525,7 @@
=cut
#'
-sub borrdata2 {
+sub GetBorrowerIssuesAndFines {
my ( $borrowernumber ) = @_;
my $dbh = C4::Context->dbh;
my $query =
@@ -585,7 +556,18 @@
$data3->{'sum(amountoutstanding)'} );
}
-sub modmember {
+=head2
+
+=item ModMember
+
+ ($borrowed, $due, $fine) = &ModMember($borrowernumber);
+
+Modify borrower's data
+
+=cut
+
+#'
+sub ModMember {
my (%data) = @_;
my $dbh = C4::Context->dbh;
$data{'dateofbirth'} = format_date_in_iso( $data{'dateofbirth'} );
@@ -683,18 +665,28 @@
# ok if its an adult (type) it may have borrowers that depend on it as a
guarantor
# so when we update information for an adult we should check for guarantees
and update the relevant part
# of their records, ie addresses and phone numbers
- my ( $category_type, undef ) = getcategorytype( $data{'category_type'} );
- if ( $category_type eq 'A' ) {
-
+ my $borrowercategory= GetBorrowercategory( $data{'category_type'} );
+ if ( $borrowercategory->{'category_type'} eq 'A' ) {
# is adult check guarantees;
- updateguarantees(%data);
+ UpdateGuarantees(%data);
}
&logaction(C4::Context->userenv->{'number'},"MEMBERS","MODIFY",$data{'borrowernumber'},"")
if C4::Context->preference("BorrowersLog");
}
-sub newmember {
+=head2
+
+=item AddMember
+
+ $borrowernumber = &ModMember(%borrower);
+
+insert new borrower into table
+
+=cut
+
+#'
+sub AddMember {
my (%data) = @_;
my $dbh = C4::Context->dbh;
$data{'userid'} = '' unless $data{'password'};
@@ -836,18 +828,11 @@
if C4::Context->preference("BorrowersLog");
}
-sub getmemberfromuserid {
- my ($userid) = @_;
- my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare("select * from borrowers where userid=?");
- $sth->execute($userid);
- return $sth->fetchrow_hashref;
-}
-sub updateguarantees {
+sub UpdateGuarantees {
my (%data) = @_;
my $dbh = C4::Context->dbh;
- my ( $count, $guarantees ) = findguarantees( $data{'borrowernumber'} );
+ my ( $count, $guarantees ) = GetGuarantees( $data{'borrowernumber'} );
for ( my $i = 0 ; $i < $count ; $i++ ) {
# FIXME
@@ -949,24 +934,24 @@
return $cardnumber;
}
-=head2 findguarantees
+=head2 GetGuarantees
- ($num_children, $children_arrayref) = &findguarantees($parent_borrno);
+ ($num_children, $children_arrayref) = &GetGuarantees($parent_borrno);
$child0_cardno = $children_arrayref->[0]{"cardnumber"};
$child0_borrno = $children_arrayref->[0]{"borrowernumber"};
-C<&findguarantees> takes a borrower number (e.g., that of a patron
+C<&GetGuarantees> takes a borrower number (e.g., that of a patron
with children) and looks up the borrowers who are guaranteed by that
borrower (i.e., the patron's children).
-C<&findguarantees> returns two values: an integer giving the number of
+C<&GetGuarantees> returns two values: an integer giving the number of
borrowers guaranteed by C<$parent_borrno>, and a reference to an array
of references to hash, which gives the actual results.
=cut
#'
-sub findguarantees {
+sub GetGuarantees {
my ($borrowernumber) = @_;
my $dbh = C4::Context->dbh;
my $sth =
@@ -976,135 +961,18 @@
$sth->execute($borrowernumber);
my @dat;
- while ( my $data = $sth->fetchrow_hashref ) {
- push @dat, $data;
- }
- $sth->finish;
- return ( scalar(@dat), address@hidden );
-}
-
-=head2 findguarantor
-
- $guarantor = &findguarantor($borrower_no);
- $guarantor_cardno = $guarantor->{"cardnumber"};
- $guarantor_surname = $guarantor->{"surname"};
- ...
-
-C<&findguarantor> takes a borrower number (presumably that of a child
-patron), finds the guarantor for C<$borrower_no> (the child's parent),
-and returns the record for the guarantor.
-
-C<&findguarantor> returns a reference-to-hash. Its keys are the fields
-from the C<borrowers> database table;
-
-=cut
-
-#'
-sub findguarantor {
- my ($borrowernumber) = @_;
- my $dbh = C4::Context->dbh;
- my $sth =
- $dbh->prepare("select guarantorid from borrowers where
borrowernumber=?");
- $sth->execute($borrowernumber);
- my $data = $sth->fetchrow_hashref;
- $sth->finish;
- $sth = $dbh->prepare("Select * from borrowers where borrowernumber=?");
- $sth->execute( $data->{'guarantorid'} );
- $data = $sth->fetchrow_hashref;
- $sth->finish;
- return ($data);
-}
-
-=item GuarantornameSearch
-
- ($count, $borrowers) = &GuarantornameSearch($searchstring, $type);
-
-Looks up guarantor by name.
-
-BUGFIX 499: C<$type> is now used to determine type of search.
-if $type is "simple", search is performed on the first letter of the
-surname only.
-
-C<$searchstring> is a space-separated list of search terms. Each term
-must match the beginning a borrower's surname, first name, or other
-name.
-
-C<&GuarantornameSearch> returns a two-element list. C<$borrowers> is a
-reference-to-array; each element is a reference-to-hash, whose keys
-are the fields of the C<borrowers> table in the Koha database.
-C<$count> is the number of elements in C<$borrowers>.
-
-return all info from guarantor =>only category_type A
-
-=cut
-
-#'
-#used by member enquiries from the intranet
-#called by guarantor_search.pl
-sub GuarantornameSearch {
- my ($searchstring, $orderby, $type ) = @_;
- my $dbh = C4::Context->dbh;
- my $query = "";
- my $count;
- my @data;
- my @bind = ();
-
- if ( $type eq "simple" ) # simple search for one letter only
- {
- $query =
-"Select * from borrowers,categories where
borrowers.categorycode=categories.categorycode and category_type='A' and
surname like ? order by $orderby";
- @bind = ("$searchstring%");
- }
- else # advanced search looking in surname, firstname and othernames
- {
- @data = split( ' ', $searchstring );
- $count = @data;
- $query = "Select * from borrowers,categories
- where ((surname like ? or surname like ?
- or firstname like ? or firstname like ?
- or othernames like ? or othernames like ?) and
borrowers.categorycode=categories.categorycode and category_type='A'
- ";
- @bind = (
- "$data[0]%", "% $data[0]%", "$data[0]%", "% $data[0]%",
- "$data[0]%", "% $data[0]%"
- );
- for ( my $i = 1 ; $i < $count ; $i++ ) {
- $query = $query . " and (" . " surname like ? or surname like ?
- or firstname like ? or firstname like ?
- or othernames like ? or othernames like ?)";
- push( @bind,
- "$data[$i]%", "% $data[$i]%", "$data[$i]%",
- "% $data[$i]%", "$data[$i]%", "% $data[$i]%" );
-
- # FIXME - .= <<EOT;
- }
- $query = $query . ") or cardnumber like ?
- order by $orderby";
- push( @bind, $searchstring );
-
- # FIXME - .= <<EOT;
- }
-
- my $sth = $dbh->prepare($query);
- $sth->execute(@bind);
- my @results;
- my $cnt = $sth->rows;
- while ( my $data = $sth->fetchrow_hashref ) {
- push( @results, $data );
- }
-
- # $sth->execute;
+ my $data = $sth->fetchall_arrayref({});
$sth->finish;
- return ( $cnt, address@hidden );
+ return ( scalar(@$data), $data );
}
-=head2 borrissues
+=head2 GetPendingIssues
- ($count, $issues) = &borrissues($borrowernumber);
+ ($count, $issues) = &GetPendingIssues($borrowernumber);
Looks up what the patron with the given borrowernumber has borrowed.
-C<&borrissues> returns a two-element array. C<$issues> is a
+C<&GetPendingIssues> returns a two-element array. C<$issues> is a
reference-to-array, where each element is a reference-to-hash; the
keys are the fields from the C<issues>, C<biblio>, and C<items> tables
in the Koha database. C<$count> is the number of elements in
@@ -1113,7 +981,7 @@
=cut
#'
-sub borrissues {
+sub GetPendingIssues {
my ($borrowernumber) = @_;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare(
@@ -1123,17 +991,13 @@
and issues.returndate is NULL order by date_due"
);
$sth->execute($borrowernumber);
- my @result;
- while ( my $data = $sth->fetchrow_hashref ) {
- push @result, $data;
- }
- $sth->finish;
- return ( scalar(@result), address@hidden );
+ my $data = $sth->fetchall_arrayref({});
+ return ( scalar(@$data), $data );
}
-=head2 allissues
+=head2 GetAllIssues
- ($count, $issues) = &allissues($borrowernumber, $sortkey, $limit);
+ ($count, $issues) = &GetAllIssues($borrowernumber, $sortkey, $limit);
Looks up what the patron with the given borrowernumber has borrowed,
and sorts the results.
@@ -1144,7 +1008,7 @@
C<$limit> is the maximum number of results to return.
-C<&allissues> returns a two-element array. C<$issues> is a
+C<&GetAllIssues> returns a two-element array. C<$issues> is a
reference-to-array, where each element is a reference-to-hash; the
keys are the fields from the C<issues>, C<biblio>, C<biblioitems>, and
C<items> tables of the Koha database. C<$count> is the number of
@@ -1153,7 +1017,7 @@
=cut
#'
-sub allissues {
+sub GetAllIssues {
my ( $borrowernumber, $order, $limit ) = @_;
#FIXME: sanity-check order and limit
@@ -1209,15 +1073,14 @@
return ( $i, address@hidden );
}
-=head2 getboracctrecord
- ($count, $acctlines, $total) = &getboracctrecord($borrowernumber);
+=head2 GetBorrowerAcctRecord
-Looks up accounting data for the patron with the given borrowernumber.
+ ($total, $acctlines, $count) = &GetBorrowerAcctRecord($borrowernumber);
-(FIXME - I'm not at all sure what this is about.)
+Looks up accounting data for the patron with the given borrowernumber.
-C<&getboracctrecord> returns a three-element array. C<$acctlines> is a
+C<&GetBorrowerAcctRecord> returns a three-element array. C<$acctlines> is a
reference-to-array, where each element is a reference-to-hash; the
keys are the fields of the C<accountlines> table in the Koha database.
C<$count> is the number of elements in C<$acctlines>. C<$total> is the
@@ -1226,36 +1089,32 @@
=cut
#'
-sub getboracctrecord {
- my ($params ) = @_;
+sub GetBorrowerAcctRecord {
+ my ($borrowernumber,$date) = @_;
my $dbh = C4::Context->dbh;
my @acctlines;
my $numlines = 0;
- my $sth = $dbh->prepare(
- "Select * from accountlines where
-borrowernumber=? order by date desc,timestamp desc"
+ my $strsth = qq(
+ Select * from accountlines where
+borrowernumber=? order by date desc,timestamp desc
);
+ my @bind = ($borrowernumber);
+ if ($date && $date ne ''){
+ $strsth.=" AND date < ?";
+ push(@bind,$date);
+ }
- $sth->execute( $params->{'borrowernumber'} );
+ my $sth= $dbh->prepare( $strsth );
+ $sth->execute( $borrowernumber);
my $total = 0;
while ( my $data = $sth->fetchrow_hashref ) {
- #FIXME before reinstating: insecure?
- # if ($data->{'itemnumber'} ne ''){
- # $query="Select * from items,biblio where items.itemnumber=
- # '$data->{'itemnumber'}' and
biblio.biblionumber=items.biblionumber";
- # my $sth2=$dbh->prepare($query);
- # $sth2->execute;
- # my $data2=$sth2->fetchrow_hashref;
- # $sth2->finish;
- # $data=$data2;
- # }
$acctlines[$numlines] = $data;
$numlines++;
$total += $data->{'amountoutstanding'};
}
$sth->finish;
- return ( $numlines, address@hidden, $total );
+ return ( $total, address@hidden,$numlines);
}
=head2 GetBorNotifyAcctRecord
@@ -1369,27 +1228,6 @@
return $data[0], $data[1];
}
-=head2 updatechildguarantor (OUEST-PROVENCE)
-
-check for title,firstname,surname,adress,zip code and city from guarantor to
-guarantorchild
-
-=cut
-
-#'
-
-sub getguarantordata {
- my ($borrowerid) = @_;
- my $dbh = C4::Context->dbh;
- my $sth =
- $dbh->prepare(
-"Select
title,firstname,surname,streetnumber,address,streettype,address2,zipcode,city,phone,phonepro,mobile,email,emailpro,fax
from borrowers where borrowernumber =? "
- );
- $sth->execute($borrowerid);
- my $guarantor_data = $sth->fetchrow_hashref;
- $sth->finish;
- return $guarantor_data;
-}
=head2 getdcity (OUEST-PROVENCE)
@@ -1406,26 +1244,14 @@
return $data;
}
-=head2 getcategorytype (OUEST-PROVENCE)
-check for the category_type with categorycode
-and return the category_type
+=head2 GetExpiryDate
-=cut
-
-sub getcategorytype {
- my ($categorycode) = @_;
- my $dbh = C4::Context->dbh;
- my $sth =
- $dbh->prepare(
-"Select category_type,description from categories where categorycode=? "
- );
- $sth->execute($categorycode);
- my ( $category_type, $description ) = $sth->fetchrow;
- return $category_type, $description;
-}
+ $expirydate = GetExpiryDate($categorycode, $dateenrolled);
+process expiry date given a date and a categorycode
-sub calcexpirydate {
+=cut
+sub GetExpiryDate {
my ( $categorycode, $dateenrolled ) = @_;
my $dbh = C4::Context->dbh;
my $sth =
@@ -1434,9 +1260,6 @@
$sth->execute($categorycode);
my ($enrolmentperiod) = $sth->fetchrow;
$enrolmentperiod = 12 unless ($enrolmentperiod);
-# warn "Avant format_date_in_iso :".$dateenrolled;
-# $dateenrolled=format_date_in_iso($dateenrolled);
-# warn "Apres format_date_in_iso :".$dateenrolled;
my @date=split /-/,format_date_in_iso($dateenrolled);
@date=Add_Delta_YM($date[0],$date[1],$date[2],0,$enrolmentperiod);
return sprintf("%04d-%02d-%02d",$date[0],$date[1],$date[2]);
@@ -1502,16 +1325,16 @@
return ( address@hidden, \%labels );
}
-=head2 getborrowercategory
+=head2 GetBorrowercategory
- $description,$dateofbirthrequired,$upperagelimit,$category_type =
&getborrowercategory($categorycode);
+ $hashref = &GetBorrowercategory($categorycode);
Given the borrower's category code, the function returns the corresponding
-description , dateofbirthrequired , upperagelimit and category type for a
comprehensive information display.
+data hashref for a comprehensive information display.
=cut
-sub getborrowercategory {
+sub GetBorrowercategory {
my ($catcode) = @_;
my $dbh = C4::Context->dbh;
my $sth =
@@ -1519,11 +1342,10 @@
"SELECT description,dateofbirthrequired,upperagelimit,category_type FROM
categories WHERE categorycode = ?"
);
$sth->execute($catcode);
- my ( $description, $dateofbirthrequired, $upperagelimit, $category_type ) =
- $sth->fetchrow();
+ my $data =
+ $sth->fetchrow_hashref;
$sth->finish();
- return ( $description, $dateofbirthrequired, $upperagelimit,
- $category_type );
+ return $data;
} # sub getborrowercategory
=head2 ethnicitycategories
@@ -1576,16 +1398,16 @@
return $data->{'name'};
} # sub fixEthnicity
-=head2 get_age
+=head2 GetAge
- $dateofbirth,$date = &get_age($date);
+ $dateofbirth,$date = &GetAge($date);
this function return the borrowers age with the value of dateofbirth
=cut
#'
-sub get_age {
+sub GetAge{
my ( $date, $date_ref ) = @_;
if ( not defined $date_ref ) {
@@ -1679,17 +1501,14 @@
my @results;
$count = 0;
- while ( my $data = $sth->fetchrow_hashref ) {
- push( @results, $data );
- $count++;
- }
+ my $data = $sth->fetchall_arrayref({});
$sth->finish;
- return ( $count, address@hidden );
+ return ( scalar(@$data), $data );
}
-=head2 citycaracteristiques (OUEST-PROVENCE)
+=head2 GetCities (OUEST-PROVENCE)
- ($id_cityarrayref, $city_hashref) = &citycaracteristic();
+ ($id_cityarrayref, $city_hashref) = &GetCities();
Looks up the different city and zip in the database. Returns two
elements: a reference-to-array, which lists the zip city
@@ -1765,7 +1584,7 @@
=cut
-sub DeleteBorrower {
+sub MoveMemberToDeleted {
my ($member) = @_;
my $dbh = C4::Context->dbh;
my $query;
@@ -1782,75 +1601,61 @@
. "?)" );
$sth->execute(@data);
$sth->finish;
- $query = qq|DELETE
- FROM borrowers
- WHERE borrowernumber=?|;
- $sth = $dbh->prepare($query);
- $sth->execute($member);
- $sth->finish;
- $query = qq|DELETE
- FROM reserves
- WHERE borrowernumber=?|;
- $sth = $dbh->prepare($query);
- $sth->execute($member);
- $sth->finish;
-
- # logging to action_log
- &logaction(C4::Context->userenv->{'number'},"MEMBERS","DELETE",$member,"")
- if C4::Context->preference("BorrowersLog");
}
-=head2 DelBorrowerCompletly
+=head2 DelMember
-DelBorrowerCompletly($borrowernumber);
+DelMember($borrowernumber);
This function remove directly a borrower whitout writing it on deleteborrower.
++ Deletes reserves for the borrower
=cut
-sub DelBorrowerCompletly {
+sub DelMember {
my $dbh = C4::Context->dbh;
my $borrowernumber = shift;
- return unless $borrowernumber; # date is mandatory.
- my $query = "
- DELETE *
+ return unless $borrowernumber; # borrowernumber is mandatory.
+
+ my $query = qq|DELETE
+ FROM reserves
+ WHERE borrowernumber=?|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute($borrowernumber);
+ $sth->finish;
+ $query = "
+ DELETE
FROM borrowers
WHERE borrowernumber = ?
";
my $sth = $dbh->prepare($query);
- $sth->execute($borrowernumber);
+
&logaction(C4::Context->userenv->{'number'},"MEMBERS","DELETE",$borrowernumber,"")
+ if C4::Context->preference("BorrowersLog");
return $sth->rows;
}
-=head2 member_reregistration (OUEST-PROVENCE)
-
-automatic reregistration in borrowers table
-with dateexpiry .
-
-=cut
+=head2 ExtendMemberSubscriptionTo (OUEST-PROVENCE)
-sub GetMembeReregistration {
- my ( $categorycode, $borrowerid ) = @_;
- my $dbh = C4::Context->dbh;
- my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) =
- localtime(time);
- $mon++;
- $year = $year + 1900;
- if ( $mon < '10' ) {
- $mon = "0" . $mon;
- }
- if ( $mday < '10' ) {
- $mday = "0" . $mday;
- }
- my $today = sprintf("%04d-%02d-%02d",$year,$mon,$mday);
- my $dateexpiry = calcexpirydate( $categorycode, $today );
- my $query = qq| UPDATE borrowers
- SET dateexpiry='$dateexpiry'
- WHERE borrowernumber='$borrowerid'|;
- my $sth = $dbh->prepare($query);
- $sth->execute;
- $sth->finish;
- return $dateexpiry;
+$date= ExtendMemberSubscriptionTo($borrowerid, $date);
+Extending the subscription to a given date or to the expiry date calculated on
local date.
+returns date
+=cut
+
+sub ExtendMemberSubscriptionTo {
+ my ( $borrowerid,$date) = @_;
+ my $dbh = C4::Context->dbh;
+ unless ($date){
+ $date=POSIX::strftime("%Y-%m-%d",localtime(time));
+ my $borrower = GetBorrower($borrowerid,'borrowernumber');
+ $date = GetExpiryDate( $borrower->{'categorycode'}, $date );
+ }
+ my $sth = $dbh->do(<<EOF);
+UPDATE borrowers
+SET dateexpiry='$date'
+WHERE borrowernumber='$borrowerid'
+EOF
+ return $date if ($sth);
+ return 0;
}
=head2 GetRoadTypes (OUEST-PROVENCE)
Index: circ/circulation.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/circulation.pl,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- circ/circulation.pl 18 Apr 2007 17:00:14 -0000 1.105
+++ circ/circulation.pl 23 Apr 2007 13:10:08 -0000 1.106
@@ -141,7 +141,7 @@
my $message;
if ($findborrower) {
my ( $count, $borrowers ) =
- BornameSearch($findborrower, 'cardnumber', 'web' );
+ SearchBorrower($findborrower, 'cardnumber', 'web' );
my @borrowers = @$borrowers;
if ( $#borrowers == -1 ) {
$query->param( 'findborrower', '' );
@@ -163,7 +163,7 @@
if ($borrowernumber) {
$borrower = GetMemberDetails( $borrowernumber, 0 );
- my ( $od, $issue, $fines ) = borrdata2( $borrowernumber );
+ my ( $od, $issue, $fines ) = GetBorrowerIssuesAndFines( $borrowernumber );
# Warningdate is the date that the warning starts appearing
my ( $today_year, $today_month, $today_day ) = Today();
@@ -248,7 +248,7 @@
}
# FIXME If the issue is confirmed, we launch another time borrdata2, now
display the issue count after issue
- my ( $od, $issue, $fines ) = borrdata2( $borrowernumber );
+ my ( $od, $issue, $fines ) = GetBorrowerIssuesAndFines(
$borrowernumber );
$template->param(
issuecount => $issue,
);
Index: koha-tmpl/intranet-tmpl/prog/en/installer/step3.tmpl
===================================================================
RCS file:
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/installer/step3.tmpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- koha-tmpl/intranet-tmpl/prog/en/installer/step3.tmpl 18 Mar 2007
02:16:23 -0000 1.5
+++ koha-tmpl/intranet-tmpl/prog/en/installer/step3.tmpl 23 Apr 2007
13:10:08 -0000 1.6
@@ -1,4 +1,5 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha › Web
Installer › Step 3</title>
+<!--TMPL_IF Name="finish"--><meta http-equiv="refresh" content="10;
url=/cgi-bin/koha/mainpage.pl"><!--/TMPL_IF-->
<!-- TMPL_INCLUDE NAME="installer-doc-head-close.inc" -->
<div>
<h1 id="logo"><img alt="Koha"
src="/intranet-tmpl/prog/en/images/koha.org-logo.gif" /></h1>
@@ -75,7 +76,10 @@
}
</script>
<!--/TMPL_IF-->
+<!--TMPL_IF Name="finish"-->
+ <h1>Congratulations, Installation complete</h1>
+<!--/TMPL_IF-->
<!--TMPL_IF Name="selectframeworks"-->
<h2 align="center">Selecting Default Settings</h2>
<form name="frameworkselection" method="post" action="install.pl">
@@ -98,7 +102,7 @@
<!--TMPL_LOOP Name="frameworks"-->
<div style="border:1px;">
<p>
- <!--TMPL_IF Name="mandatory"--><input type="checkbox" Name="framework"
value="<!--TMPL_VAR Name="fwkfile"-->" checked />
+ <!--TMPL_IF Name="checked"--><input type="checkbox" Name="framework"
value="<!--TMPL_VAR Name="fwkfile"-->" checked />
<!--TMPl_ELSE--><input type="checkbox" Name="framework"
value="<!--TMPL_VAR Name="fwkfile"-->" />
<!--/TMPL_IF-->
<!--TMPL_VAR Name="fwkdescription"-->
@@ -187,6 +191,6 @@
<a href="install.pl?step=3&op=selectframeworks" class="button">Continue to
Framework Selection</a>
</div>
<!--/TMPL_IF-->
-</div>
+
</body>
</html>
Index: koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl
===================================================================
RCS file:
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl 16 Mar 2007
01:25:09 -0000 1.19
+++ koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl 23 Apr 2007
13:10:08 -0000 1.20
@@ -141,7 +141,7 @@
<fieldset>
<legend>Library use</legend>
<p><label>Borrower number:</label><!-- TMPL_VAR NAME="borrowernumber"
--></p>
- <p><label>Category:</label><!-- TMPL_VAR NAME="categorycode" --></p>
+ <p><label>Category:</label><!-- TMPL_VAR NAME="description" --></p>
<p><label>Registration date:</label><!-- TMPL_VAR NAME="dateenrolled"
--></p>
<p><label>Relation:</label><!-- TMPL_VAR NAME="relationship" --></p>
Index: members/boraccount.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/boraccount.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- members/boraccount.pl 9 Mar 2007 14:56:55 -0000 1.5
+++ members/boraccount.pl 23 Apr 2007 13:10:08 -0000 1.6
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: boraccount.pl,v 1.5 2007/03/09 14:56:55 tipaul Exp $
+# $Id: boraccount.pl,v 1.6 2007/04/23 13:10:08 hdl Exp $
#writen 11/1/2000 by address@hidden
#script to display borrowers account details
@@ -48,12 +48,10 @@
my $borrowernumber=$input->param('borrowernumber');
#get borrower details
-my $data=borrdata('',$borrowernumber);
+my $data=GetMember($borrowernumber,'borrowernumber');
#get account details
-my %bor;
-$bor{'borrowernumber'}=$borrowernumber;
-my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
+my ($numaccts,$accts,$total)=GetBorrowerAcctRecord($borrowernumber);
my $totalcredit;
if($total <= 0){
$totalcredit = 1;
Index: members/borrowers_details.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/borrowers_details.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- members/borrowers_details.pl 9 Mar 2007 14:56:55 -0000 1.3
+++ members/borrowers_details.pl 23 Apr 2007 13:10:08 -0000 1.4
@@ -2,7 +2,7 @@
# NOTE: This file uses standard 8-space tabs
# DO NOT SET TAB SIZE TO 4
-# $Id: borrowers_details.pl,v 1.3 2007/03/09 14:56:55 tipaul Exp $
+# $Id: borrowers_details.pl,v 1.4 2007/04/23 13:10:08 hdl Exp $
#script to set up screen for modification of borrower details
#written 20/12/99 by address@hidden
@@ -59,10 +59,10 @@
if ( $data{'surname'} eq '')
{
- $data=borrdata('',$borrowernumber);
+ $data=GetMember($borrowernumber,'borrowernumber');
%data=%$data;
}
- my ($category_type,$description) = getcategorytype($data{'categorycode'});
+ my $borrowercategory = GetBorrowercategory($data{'categorycode'});
$template->param( borrowernumber => $borrowernumber,#register
number
#transform value in capital or capital for
first letter of the word
@@ -70,11 +70,11 @@
surname => uc($data{'surname'}),
categorycode => $data{'categorycode'},
title => $data{'title'},
- category_type => $category_type,
+ category_type => $borrowercategory
->{'category_type'},
# #
"title_".$data{'title'} => "
SELECTED ",
dateofbirth =>
format_date($data{'dateofbirth'}),
- description =>$description
+ description =>
$borrowercategory->{'description'}
#
);
$template->param(Institution => 1) if ($category_type eq "I");
Index: members/deletemem.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/deletemem.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- members/deletemem.pl 18 Apr 2007 17:00:14 -0000 1.12
+++ members/deletemem.pl 23 Apr 2007 13:10:08 -0000 1.13
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: deletemem.pl,v 1.12 2007/04/18 17:00:14 tipaul Exp $
+# $Id: deletemem.pl,v 1.13 2007/04/23 13:10:08 hdl Exp $
#script to delete items
#written 2/5/00
@@ -107,7 +107,8 @@
output_html_with_http_headers $input, $cookie, $template->output;
} else {
- DeleteBorrower($member);
+ MoveMemberToDeleted($member);
+ DelMember($member);
print $input->redirect("/cgi-bin/koha/members/members-home.pl");
}
Index: members/guarantor_search.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/guarantor_search.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- members/guarantor_search.pl 18 Apr 2007 17:00:14 -0000 1.3
+++ members/guarantor_search.pl 23 Apr 2007 13:10:08 -0000 1.4
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: guarantor_search.pl,v 1.3 2007/04/18 17:00:14 tipaul Exp $
+# $Id: guarantor_search.pl,v 1.4 2007/04/23 13:10:08 hdl Exp $
# script to find a guarantor
@@ -65,15 +65,15 @@
if ($member ne ''){
if(length($member) == 1)
{
-
($count,$results)=GuarantornameSearch($member,$orderby,"simple");
+ ($count,$results)=SearchBorrower($member,$orderby,"simple",'A');
}
else
{
-
($count,$results)=GuarantornameSearch($member,$orderby,"advanced");
+
($count,$results)=SearchBorrower($member,$orderby,"advanced",'A');
}
for (my $i=0; $i < $count; $i++){
#find out stats
- my ($od,$issue,$fines)=borrdata2($results->[$i]{'borrowerid'});
+ my
($od,$issue,$fines)=GetBorrowerIssuesAndFines($results->[$i]{'borrowerid'});
my $guarantorinfo=uc($results->[$i]{'surname'})." ,
".ucfirst($results->[$i]{'firstname'});
my %row = (
background => $background,
Index: members/mancredit.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/mancredit.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- members/mancredit.pl 20 Mar 2007 01:45:18 -0000 1.7
+++ members/mancredit.pl 23 Apr 2007 13:10:08 -0000 1.8
@@ -34,7 +34,7 @@
my $borrowernumber=$input->param('borrowernumber');
#get borrower details
-my $data=borrdata('',$borrowernumber);
+my $data=GetMember($borrowernumber,'borrowernumber');
my $add=$input->param('add');
if ($add){
Index: members/maninvoice.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/maninvoice.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- members/maninvoice.pl 20 Mar 2007 01:27:40 -0000 1.7
+++ members/maninvoice.pl 23 Apr 2007 13:10:08 -0000 1.8
@@ -34,7 +34,7 @@
my $borrowernumber=$input->param('borrowernumber');
# get borrower details
-my $data=borrdata('',$borrowernumber);
+my $data=GetMember($borrowernumber,'borrowernumber');
my $add=$input->param('add');
if ($add){
Index: members/memberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/memberentry.pl,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- members/memberentry.pl 10 Mar 2007 01:11:22 -0000 1.41
+++ members/memberentry.pl 23 Apr 2007 13:10:08 -0000 1.42
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $Id: memberentry.pl,v 1.41 2007/03/10 01:11:22 kados Exp $
+# $Id: memberentry.pl,v 1.42 2007/04/23 13:10:08 hdl Exp $
# Copyright 2006 SAN OUEST PROVENCE et Paul POULAIN
#
@@ -47,9 +47,10 @@
my $categorycode=$input->param('categorycode');
my $category_type;
$category_type = $input->param('category_type');
-
-my $desc;
-($category_type,$desc) = getcategorytype($categorycode) unless ($category_type
or !($categorycode));
+unless ($category_type or !($categorycode)){
+ my $borrowercategory= GetBorrowercategory($categorycode);
+ $category_type = $borrowercategory->{'category_type'};
+}
die "NO CATEGORY TYPE !" unless $category_type; # FIXME we should display a
error message instead of a 500 error !
@@ -91,7 +92,7 @@
}
$template->param("add"=>1) if ($op eq 'add');
$template->param( "checked" => 1) if ($nodouble eq 1);
-($borrower_data=borrdata('',$borrowernumber)) if($op eq 'modify');
+($borrower_data=GetMember($borrowernumber,'borrowernumber')) if($op eq
'modify');
# if a add or modify is requested => check validity of data.
if ($step eq 0){
@@ -110,17 +111,19 @@
# WARN : some tests must be done whatever the step, because the
librarian can click on any tab.
#############test for member being unique #############
if ($op eq 'add'){
- (my $category_type_send=$category_type ) if ($category_type eq
'I');
+ my $category_type_send=$category_type if ($category_type eq 'I');
my $check_category; # recover the category code of the doublon
suspect borrowers
($check_member,$check_category)=
checkuniquemember($category_type_send,$data{'surname'},$data{'firstname'},format_date_in_iso($data{'dateofbirth'}));
-# recover the category type if the borrowers is a doublon
- ($check_categorytype,undef)=getcategorytype($check_category);
+ # recover the category type if the borrowers is a doublon
+ my $tmpborrowercategory=GetBorrowercategory($check_category);
+ $check_categorytype=$tmpborrowercategory->{'category_type'};
+
}
#recover all data from guarantor address phone ,fax...
if ($category_type eq 'C' and $guarantorid ne '' ){
- my $guarantordata=getguarantordata($guarantorid);
+ my $guarantordata=GetMember($guarantorid);
$guarantorinfo=$guarantordata->{'surname'}." ,
".$guarantordata->{'firstname'};
if (($data{'contactname'} eq '' or $data{'contactname'}
ne $guarantordata->{'surname'})) {
$data{'contactfirstname'}=$guarantordata->{'firstname'};
@@ -155,9 +158,9 @@
my $dateofbirthmandatory=0;
map {$dateofbirthmandatory=1 if $_ eq "dateofbirth"} @field_check;
if ($category_type ne 'I' && $data{dateofbirth} &&
$dateofbirthmandatory) {
- my $age = get_age(format_date_in_iso($data{dateofbirth}));
- my
(undef,$agelimitmin,$agelimitmax,undef)=getborrowercategory($data{'categorycode'});
- if (($age > $agelimitmax) or ($age < $agelimitmin)) {
+ my $age = GetAge(format_date_in_iso($data{dateofbirth}));
+ my $borrowercategory=GetBorrowercategory($data{'categorycode'});
+ if (($age > $borrowercategory->{'upperagelimit'}) or ($age <
$borrowercategory->{'dateofbirthrequired'})) {
push @errors, 'ERROR_age_limitations';
$nok = 1;
}
@@ -166,8 +169,6 @@
# STEP 2
if ($step eq 2) {
-
-
if ( ($data{'userid'} eq '')){
my
$onefirstnameletter=substr($data{'firstname'},0,1);
my
$fivesurnameletter=substr($data{'surname'},0,5);
@@ -177,14 +178,12 @@
my $today= sprintf('%04d-%02d-%02d', Today());
#insert ,in field "dateenrolled" , the current
date
$data{'dateenrolled'}=$today;
- #if date expiry is null u must calculate the
value only in this case
- $data{'dateexpiry'} =
calcexpirydate($data{'categorycode'},$today);
+ $data{'dateexpiry'} =
GetExpiryDate($data{'categorycode'},$today);
}
if ($op eq 'modify' ){
+ unless ($data{'dateexpiry'}){
my $today= sprintf('%04d-%02d-%02d', Today());
-# if date expiry is null u must calculate the value only
in this case
- if ($data{'dateexpiry'} eq ''){
- $data{'dateexpiry'} =
calcexpirydate($data{'categorycode'},$today);
+ $data{'dateexpiry'} =
GetExpiryDate($data{'categorycode'},$today);
}
}
}
@@ -196,7 +195,7 @@
if ($op eq 'modify'){
# test to know if another user have the same password
and same login
if ($loginexist eq 0) {
- &modmember(%data);
+ &ModMember(%data);
}
else {
push @errors, "ERROR_login_exist";
@@ -208,7 +207,7 @@
push @errors, "ERROR_login_exist";
$nok=1;
} else {
- $borrowernumber = &newmember(%data);
+ $borrowernumber = &AddMember(%data);
if ($data{'organisations'}){
# need to add the members organisations
my @orgs=split(/\|/,$data{'organisations'});
@@ -245,7 +244,7 @@
my $data;
# test to now if u add or modify a borrower (modify =>to take all carateristic
of the borrowers)
if (!$op and !$data{'surname'}) {
- $data=borrdata('',$borrowernumber);
+ $data=GetMember($borrowernumber,'borrowernumber');
%data=%$data;
}
if (C4::Context->preference("IndependantBranches")) {
Index: members/member.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/member.pl,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- members/member.pl 18 Apr 2007 17:00:14 -0000 1.16
+++ members/member.pl 23 Apr 2007 13:10:08 -0000 1.17
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: member.pl,v 1.16 2007/04/18 17:00:14 tipaul Exp $
+# $Id: member.pl,v 1.17 2007/04/23 13:10:08 hdl Exp $
#script to do a borrower enquiery/brin up borrower details etc
#written 20/12/99 by address@hidden
@@ -72,11 +72,11 @@
if(length($member) == 1)
{
- ($count,$results)=BornameSearch($member,$orderby,"simple");
+ ($count,$results)=SearchBorrower($member,$orderby,"simple");
}
else
{
- ($count,$results)=BornameSearch($member,$orderby,"advanced");
+ ($count,$results)=SearchBorrower($member,$orderby,"advanced");
}
@@ -84,7 +84,7 @@
my $background = 0;
for (my $i=0; $i < $count; $i++){
#find out stats
- my ($od,$issue,$fines)=borrdata2($results->[$i]{'borrowernumber'});
+ my
($od,$issue,$fines)=GetBorrowerIssuesAndFines($results->[$i]{'borrowernumber'});
my %row = (
background => $background,
Index: members/moremember.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/moremember.pl,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- members/moremember.pl 18 Apr 2007 17:00:14 -0000 1.32
+++ members/moremember.pl 23 Apr 2007 13:10:08 -0000 1.33
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: moremember.pl,v 1.32 2007/04/18 17:00:14 tipaul Exp $
+# $Id: moremember.pl,v 1.33 2007/04/23 13:10:08 hdl Exp $
=head1 moremember.pl
@@ -78,7 +78,7 @@
my $borrowernumber = $input->param('borrowernumber');
#start the page and read in includes
-my $data = borrdata( '', $borrowernumber );
+my $data = GetMember( $borrowernumber ,'borrowernumber');
my $reregistration = $input->param('reregistration');
if ( not defined $data ) {
@@ -96,8 +96,8 @@
$borrowernumber, $data->{'dateenrolled'}
)
) if ( $reregistration eq 'y' );
-my ( undef, undef, undef, $category_type ) =
- getborrowercategory( $data->{'categorycode'} );
+my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
+my $category_type = $borrowercategory->{'category_type'};
# in template <TMPL_IF name="I"> => instutitional (A for Adult& C for
children)
$template->param( $data->{'categorycode'} => 1 );
@@ -120,7 +120,7 @@
$data->{ &expand_sex_into_predicate( $data->{'sex'} ) } = 1;
if ( $category_type eq 'C' and $data->{'guarantorid'} ne '0' ) {
- my $data2 = borrdata( '', $data->{'guarantorid'} );
+ my $data2 = GetMember( $data->{'guarantorid'} ,'borrowernumber');
$data->{'address'} = $data2->{'address'};
$data->{'city'} = $data2->{'city'};
$data->{'B_address'} = $data2->{'B_address'};
@@ -140,7 +140,7 @@
# It looks like the $i is only being returned to handle walking through
# the array, which is probably better done as a foreach loop.
#
- my ( $count, $guarantees ) = findguarantees( $data->{'borrowernumber'} );
+ my ( $count, $guarantees ) = GetGuarantees( $data->{'borrowernumber'} );
my @guaranteedata;
for ( my $i = 0 ; $i < $count ; $i++ ) {
push(
@@ -158,15 +158,14 @@
}
else {
- my ($guarantorid) = findguarantor( $data->{'borrowernumber'} );
- ( $template->param( guarantor => 1 ) )
- if ( ( $data->{'guarantorid'} > '0' ) );
- if ( $guarantorid->{'borrowernumber'} ) {
+ if ($data->{'guarantorid'}){
+ my ($guarantor) = GetMember( $data->{'guarantorid'},'biblionumber');
$template->param(
- guarantorborrowernumber => $guarantorid->{'borrowernumber'},
- guarantorcardnumber => $guarantorid->{'cardnumber'},
- guarantorfirstname => $guarantorid->{'firstname'},
- guarantorsurname => $guarantorid->{'surname'}
+ guarantor => 1,
+ guarantorborrowernumber => $guarantor->{'borrowernumber'},
+ guarantorcardnumber => $guarantor->{'cardnumber'},
+ guarantorfirstname => $guarantor->{'firstname'},
+ guarantorsurname => $guarantor->{'surname'}
);
}
}
@@ -193,11 +192,8 @@
$data->{'branchname'} =
( ( GetBranchDetail( $data->{'branchcode'} ) )->{'branchname'} );
-# Converts the categorycode to the description
-( $data->{'categorycode'}, undef, undef ) =
- &getborrowercategory( $data->{'categorycode'} );
-my ( $numaccts, $accts, $total ) = getboracctrecord( '', \%bor );
+my ( $total, $accts, $numaccts) = GetBorrowerAcctRecord( $borrowernumber );
my $lib1 = &GetSortDetails( "Bsort1", $data->{'sort1'} );
my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'} );
( $template->param( lib1 => $lib1 ) ) if ($lib1);
@@ -205,7 +201,7 @@
# current issues
#
-my ( $count, $issue ) = borrissues($borrowernumber);
+my ( $count, $issue ) = GetPendingIssues($borrowernumber);
my $roaddetails = &GetRoadTypeDetails( $data->{'streettype'} );
my $today = ParseDate('today');
my @issuedata;
Index: members/pay.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/pay.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- members/pay.pl 18 Apr 2007 17:00:15 -0000 1.10
+++ members/pay.pl 23 Apr 2007 13:10:08 -0000 1.11
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: pay.pl,v 1.10 2007/04/18 17:00:15 tipaul Exp $
+# $Id: pay.pl,v 1.11 2007/04/23 13:10:08 hdl Exp $
=head1 pay.pl
@@ -46,12 +46,10 @@
}
# get borrower details
-my $data = borrdata( '', $borrowernumber );
+my $data = GetMember( $borrowernumber,'borrowernumber' );
my $user = $input->remote_user;
# get account details
-my %bor;
-$bor{'borrowernumber'} = $borrowernumber;
my $branches = GetBranches();
my $printers = GetPrinters();
my $branch = GetBranch( $input, $branches );
@@ -91,7 +89,7 @@
recordpayment( $borrowernumber, $total );
}
- my ( $numaccts, $accts, $total ) = getboracctrecord( '', \%bor );
+ my ( $total, $accts, $numaccts) = GetBorrowerAcctRecord( $borrowernumber );
# creation d'une fonction qui va nous retourner le notify_id dans un
tableau
Index: members/readingrec.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/readingrec.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- members/readingrec.pl 9 Mar 2007 14:56:55 -0000 1.3
+++ members/readingrec.pl 23 Apr 2007 13:10:08 -0000 1.4
@@ -33,7 +33,7 @@
my $borrowernumber=$input->param('borrowernumber');
#get borrower details
-my $data=borrdata('',$borrowernumber);
+my $data=GetMember($borrowernumber,'borrowernumber');
my $order=$input->param('order');
my $order2=$order;
if ($order2 eq ''){
@@ -49,7 +49,7 @@
else {
$limit=50;
}
-my ($count,$issues)=allissues($borrowernumber,$order2,$limit);
+my ($count,$issues)=GetAllIssues($borrowernumber,$order2,$limit);
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "members/readingrec.tmpl",
Index: misc/notifys/fines.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/notifys/fines.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- misc/notifys/fines.pl 18 Apr 2007 17:00:15 -0000 1.6
+++ misc/notifys/fines.pl 23 Apr 2007 13:10:08 -0000 1.7
@@ -315,7 +315,7 @@
$template->param(BOOKDETAILS =>
address@hidden);
my %params;
%params->{'borrowernumber'} =
$overdue->{'borrowernumber'};
- my ($count, $acctlines, $total) =
&getboracctrecord(\%params);
+ my ($total, $acctlines, $count) =
&GetBorrowerAcctRecord($overdue->{'borrowernumber'});
$template->param(FINES_TOTAL =>
$total_fines);
$template->param(OWING => $total);
my $name= "$borrower->{'firstname'}
$borrower->{'surname'}";
Index: opac/opac-account.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-account.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- opac/opac-account.pl 4 Apr 2007 16:46:23 -0000 1.13
+++ opac/opac-account.pl 23 Apr 2007 13:10:08 -0000 1.14
@@ -41,7 +41,7 @@
);
# get borrower information ....
-my ( $borr, $flags ) = GetMemberDetails( $borrowernumber );
+my $borr = GetMemberDetails( $borrowernumber );
my @bordat;
$bordat[0] = $borr;
@@ -49,7 +49,7 @@
$template->param( BORROWER_INFO => address@hidden );
#get account details
-my ( $numaccts, $accts, $total ) = getboracctrecord( undef, $borr );
+my ( $total , $accts, $numaccts) = GetBorrowerAcctRecord( $borrowernumber );
for ( my $i = 0 ; $i < $numaccts ; $i++ ) {
$accts->[$i]{'date'} = format_date( $accts->[$i]{'date'} );
Index: opac/opac-detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-detail.pl,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- opac/opac-detail.pl 9 Mar 2007 15:12:54 -0000 1.33
+++ opac/opac-detail.pl 23 Apr 2007 13:10:08 -0000 1.34
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: opac-detail.pl,v 1.33 2007/03/09 15:12:54 tipaul Exp $
+# $Id: opac-detail.pl,v 1.34 2007/04/23 13:10:08 hdl Exp $
use strict;
require Exporter;
@@ -110,7 +110,7 @@
my $reviews = getreviews( $biblionumber, 1 );
foreach ( @$reviews ) {
my $borrower_number_review = $_->{borrowernumber};
- my $borrowerData = GetMember('',$borrower_number_review);
+ my $borrowerData =
GetMember($borrower_number_review,'borrowernumber');
# setting some borrower info into this hash
$_->{title} = $borrowerData->{'title'};
$_->{surname} = $borrowerData->{'surname'};
Index: opac/opac-ISBDdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-ISBDdetail.pl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- opac/opac-ISBDdetail.pl 29 Mar 2007 13:30:32 -0000 1.18
+++ opac/opac-ISBDdetail.pl 23 Apr 2007 13:10:08 -0000 1.19
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: opac-ISBDdetail.pl,v 1.18 2007/03/29 13:30:32 tipaul Exp $
+# $Id: opac-ISBDdetail.pl,v 1.19 2007/04/23 13:10:08 hdl Exp $
=head1 NAME
@@ -173,7 +173,7 @@
my $reviews = getreviews( $biblionumber, 1 );
foreach ( @$reviews ) {
my $borrower_number_review = $_->{borrowernumber};
- my $borrowerData = GetMember('',$borrower_number_review);
+ my $borrowerData =
GetMember($borrower_number_review,'borrowernumber');
# setting some borrower info into this hash
$_->{title} = $borrowerData->{'title'};
$_->{surname} = $borrowerData->{'surname'};
Index: opac/opac-main.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-main.pl,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- opac/opac-main.pl 6 Apr 2007 14:48:45 -0000 1.25
+++ opac/opac-main.pl 23 Apr 2007 13:10:08 -0000 1.26
@@ -15,7 +15,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: opac-main.pl,v 1.25 2007/04/06 14:48:45 hdl Exp $
+# $Id: opac-main.pl,v 1.26 2007/04/23 13:10:08 hdl Exp $
use strict;
require Exporter;
@@ -68,7 +68,7 @@
);
}
-my $borrower = GetMember( '', $borrowernumber );
+my $borrower = GetMember( $borrowernumber,'borrowernumber' );
my @languages;
my $counter = 0;
my $langavail = getTranslatedLanguages('opac');
Index: opac/opac-readingrecord.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-readingrecord.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- opac/opac-readingrecord.pl 4 Apr 2007 16:46:23 -0000 1.12
+++ opac/opac-readingrecord.pl 23 Apr 2007 13:10:08 -0000 1.13
@@ -15,7 +15,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: opac-readingrecord.pl,v 1.12 2007/04/04 16:46:23 tipaul Exp $
+# $Id: opac-readingrecord.pl,v 1.13 2007/04/23 13:10:08 hdl Exp $
use strict;
require Exporter;
@@ -69,7 +69,7 @@
else {
$limit = 50;
}
-my ( $count, $issues ) = allissues( $borrowernumber, $order2, $limit );
+my ( $count, $issues ) = GetAllIssues( $borrowernumber, $order2, $limit );
# add the row parity
#my $num = 0;
Index: opac/opac-user.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-user.pl,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- opac/opac-user.pl 18 Apr 2007 17:00:15 -0000 1.26
+++ opac/opac-user.pl 23 Apr 2007 13:10:08 -0000 1.27
@@ -15,7 +15,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: opac-user.pl,v 1.26 2007/04/18 17:00:15 tipaul Exp $
+# $Id: opac-user.pl,v 1.27 2007/04/23 13:10:08 hdl Exp $
use strict;
require Exporter;
@@ -92,7 +92,7 @@
$issue->{'reserved'} = 1;
}
- my ( $numaccts, $accts, $total ) = getboracctrecord( undef, $borr );
+ my ( $total , $accts, $numaccts) = GetBorrowerAcctRecord( $borrowernumber
);
my $charges = 0;
foreach my $ac (@$accts) {
if ( $ac->{'itemnumber'} == $issue->{'itemnumber'} ) {
Index: reserve/placerequest.pl
===================================================================
RCS file: /cvsroot/koha/koha/reserve/placerequest.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- reserve/placerequest.pl 18 Apr 2007 17:00:15 -0000 1.7
+++ reserve/placerequest.pl 23 Apr 2007 13:10:08 -0000 1.8
@@ -41,7 +41,7 @@
my @rank=$input->param('rank-request');
my $type=$input->param('type');
my $title=$input->param('title');
-my $borrowernumber=borrdata($borrower,'');
+my $borrowernumber=GetMember($borrower,'cardnumber');
my $checkitem=$input->param('checkitem');
my $found;
Index: reserve/request.pl
===================================================================
RCS file: /cvsroot/koha/koha/reserve/request.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- reserve/request.pl 18 Apr 2007 17:00:15 -0000 1.10
+++ reserve/request.pl 23 Apr 2007 13:10:08 -0000 1.11
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: request.pl,v 1.10 2007/04/18 17:00:15 tipaul Exp $
+# $Id: request.pl,v 1.11 2007/04/23 13:10:08 hdl Exp $
#writen 2/1/00 by address@hidden
# Copyright 2000-2002 Katipo Communications
@@ -69,7 +69,7 @@
if ($findborrower) {
my ( $count, $borrowers ) =
- BornameSearch($findborrower, 'cardnumber', 'web' );
+ SearchBorrower($findborrower, 'cardnumber', 'web' );
my @borrowers = @$borrowers;
Index: reviews/reviewswaiting.pl
===================================================================
RCS file: /cvsroot/koha/koha/reviews/reviewswaiting.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- reviews/reviewswaiting.pl 8 Dec 2006 11:24:58 -0000 1.3
+++ reviews/reviewswaiting.pl 23 Apr 2007 13:10:08 -0000 1.4
@@ -51,7 +51,7 @@
foreach ( @$reviews ) {
my $borrowernumber = $_->{borrowernumber};
- my $borrowerData = GetMember('',$borrowernumber);
+ my $borrowerData = GetMember($borrowernumber,'borrowernumber');
my $biblioData = GetBiblioData($_->{biblionumber});
# setting some borrower info into this hash
$_->{bibliotitle} = $biblioData->{'title'};
Index: serials/member-search.pl
===================================================================
RCS file: /cvsroot/koha/koha/serials/member-search.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- serials/member-search.pl 9 Mar 2007 15:14:25 -0000 1.3
+++ serials/member-search.pl 23 Apr 2007 13:10:08 -0000 1.4
@@ -43,7 +43,7 @@
);
if ($searchstring) {
- my ( $count, $members ) = &BornameSearch( '', $searchstring, "surname" );
+ my ( $count, $members ) = &SearchBorrower( '', $searchstring, "surname" );
$template->param(
subscriptionid => $subscriptionid,
Index: serials/routing.pl
===================================================================
RCS file: /cvsroot/koha/koha/serials/routing.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- serials/routing.pl 9 Mar 2007 15:14:25 -0000 1.3
+++ serials/routing.pl 23 Apr 2007 13:10:08 -0000 1.4
@@ -105,7 +105,7 @@
my @results;
my $data;
for(my $i=0;$i<$routing;$i++){
- $data=borrdata('',$routinglist[$i]->{'borrowernumber'});
+ $data=GetMember($routinglist[$i]->{'borrowernumber'},'borrowernumber');
$data->{'location'}=$data->{'streetaddress'};
$data->{'name'}="$data->{'firstname'} $data->{'surname'}";
$data->{'routingid'}=$routinglist[$i]->{'routingid'};
Index: serials/routing-preview.pl
===================================================================
RCS file: /cvsroot/koha/koha/serials/routing-preview.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- serials/routing-preview.pl 18 Apr 2007 17:00:15 -0000 1.5
+++ serials/routing-preview.pl 23 Apr 2007 13:10:08 -0000 1.6
@@ -100,7 +100,7 @@
my @results;
my $data;
for(my $i=0;$i<$routing;$i++){
- $data=borrdata('',$routinglist[$i]->{'borrowernumber'});
+ $data=GetMember($routinglist[$i]->{'borrowernumber'},'borrowernumber');
$data->{'location'}=$data->{'streetaddress'};
$data->{'name'}="$data->{'firstname'} $data->{'surname'}";
$data->{'routingid'}=$routinglist[$i]->{'routingid'};
Index: tools/cleanborrowers.pl
===================================================================
RCS file: /cvsroot/koha/koha/tools/cleanborrowers.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- tools/cleanborrowers.pl 4 Apr 2007 16:46:23 -0000 1.3
+++ tools/cleanborrowers.pl 23 Apr 2007 13:10:08 -0000 1.4
@@ -17,7 +17,7 @@
#
# Written by Antoine Farnault address@hidden on Nov. 2006.
-# $Id: cleanborrowers.pl,v 1.3 2007/04/04 16:46:23 tipaul Exp $
+# $Id: cleanborrowers.pl,v 1.4 2007/04/23 13:10:08 hdl Exp $
=head1 cleanborrowers.pl
@@ -114,13 +114,14 @@
if ( $radio eq 'trash' ) {
my $i;
for ( $i = 0 ; $i < $totalDel ; $i++ ) {
- DeleteBorrower( $membersToDelete->[$i]->{'borrowernumber'} );
+ MoveMemberToDeleted(
$membersToDelete->[$i]->{'borrowernumber'} );
+ DelMember( $membersToDelete->[$i]->{'borrowernumber'} );
}
}
else { # delete completly.
my $i;
for ( $i = 0 ; $i < $totalDel ; $i++ ) {
-
DelBorrowerCompletly($membersToDelete->[$i]->{'borrowernumber'});
+ DelMember($membersToDelete->[$i]->{'borrowernumber'});
}
}
$template->param(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha acqui/acqui-home.pl acqui/neworderempty.pl...,
Henri-Damien LAURENT <=