Add (untested) support for including public notes and gap
authordjfiander <djfiander@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 2 Nov 2008 19:40:44 +0000 (19:40 +0000)
committerdjfiander <djfiander@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 2 Nov 2008 19:40:44 +0000 (19:40 +0000)
indicators in the formatted holding display.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@11023 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Holding.pm

index 0ce0fe0..a29498d 100755 (executable)
@@ -35,10 +35,10 @@ sub new {
        } elsif ($key =~ /[i-m]/) {
            $self->{CHRON}->{$key} = $val;
            if (!exists $caption->{CHRONS}->{$key}) {
-               carp "Holding specified enumeration level '$key' not included in caption $caption->{LINK}";
+               warn "Holding '$seqno' specified enumeration level '$key' not included in caption $caption->{LINK}";
            }
        } elsif ($key eq 'o') {
-           carp '$o specified prior to first enumeration'
+           warn '$o specified prior to first enumeration'
              unless defined($last_enum);
            $self->{ENUMS}->{$last_enum}->{UNIT} = $val;
            $last_enum = undef;
@@ -79,6 +79,18 @@ sub format {
        }
     }
 
+    # Public Note
+    $str .= ' '. $caption->{ENUMS}->{'z'} if (exists $caption->{ENUMS}->{'z'});
+
+    # Breaks in the sequence
+    if ($self->{BREAK} eq 'n') {
+       $str .= ' non-gap break';
+    } elsif ($self->{BREAK} eq 'g') {
+       $str .= ' gap';
+    } elsif ($self->{BREAK}) {
+       warn "unrecognized break indicator '$self->{BREAK}'";
+    }
+
     return $str;
 }