Lines 430-437
elsif ( $borrowernumber ) {
Link Here
|
430 |
|
430 |
|
431 |
if ( ($op eq 'modify' || $op eq 'insert' || $op eq 'save'|| $op eq 'duplicate') and ($step == 0 or $step == 3 )){ |
431 |
if ( ($op eq 'modify' || $op eq 'insert' || $op eq 'save'|| $op eq 'duplicate') and ($step == 0 or $step == 3 )){ |
432 |
unless ($newdata{'dateexpiry'}){ |
432 |
unless ($newdata{'dateexpiry'}){ |
433 |
my $patron_category = Koha::Patron::Categories->find( $newdata{categorycode} ); |
433 |
$newdata{'dateexpiry'} = $category->get_expiry_date( $newdata{dateenrolled} ) if $category; |
434 |
$newdata{'dateexpiry'} = $patron_category->get_expiry_date( $newdata{dateenrolled} ) if $patron_category; |
|
|
435 |
} |
434 |
} |
436 |
} |
435 |
} |
437 |
|
436 |
|
Lines 791-798
if (!defined($data{'dateenrolled'}) or $data{'dateenrolled'} eq ''){
Link Here
|
791 |
} |
790 |
} |
792 |
if ( $op eq 'duplicate' ) { |
791 |
if ( $op eq 'duplicate' ) { |
793 |
$data{'dateenrolled'} = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); |
792 |
$data{'dateenrolled'} = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); |
794 |
my $patron_category = Koha::Patron::Categories->find( $data{categorycode} ); |
793 |
$data{dateexpiry} = $category->get_expiry_date( $data{dateenrolled} ); |
795 |
$data{dateexpiry} = $patron_category->get_expiry_date( $data{dateenrolled} ); |
|
|
796 |
} |
794 |
} |
797 |
if (C4::Context->preference('uppercasesurnames')) { |
795 |
if (C4::Context->preference('uppercasesurnames')) { |
798 |
$data{'surname'} &&= uc( $data{'surname'} ); |
796 |
$data{'surname'} &&= uc( $data{'surname'} ); |
799 |
- |
|
|