
Add up to 3 subfields to item call number (was only adding 2)

This is a quick and dirty fix, should implement a proper loop
which handles an arbritary number of subfields.

See Koha bug #9156:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9156

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -148,9 +148,10 @@ sub generate_subfield_form {
             my $CNtag       = substr($pref_itemcallnumber, 0, 3);
             my $CNsubfield  = substr($pref_itemcallnumber, 3, 1);
             my $CNsubfield2 = substr($pref_itemcallnumber, 4, 1);
+            my $CNsubfield3 = substr($pref_itemcallnumber, 5, 1);
             my $temp2 = $temp->field($CNtag);
             if ($temp2) {
-                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2));
+                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2).' '.($temp2->subfield($CNsubfield3));
                 #remove any trailing space incase one subfield is used
                 $value =~ s/^\s+|\s+$//g;
             }



Add up to 3 subfields to item call number (was only adding 2)

This is a quick and dirty fix, should implement a proper loop
which handles an arbritary number of subfields.

See Koha bug #9156:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9156

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -148,9 +148,10 @@ sub generate_subfield_form {
             my $CNtag       = substr($pref_itemcallnumber, 0, 3);
             my $CNsubfield  = substr($pref_itemcallnumber, 3, 1);
             my $CNsubfield2 = substr($pref_itemcallnumber, 4, 1);
+            my $CNsubfield3 = substr($pref_itemcallnumber, 5, 1);
             my $temp2 = $temp->field($CNtag);
             if ($temp2) {
-                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2));
+                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2)).' '.($temp2->subfield($CNsubfield3));
                 #remove any trailing space incase one subfield is used
                 $value =~ s/^\s+|\s+$//g;
             }


Fix syntax error in previous commit
Fix syntax error in previous commit
