Lines 271-279
if ( ( $op eq 'cud-insert' ) and !$nodouble ) {
Link Here
|
271 |
#Attempt to delete guarantors |
271 |
#Attempt to delete guarantors |
272 |
my @delete_guarantor = $input->multi_param('delete_guarantor'); |
272 |
my @delete_guarantor = $input->multi_param('delete_guarantor'); |
273 |
if (@delete_guarantor) { |
273 |
if (@delete_guarantor) { |
274 |
if ( C4::Context->preference('ChildNeedsGuarantor') |
274 |
my $will_remove_last = |
275 |
&& scalar @guarantors - scalar @delete_guarantor == 0 ) |
275 |
( scalar @guarantors - scalar @delete_guarantor == 0 ) |
276 |
{ |
276 |
&& $newdata{'contactname'} eq q{} |
|
|
277 |
&& $newdata{'contactfirstname'} eq q{}; |
278 |
if ( C4::Context->preference('ChildNeedsGuarantor') && $will_remove_last ) { |
277 |
push @errors, 'ERROR_cannot_delete_guarantor'; |
279 |
push @errors, 'ERROR_cannot_delete_guarantor'; |
278 |
} else { |
280 |
} else { |
279 |
foreach my $id (@delete_guarantor) { |
281 |
foreach my $id (@delete_guarantor) { |
280 |
- |
|
|