Bug 10181: Make string translatable
[koha.git] / tools / letter.pl
index 06f7ae5..f4173dc 100755 (executable)
@@ -4,18 +4,18 @@
 #
 # This file is part of Koha.
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 =head1 tools/letter.pl
 
@@ -213,6 +213,9 @@ sub add_form {
             push @{$field_selection}, {value => "biblio.$_", text => ucfirst $_ };
         }
     }
+    elsif ($module eq 'serial') {
+        push @{$field_selection}, add_fields('branches', 'biblio', 'biblioitems', 'borrowers', 'subscription', 'serial');
+    }
     elsif ($module eq 'suggestions') {
         push @{$field_selection}, add_fields('suggestions', 'borrowers', 'biblio');
     }
@@ -227,7 +230,7 @@ sub add_form {
 
         }
 
-        if ( $module eq 'circulation' && $code eq "CHECKIN" ) {
+        if ( $module eq 'circulation' and $code and $code eq "CHECKIN" ) {
             push @{$field_selection}, add_fields('old_issues');
         } else {
             push @{$field_selection}, add_fields('issues');
@@ -237,7 +240,8 @@ sub add_form {
     $template->param(
         module     => $module,
         branchloop => _branchloop($branchcode),
-        SQLfieldname => $field_selection,
+        SQLfieldnames => $field_selection,
+        branchcode => $branchcode,
     );
     return;
 }
@@ -401,7 +405,7 @@ sub add_fields {
 
 sub get_columns_for {
     my $table = shift;
-# FIXME untranslateable
+# FIXME untranslatable
     my %column_map = (
         aqbooksellers => '---BOOKSELLERS---',
         aqorders      => '---ORDERS---',