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.
---
 .../prog/en/modules/serials/subscription-add.tmpl  |    2 +-
 serials/subscription-add.pl                        |    6 ++++--
 2 files changed, 5 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 25e2f99..32df7d7 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
@@ -1150,7 +1150,7 @@ $('#numberpattern').change( function() {
                     <option value="11">1/2 years</option>
                 <!-- /TMPL_IF -->
                 </select> <span class="required">Required</span></li>
-                               <li><label for="manuallist"> Manual 
history:</label> <input type="checkbox" name="manualhist" id="manuallist" 
value="1" /></li>
+                               <li><label for="manuallist"> Manual 
history:</label> <input type="checkbox" name="manualhist" id="manuallist" 
value="1" <!-- TMPL_IF name="manualhistory" -->checked<!-- /TMPL_IF --> /></li>
         <li>
            <label for="numberpattern"> Numbering pattern:</label>
             
diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl
index 37a465e..008a780 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 => [EMAIL PROTECTED],
                     sublength =>$sublength,
-                    history => ($op eq 'mod' && 
($subs->{recievedlist}||$subs->{missinglist}||$subs->{opacnote}||$subs->{librariannote})),
+                    history => ($op eq 'mod' && $subs->{manualhistory} == 1 ), 
# 
($subs->{recievedlist}||$subs->{missinglist}||$subs->{opacnote}||$subs->{librariannote})),
                     "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');
-- 
1.5.4.3

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to