my @sub_type_data;
my $subs;
-my $firstissuedate;
+our $firstissuedate;
if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') {
carp "Attempt to modify subscription $subscriptionid by ".C4::Context->userenv->{'id'}." not allowed";
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
}
- $firstissuedate = $subs->{firstacquidate}; # in iso format.
+ $firstissuedate = $subs->{firstacquidate} || ''; # in iso format.
for (qw(startdate firstacquidate histstartdate enddate histenddate)) {
next unless defined $subs->{$_};
# TODO : Handle date formats properly.
$nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ;
$subs->{nextacquidate} = $nextexpected->{planneddate}->output() if($op eq 'modify');
unless($op eq 'modsubscription') {
- foreach my $length_unit qw(numberlength weeklength monthlength){
+ foreach my $length_unit (qw(numberlength weeklength monthlength)) {
if ($subs->{$length_unit}){
$sub_length=$subs->{$length_unit};
$sub_on=$length_unit;
}
}
-my $onlymine=C4::Context->preference('IndependantBranches') &&
+my $onlymine=C4::Context->preference('IndependentBranches') &&
C4::Context->userenv &&
C4::Context->userenv->{flags} % 2 !=1 &&
C4::Context->userenv->{branch};
my $locations_loop = GetAuthorisedValues("LOC",$subs->{'location'});
$template->param(branchloop => $branchloop,
- DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
locations_loop=>$locations_loop,
);
# prepare template variables common to all $op conditions:
-$template->param( 'dateformat_' . C4::Context->preference('dateformat') => 1 );
if ($op!~/^mod/) {
letter_loop(q{}, $template);
}
$template->param(bibliotitle => $bib->{title});
}
}
+ $template->param((uc(C4::Context->preference("marcflavour"))) => 1);
output_html_with_http_headers $query, $cookie, $template->output;
}