display barcode for item master
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 1 Nov 2018 10:24:31 +0000 (11:24 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 1 Nov 2018 10:24:31 +0000 (11:24 +0100)
barcode-seen.pl

index 0770ba2..2f23172 100755 (executable)
@@ -16,6 +16,7 @@ get '/' => sub {
        my $c = shift;
 
        my $barcode = $c->param('barcode');
+       $c->stash( barcode => $barcode );
 
        my $dbh = C4::Context->dbh;
        my $sth_items = $dbh->prepare(qq{
@@ -72,8 +73,13 @@ __DATA__
        %= submit_button 'Scan'
 % end
 
+% if ( stash('title') ) {
 <%= stash('author') %>
 <b><%= stash('title') %></b>
+<%= stash('barcode') %>
+% } else {
+<big style="color:red"><%= stash('barcode') %> not found</big>
+% }
 
 % if ( stash('userid') ) {
 <br>Borrower: