# Asking for confirmation if the subscription has not strictly expired yet or if it has linked issues
my $strictlyexpired = HasSubscriptionStrictlyExpired($subscriptionid);
my $linkedissues = CountIssues($subscriptionid);
- if ($strictlyexpired == 0 || $linkedissues > 0) {
+ my $countitems = HasItems($subscriptionid);
+ if ($strictlyexpired == 0 || $linkedissues > 0 || $countitems>0) {
$template->param(NEEDSCONFIRMATION => 1);
if ($strictlyexpired == 0) { $template->param("NOTEXPIRED" => 1); }
if ($linkedissues > 0) { $template->param("LINKEDISSUES" => 1); }
+ if ($countitems > 0) { $template->param("LINKEDITEMS" => 1); }
} else {
$issueconfirmed = "1";
}
# COMMENT hdl : IMHO, we should think about passing more and more data hash to template->param rather than duplicating code a new coding Guideline ?
for my $date qw(startdate enddate firstacquidate histstartdate histenddate){
- $$subs{$_} = format_date($$subs{$_}) if $_ && $$subs{$_};
+ $$subs{$date} = format_date($$subs{$date}) if $date && $$subs{$date};
}
$subs->{abouttoexpire} = abouttoexpire($subs->{subscriptionid});