Bug 15171: Display subscriptions which will expire in the future
[koha_ffzg] / serials / showpredictionpattern.pl
index c654f55..6945a36 100755 (executable)
@@ -30,7 +30,7 @@ publication date, based on frequency and first publication date.
 
 use Modern::Perl;
 
-use CGI;
+use CGI qw ( -utf8 );
 use Date::Calc qw(Today Day_of_Year Week_of_Year Day_of_Week Days_in_Year Delta_Days Add_Delta_Days Add_Delta_YM);
 use C4::Auth;
 use C4::Output;
@@ -119,7 +119,7 @@ my @predictions_loop;
 my ($calculated) = GetSeq(\%subscription, \%pattern);
 push @predictions_loop, {
     number => $calculated,
-    publicationdate => ($frequency->{unit} ? $date : undef),
+    publicationdate => $date,
     issuenumber => $issuenumber,
     dow => Day_of_Week(split /-/, $date),
 };
@@ -143,7 +143,7 @@ while( $i < 1000 ) {
         $date = GetNextDate(\%subscription, $date);
     }
     if(defined $date){
-        $line{'publicationdate'} = $date if $frequency->{unit};
+        $line{'publicationdate'} = $date;
         $line{'dow'} = Day_of_Week(split /-/, $date);
     }