|
Lines 38-43
use C4::Branch; # GetBranches
Link Here
|
| 38 |
|
38 |
|
| 39 |
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; |
39 |
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; |
| 40 |
|
40 |
|
|
|
41 |
use Date::Calc qw( |
| 42 |
Today |
| 43 |
Add_Delta_Days |
| 44 |
Date_to_Days |
| 45 |
); |
| 46 |
|
| 41 |
my $query = new CGI; |
47 |
my $query = new CGI; |
| 42 |
|
48 |
|
| 43 |
BEGIN { |
49 |
BEGIN { |
|
Lines 64-69
my $patronupdate = $query->param('patronupdate');
Link Here
|
| 64 |
# get borrower information .... |
70 |
# get borrower information .... |
| 65 |
my ( $borr ) = GetMemberDetails( $borrowernumber ); |
71 |
my ( $borr ) = GetMemberDetails( $borrowernumber ); |
| 66 |
|
72 |
|
|
|
73 |
my ( $today_year, $today_month, $today_day) = Today(); |
| 74 |
my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'}; |
| 75 |
|
| 67 |
for (qw(dateenrolled dateexpiry dateofbirth)) { |
76 |
for (qw(dateenrolled dateexpiry dateofbirth)) { |
| 68 |
($borr->{$_}) and $borr->{$_} = format_date($borr->{$_}); |
77 |
($borr->{$_}) and $borr->{$_} = format_date($borr->{$_}); |
| 69 |
} |
78 |
} |
|
Lines 99-104
$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
Link Here
|
| 99 |
my @bordat; |
108 |
my @bordat; |
| 100 |
$bordat[0] = $borr; |
109 |
$bordat[0] = $borr; |
| 101 |
|
110 |
|
|
|
111 |
# Warningdate is the date that the warning starts appearing |
| 112 |
if ( C4::Context->preference('NotifyBorrowerDeparture') && |
| 113 |
Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) < |
| 114 |
Date_to_Days( $today_year, $today_month, $today_day ) ) |
| 115 |
{ |
| 116 |
# borrower card soon to expire, warn the borrower |
| 117 |
$borr->{'warndeparture'} = $borr->{dateexpiry}; |
| 118 |
if (C4::Context->preference('ReturnBeforeExpiry')){ |
| 119 |
$borr->{'returnbeforeexpiry'} = 1; |
| 120 |
} |
| 121 |
} |
| 122 |
|
| 102 |
$template->param( BORROWER_INFO => \@bordat, |
123 |
$template->param( BORROWER_INFO => \@bordat, |
| 103 |
borrowernumber => $borrowernumber, |
124 |
borrowernumber => $borrowernumber, |
| 104 |
patron_flagged => $borr->{flagged}, |
125 |
patron_flagged => $borr->{flagged}, |
| 105 |
- |
|
|