Lines 25-31
use C4::Serials;
Link Here
|
25 |
use C4::Output; |
25 |
use C4::Output; |
26 |
use C4::Context; |
26 |
use C4::Context; |
27 |
use C4::Search qw/enabled_staff_search_views/; |
27 |
use C4::Search qw/enabled_staff_search_views/; |
28 |
use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days/; |
28 |
use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days Delta_Days/; |
29 |
use Carp; |
29 |
use Carp; |
30 |
|
30 |
|
31 |
my $query = new CGI; |
31 |
my $query = new CGI; |
Lines 99-108
my $hasRouting = check_routing($subscriptionid);
Link Here
|
99 |
= checkauth($query, 0, {catalogue => 1}, "intranet"); |
99 |
= checkauth($query, 0, {catalogue => 1}, "intranet"); |
100 |
|
100 |
|
101 |
# COMMENT hdl : IMHO, we should think about passing more and more data hash to template->param rather than duplicating code a new coding Guideline ? |
101 |
# COMMENT hdl : IMHO, we should think about passing more and more data hash to template->param rather than duplicating code a new coding Guideline ? |
|
|
102 |
my $today = C4::Dates->today("iso"); |
103 |
my $expirationdiff = Delta_Days(split(/-/,"$subs->{enddate}"),split (/-/,$today)) ; |
104 |
|
105 |
if($expirationdiff >= 0){ $subs->{expired} = 1; } |
102 |
|
106 |
|
103 |
for my $date qw(startdate enddate firstacquidate histstartdate histenddate){ |
107 |
for my $date qw(startdate enddate firstacquidate histstartdate histenddate){ |
104 |
$$subs{$date} = format_date($$subs{$date}) if $date && $$subs{$date}; |
108 |
$$subs{$date} = format_date($$subs{$date}) if $date && $$subs{$date}; |
105 |
} |
109 |
} |
|
|
110 |
|
106 |
$subs->{location} = GetKohaAuthorisedValueLib("LOC",$subs->{location}); |
111 |
$subs->{location} = GetKohaAuthorisedValueLib("LOC",$subs->{location}); |
107 |
$subs->{abouttoexpire} = abouttoexpire($subs->{subscriptionid}); |
112 |
$subs->{abouttoexpire} = abouttoexpire($subs->{subscriptionid}); |
108 |
$template->param(%{ $subs }); |
113 |
$template->param(%{ $subs }); |
109 |
- |
|
|