From 8f67beb26d93b8f966cca29c2102454eb6f50ade Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 15 Oct 2007 16:01:57 -0500 Subject: [PATCH] Bug Fixing : Memberentry was broken. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Members.pm | 11 +- .../en/modules/members/memberentrygen.tmpl | 49 +- members/memberentry.pl | 681 +++++++++--------- 3 files changed, 360 insertions(+), 381 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 0c0c82d946..dd158d03fa 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1224,11 +1224,16 @@ sub checkuniquemember { } sub checkcardnumber { - my ($cardnumber) = @_; + my ($cardnumber,$borrowernumber) = @_; my $dbh = C4::Context->dbh; my $query = "SELECT * FROM borrowers WHERE cardnumber=?"; - my $sth = $dbh->prepare($query); - $sth->execute($cardnumber); + $query .= " AND borrowernumber <> ?" if ($borrowernumber); + my $sth = $dbh->prepare($query); + if ($borrowernumber) { + $sth->execute($cardnumber,$borrowernumber); + } else { + $sth->execute($cardnumber); + } if (my $data= $sth->fetchrow_hashref()){ return 1; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index 1b740db365..e1c56c936b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -1,6 +1,6 @@ -Koha › Patrons › <!-- TMPL_IF NAME="opadd" --> - Add<!--TMPL_IF Name="I"--> Organisation <!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult <!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child <!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional <!--/TMPL_IF --> +<title>Koha › Patrons › +<!-- TMPL_IF NAME="opadd" --> Add<!--TMPL_IF Name="I"--> Organisation <!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult <!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child <!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional <!--/TMPL_IF --> patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- TMPL_ELSE -->Modify<!--TMPL_IF Name="I"--> Organisation <!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult <!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child <!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional <!--/TMPL_IF --> patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- /TMPL_IF --> @@ -11,9 +11,12 @@ patron -