|
Lines 262-270
if ( ( $op eq 'cud-insert' ) and !$nodouble ) {
Link Here
|
| 262 |
#Attempt to delete guarantors |
262 |
#Attempt to delete guarantors |
| 263 |
my @delete_guarantor = $input->multi_param('delete_guarantor'); |
263 |
my @delete_guarantor = $input->multi_param('delete_guarantor'); |
| 264 |
if (@delete_guarantor) { |
264 |
if (@delete_guarantor) { |
| 265 |
if ( C4::Context->preference('ChildNeedsGuarantor') |
265 |
my $will_remove_last = |
| 266 |
&& scalar @guarantors - scalar @delete_guarantor == 0 ) |
266 |
( scalar @guarantors - scalar @delete_guarantor == 0 ) |
| 267 |
{ |
267 |
&& $newdata{'contactname'} eq q{} |
|
|
268 |
&& $newdata{'contactfirstname'} eq q{}; |
| 269 |
if ( C4::Context->preference('ChildNeedsGuarantor') && $will_remove_last ) { |
| 268 |
push @errors, 'ERROR_cannot_delete_guarantor'; |
270 |
push @errors, 'ERROR_cannot_delete_guarantor'; |
| 269 |
} else { |
271 |
} else { |
| 270 |
foreach my $id (@delete_guarantor) { |
272 |
foreach my $id (@delete_guarantor) { |
| 271 |
- |
|
|