Bug 8917 : Creating tables and system pref, no functional changes at all
[koha.git] / tools / letter.pl
index 44f21ab..a462aba 100755 (executable)
@@ -115,6 +115,7 @@ $template->param(
     independant_branch => $my_branch,
        script_name => $script_name,
   searchfield => $searchfield,
+    branchcode => $branchcode,
        action => $script_name
 );
 
@@ -196,9 +197,16 @@ sub add_form {
         push @{$field_selection}, add_fields('biblio','biblioitems'),
             {value => q{},             text => '---ITEMS---'  },
             {value => 'items.content', text => 'items.content'},
-            add_fields('issues','borrowers');
+            add_fields('borrowers');
         if ($module eq 'circulation') {
             push @{$field_selection}, add_fields('opac_news');
+
+        }
+
+        if ( $module eq 'circulation' && $code eq "CHECKIN" ) {
+            push @{$field_selection}, add_fields('old_issues');
+        } else {
+            push @{$field_selection}, add_fields('issues');
         }
     }