From bf8c002bace711fdc27aedad14ba323130fd5117 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 --- .../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 f630c15f73..87fd97898b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1008,11 +1008,7 @@ - [% IF ( opduplicate ) %] - - [% ELSE %] - - [% END %] + [% IF ( mandatorycardnumber ) %]Required[% END %] [% END %] [% UNLESS nobranchcode %] diff --git a/members/memberentry.pl b/members/memberentry.pl index ebb4900ca2..e46a560de1 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -433,9 +433,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