Lines 125-141
my @bordat;
Link Here
|
125 |
$bordat[0] = $borr; |
125 |
$bordat[0] = $borr; |
126 |
|
126 |
|
127 |
# Warningdate is the date that the warning starts appearing |
127 |
# Warningdate is the date that the warning starts appearing |
128 |
if ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') && |
128 |
if ( $borr->{dateexpiry} && Date_to_Days( $today_year, $today_month, $today_day ) > Date_to_Days( $warning_year, $warning_month, $warning_day ) ) { |
129 |
Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) < |
129 |
$borr->{'warnexpired'} = 1; |
130 |
Date_to_Days( $today_year, $today_month, $today_day ) ) |
130 |
} |
131 |
{ |
131 |
elsif ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') && |
132 |
# borrower card soon to expire, warn the borrower |
132 |
Date_to_Days(Add_Delta_Days($warning_year, $warning_month, $warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) < |
133 |
$borr->{'warndeparture'} = $borr->{dateexpiry}; |
133 |
Date_to_Days( $today_year, $today_month, $today_day ) ) { |
134 |
if (C4::Context->preference('ReturnBeforeExpiry')){ |
134 |
# borrower card soon to expire, warn the borrower |
135 |
$borr->{'returnbeforeexpiry'} = 1; |
135 |
$borr->{'warndeparture'} = $borr->{dateexpiry}; |
136 |
} |
136 |
if (C4::Context->preference('ReturnBeforeExpiry')){ |
|
|
137 |
$borr->{'returnbeforeexpiry'} = 1; |
138 |
} |
137 |
} |
139 |
} |
138 |
|
140 |
|
|
|
141 |
|
139 |
$template->param( BORROWER_INFO => \@bordat, |
142 |
$template->param( BORROWER_INFO => \@bordat, |
140 |
borrowernumber => $borrowernumber, |
143 |
borrowernumber => $borrowernumber, |
141 |
patron_flagged => $borr->{flagged}, |
144 |
patron_flagged => $borr->{flagged}, |
142 |
- |
|
|