From 5a4a50f9b4f4fbdedd8b41cbccb126d1da252f83 Mon Sep 17 00:00:00 2001 From: MJ Ray Date: Fri, 7 Sep 2012 17:40:26 +0100 Subject: [PATCH] Bug 7068 - autobarcode not working when duplicating patrons Fixed by blanking cardnumber in the code and showing it in the template, instead of just not showing it in the template Autobarcode now correctly fills in on a duplicated patron. Signed-off-by: Melia Meggs Signed-off-by: Galen Charlton Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack Signed-off-by: Jared Camins-Esakov --- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 6 +----- members/memberentry.pl | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index b661d2253f..33bf55eb38 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -872,11 +872,7 @@ - [% IF ( opduplicate ) %] - - [% ELSE %] - - [% END %] + [% IF ( mandatorycardnumber ) %]Required[% END %]
  • [% IF ( mandatorybranchcode ) %] diff --git a/members/memberentry.pl b/members/memberentry.pl index f01261e8a1..411fed29a5 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -400,9 +400,10 @@ if ($op eq "modify") { if ( $op eq "duplicate" ) { $template->param( updtype => 'I' ); $template->param( step_1 => 1, step_2 => 1, step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1 ) unless $step; + $data{'cardnumber'} = ""; } -$data{'cardnumber'}=fixup_cardnumber($data{'cardnumber'}) if $op eq 'add'; +$data{'cardnumber'}=fixup_cardnumber($data{'cardnumber'}) if ( ( $op eq 'add' ) or ( $op eq 'duplicate' ) ); if(!defined($data{'sex'})){ $template->param( none => 1); } elsif($data{'sex'} eq 'F'){ -- 2.39.5