Lines 26-31
use C4::Branch; # GetBranchName
Link Here
|
26 |
use C4::Auth; |
26 |
use C4::Auth; |
27 |
use C4::Dates qw/format_date/; |
27 |
use C4::Dates qw/format_date/; |
28 |
use C4::Circulation; |
28 |
use C4::Circulation; |
|
|
29 |
use C4::Reserves; # qw/GetMaxPickUpDelay/; |
29 |
use C4::Members; |
30 |
use C4::Members; |
30 |
use C4::Biblio; |
31 |
use C4::Biblio; |
31 |
use C4::Items; |
32 |
use C4::Items; |
Lines 112-125
foreach my $num (@getreserves) {
Link Here
|
112 |
$gettitle->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $gettitle->{'itype'} : $gettitle->{'itemtype'}; |
113 |
$gettitle->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $gettitle->{'itype'} : $gettitle->{'itemtype'}; |
113 |
my $getborrower = GetMemberDetails( $num->{'borrowernumber'} ); |
114 |
my $getborrower = GetMemberDetails( $num->{'borrowernumber'} ); |
114 |
my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); # using the fixed up itype/itemtype |
115 |
my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); # using the fixed up itype/itemtype |
115 |
$getreserv{'waitingdate'} = format_date( $num->{'waitingdate'} ); |
116 |
if ($num->{waitingdate}){ |
|
|
117 |
my @maxpickupdate=GetMaxPickupDate($num->{'waitingdate'},$borrowernumber, $num); |
118 |
$getreserv{'waitingdate'} = format_date( $num->{'waitingdate'} ); |
116 |
|
119 |
|
117 |
my ( $waiting_year, $waiting_month, $waiting_day ) = split (/-/, $num->{'waitingdate'}); |
120 |
$getreserv{'maxpickupdate'} = sprintf("%d-%02d-%02d", @maxpickupdate); |
118 |
( $waiting_year, $waiting_month, $waiting_day ) = |
|
|
119 |
Add_Delta_Days( $waiting_year, $waiting_month, $waiting_day, |
120 |
C4::Context->preference('ReservesMaxPickUpDelay')); |
121 |
my $calcDate = Date_to_Days( $waiting_year, $waiting_month, $waiting_day ); |
122 |
|
121 |
|
|
|
122 |
my $calcDate = Date_to_Days( @maxpickupdate ); |
123 |
|
124 |
if ( $today > $calcDate ) { |
125 |
$getreserv{'messcompa'} = 1; |
126 |
push @overloop, \%getreserv; |
127 |
$overcount++; |
128 |
} else { |
129 |
push @reservloop, \%getreserv; |
130 |
$reservcount++; |
131 |
} |
132 |
} |
123 |
$getreserv{'itemtype'} = $itemtypeinfo->{'description'}; |
133 |
$getreserv{'itemtype'} = $itemtypeinfo->{'description'}; |
124 |
$getreserv{'title'} = $gettitle->{'title'}; |
134 |
$getreserv{'title'} = $gettitle->{'title'}; |
125 |
$getreserv{'itemnumber'} = $gettitle->{'itemnumber'}; |
135 |
$getreserv{'itemnumber'} = $gettitle->{'itemnumber'}; |
Lines 128-133
foreach my $num (@getreserves) {
Link Here
|
128 |
$getreserv{'homebranch'} = GetBranchName($gettitle->{'homebranch'}); |
138 |
$getreserv{'homebranch'} = GetBranchName($gettitle->{'homebranch'}); |
129 |
$getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'}; |
139 |
$getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'}; |
130 |
$getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'}; |
140 |
$getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'}; |
|
|
141 |
|
131 |
if ( $gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'} ) { |
142 |
if ( $gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'} ) { |
132 |
$getreserv{'dotransfer'} = 1; |
143 |
$getreserv{'dotransfer'} = 1; |
133 |
} |
144 |
} |
Lines 138-152
foreach my $num (@getreserves) {
Link Here
|
138 |
if ( $getborrower->{'emailaddress'} ) { |
149 |
if ( $getborrower->{'emailaddress'} ) { |
139 |
$getreserv{'borrowermail'} = $getborrower->{'emailaddress'}; |
150 |
$getreserv{'borrowermail'} = $getborrower->{'emailaddress'}; |
140 |
} |
151 |
} |
141 |
|
|
|
142 |
if ($today > $calcDate) { |
143 |
push @overloop, \%getreserv; |
144 |
$overcount++; |
145 |
}else{ |
146 |
push @reservloop, \%getreserv; |
147 |
$reservcount++; |
148 |
} |
149 |
|
150 |
} |
152 |
} |
151 |
|
153 |
|
152 |
$template->param( |
154 |
$template->param( |