From 10d1c5f8421990b884d3d0834412e428d737afb2 Mon Sep 17 00:00:00 2001 From: Nahuel Angelinetti Date: Fri, 17 Oct 2008 15:44:44 +0200 Subject: [PATCH] Fix the checked box "manual history" and fix the "null" value of serial next issue publication date first part of this patch is the manual history must be checked if in database its checked. Then, when you do not enter a value "Next issue publication date", a null value was set in the database, now, if empty, the "first issue date" is set as "next issue". And finally, We check that "manual history" is checked to show the "Subscription history" part. Actually its never shown. Signed-off-by: Henri-Damien LAURENT --- .../prog/en/modules/serials/subscription-add.tmpl | 9 ++++++++- serials/subscription-add.pl | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl index ec835ccdb0..60e09d7e1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl @@ -1171,7 +1171,14 @@ $('#numberpattern').change( function() { Required -
  • +
  • + + + + + + +
  • diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index 37a465e8f5..39bd8ff8d5 100755 --- a/serials/subscription-add.pl +++ b/serials/subscription-add.pl @@ -128,7 +128,7 @@ if ($op eq 'mod' || $op eq 'dup' || $op eq 'modsubscription') { $op => 1, subtype => \@sub_type_data, sublength =>$sublength, - history => ($op eq 'mod' && ($subs->{recievedlist}||$subs->{missinglist}||$subs->{opacnote}||$subs->{librariannote})), + history => ($op eq 'mod' && $subs->{manualhistory} == 1 ), "periodicity".$subs->{'periodicity'} => 1, "dow".$subs->{'dow'} => 1, "numberpattern".$subs->{'numberpattern'} => 1, @@ -235,7 +235,9 @@ if ($op eq 'addsubscription') { my $biblionumber = $query->param('biblionumber'); my $aqbudgetid = $query->param('aqbudgetid'); my $startdate = format_date_in_iso($query->param('startdate')); - my $nextacquidate = format_date_in_iso($query->param('nextacquidate')); + my $nextacquidate = $query->param('nextacquidate') ? + format_date_in_iso($query->param('nextacquidate')): + format_date_in_iso($query->param('startdate')); my $periodicity = $query->param('periodicity'); my $dow = $query->param('dow'); my $sublength = $query->param('sublength'); -- 2.39.5