my $dbh = C4::Context->dbh;
my $subscription = GetSubscription($subscriptionid);
my $enddate = $subscription->{startdate};
-
+
+ return if not $subscription->{startdate};
+
# we don't do the same test if the subscription is based on X numbers or on X weeks/months
if (($subscription->{periodicity} % 16) >0){
if ( $subscription->{numberlength} ) {
#date supposed to be in ISO.
my ( $year, $month, $day ) = split(/-/, $planneddate);
+ return undef if not check_date($year, $month, $day);
$month=1 unless ($month);
$day=1 unless ($day);
my @resultdate;