Lines 140-146
if ( $action eq 'create' ) {
Link Here
|
140 |
my $patron = Koha::Patrons->find($borrower{borrowernumber}); |
140 |
my $patron = Koha::Patrons->find($borrower{borrowernumber}); |
141 |
$is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($borrower{cardnumber}, $patron); |
141 |
$is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($borrower{cardnumber}, $patron); |
142 |
unless ($is_cardnumber_valid) { |
142 |
unless ($is_cardnumber_valid) { |
143 |
for my $message ( @{ $is_cardnumber_valid->messages } ) { |
143 |
for my $m ( @{ $is_cardnumber_valid->messages } ) { |
|
|
144 |
my $message = $m->message; |
144 |
if ( $message eq 'already_exists' ) { |
145 |
if ( $message eq 'already_exists' ) { |
145 |
$template->param( cardnumber_already_exists => 1 ); |
146 |
$template->param( cardnumber_already_exists => 1 ); |
146 |
} elsif ( $message eq 'invalid_length' ) { |
147 |
} elsif ( $message eq 'invalid_length' ) { |
147 |
- |
|
|