From 1fe6e116cb9699777b2972dce4c391cce49415d7 Mon Sep 17 00:00:00 2001 From: MJ Ray Date: Fri, 7 Sep 2012 17:40:26 +0100 Subject: [PATCH] fix bug 7068 - autobarcode not working when duplicating patrons .. 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 --- .../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 ef7a12af58..96e17c5b2d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -988,11 +988,7 @@ - [% IF ( opduplicate ) %] - - [% ELSE %] - - [% END %] + [% IF ( mandatorycardnumber ) %]Required[% END %] [% END %] [% UNLESS nobranchcode %] diff --git a/members/memberentry.pl b/members/memberentry.pl index 2a391101a3..9a3dd18bfc 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