http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6521

--- Comment #6 from Ian Walls <[email protected]> 2011-07-20 
17:40:04 UTC ---
Problem:  if the library is using autoMemberNum, this patch prevents the
cardnumber from being generated upon page load of members/memberentry.pl. 
Seems to be this line that's the offender:

@@ -900,6 +900,7 @@ sub fixup_cardnumber ($) {

     #     if ($cardnumber !~ /\S/ && $autonumber_members) {
     ($autonumber_members) or return $cardnumber;
+    defined($cardnumber) or return $cardnumber;
     my $checkdigit = C4::Context->preference('checkdigit');
     my $dbh = C4::Context->dbh;
     if ( $checkdigit and $checkdigit eq 'katipo' ) {

If autonumber_members is defined, then cardnumber SHOULDN'T be, because we're
auto-generating, and don't yet know what the max value is in the database. That
call comes later in the script.

This subroutine is only called in two places:  member/memberentry.pl and
tools/import_borrowers.pl.  In both cases, the undefined cardnumber should be
passed to the subroutine, and given back as 'undef' if autoMemberNum is off, or
the newly calculated cardnumber if ON.

Patch forthcoming.

-- 
Configure bugmail: 
http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to