Lines 151-168
if ( $op eq 'add_form' ) {
Link Here
|
151 |
my $biblio = GetBiblioFromItemNumber( $item->{itemnumber} ); |
151 |
my $biblio = GetBiblioFromItemNumber( $item->{itemnumber} ); |
152 |
my $added = eval { $shelf->add_biblio( $biblio->{biblionumber}, $loggedinuser ); }; |
152 |
my $added = eval { $shelf->add_biblio( $biblio->{biblionumber}, $loggedinuser ); }; |
153 |
if ($@) { |
153 |
if ($@) { |
154 |
push @messages, { item_barcode => $barcode, type => 'error', code => ref($@), msg => $@ }; |
154 |
push @messages, { item_barcode => $barcode, type => 'alert', code => ref($@), msg => $@ }; |
155 |
} elsif ( $added ) { |
155 |
} elsif ( $added ) { |
156 |
push @messages, { item_barcode => $barcode, type => 'message', code => 'success_on_add_biblio' }; |
156 |
push @messages, { item_barcode => $barcode, type => 'message', code => 'success_on_add_biblio' }; |
157 |
} else { |
157 |
} else { |
158 |
push @messages, { item_barcode => $barcode, type => 'message', code => 'error_on_add_biblio' }; |
158 |
push @messages, { item_barcode => $barcode, type => 'message', code => 'error_on_add_biblio' }; |
159 |
} |
159 |
} |
160 |
} else { |
160 |
} else { |
161 |
push @messages, { item_barcode => $barcode, type => 'error', code => 'item_does_not_exist' }; |
161 |
push @messages, { item_barcode => $barcode, type => 'alert', code => 'item_does_not_exist' }; |
162 |
} |
162 |
} |
163 |
} |
163 |
} |
164 |
} else { |
164 |
} else { |
165 |
push @messages, { type => 'error', code => 'unauthorized_on_add_biblio' }; |
165 |
push @messages, { type => 'alert', code => 'unauthorized_on_add_biblio' }; |
166 |
} |
166 |
} |
167 |
} |
167 |
} |
168 |
} else { |
168 |
} else { |
169 |
- |
|
|