4 use lib '/srv/koha_ffzg';
6 $ENV{KOHA_CONF} = '/etc/koha/sites/ffzg/koha-conf.xml';
10 use Data::Dump qw(dump);
17 join biblio on biblio.biblionumber = items.biblionumber where barcode = ?
20 my $dbh = C4::Context->dbh;
21 my $sth = $dbh->prepare($sql);
23 my $sth_update = $dbh->prepare(qq{
24 update items set datelastseen = now() where barcode = ?
27 my $sth_inventura = $dbh->prepare(qq{
28 insert ignore into ffzg_inventura (date_scanned,barcode,source_id) values (date(now()), ?, 'abc')
33 my $barcode = $c->param('barcode');
35 $sth->execute( $barcode );
36 while ( my $row = $sth->fetchrow_hashref ) {
37 warn "# row ",dump($row);
38 $c->stash( $_ => $row->{$_} ) foreach keys %$row;
40 $sth_update->execute( $barcode );
41 $sth_inventura->execute( $barcode );
42 $c->render(template => 'index');
51 %= form_for '/' => begin
52 %#= text_field 'barcode'
53 <input name=barcode size=10 autofocus>
54 %= submit_button 'Scan'
57 <%= stash('author') %>
58 <b><%= stash('title') %></b>
60 @@ layouts/default.html.ep
64 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
70 <title>Inventura</title>
72 <body><%= content %></body>