Lines 82-87
my $check_member = $input->param('check_member');
Link Here
|
82 |
my $nodouble = $input->param('nodouble'); |
82 |
my $nodouble = $input->param('nodouble'); |
83 |
my $duplicate = $input->param('duplicate'); |
83 |
my $duplicate = $input->param('duplicate'); |
84 |
my $quickadd = $input->param('quickadd'); |
84 |
my $quickadd = $input->param('quickadd'); |
|
|
85 |
my $check_patron; |
85 |
|
86 |
|
86 |
$nodouble = 1 if ($op eq 'edit_form' or $op eq 'duplicate'); # FIXME hack to represent fact that if we're |
87 |
$nodouble = 1 if ($op eq 'edit_form' or $op eq 'duplicate'); # FIXME hack to represent fact that if we're |
87 |
# modifying an existing patron, it ipso facto |
88 |
# modifying an existing patron, it ipso facto |
Lines 249-256
if ( ( $op eq 'cud-insert' ) and !$nodouble ) {
Link Here
|
249 |
$nodouble = 1; |
250 |
$nodouble = 1; |
250 |
my $patrons = Koha::Patrons->search($conditions); # FIXME Should be search_limited? |
251 |
my $patrons = Koha::Patrons->search($conditions); # FIXME Should be search_limited? |
251 |
if ( $patrons->count > 0) { |
252 |
if ( $patrons->count > 0) { |
252 |
$nodouble = 0; |
253 |
$nodouble = 0; |
253 |
$check_member = $patrons->next->borrowernumber; |
254 |
$check_patron = $patrons->next; |
|
|
255 |
$check_member = $check_patron->borrowernumber; |
254 |
} |
256 |
} |
255 |
} |
257 |
} |
256 |
|
258 |
|
Lines 789-794
$template->param(
Link Here
|
789 |
BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript |
791 |
BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript |
790 |
destination => $destination,#to know where u come from and where u must go in redirect |
792 |
destination => $destination,#to know where u come from and where u must go in redirect |
791 |
check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) |
793 |
check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) |
|
|
794 |
check_patron => $check_patron |
792 |
); |
795 |
); |
793 |
|
796 |
|
794 |
$template->param( |
797 |
$template->param( |
795 |
- |
|
|