added old inventory number (copynumber) and statuses: withdrawn, itemlost, dameged
[share-koha-fer] / intranet / cgi-bin / fer / inventura.pl
index 4efea4c..458ca1c 100755 (executable)
@@ -6,6 +6,7 @@ use C4::Context;
 use C4::Circulation;
 use Data::Dump qw(dump);
 use CGI qw ( -utf8 );
+use utf8;
 
 binmode STDOUT, ':encoding(UTF-8)';
 
@@ -62,15 +63,30 @@ if ( $barcode ) {
 
        my $dbh = C4::Context->dbh;
 
+       warn "inventura barcode: $barcode ",dump($barcode);
+
        my $sql = qq{
        select
                itemnumber,
                items.biblionumber as biblionumber,
                title,
-               author
+               author,
+               biblioitems.publishercode,
+               biblioitems.editionstatement,
+               biblio.copyrightdate,
+               items.stocknumber,
+               items.copynumber,
+               items.itemcallnumber,
+               items.barcode,
+               items.homebranch,
+               items.location,
+               items.withdrawn,
+               items.itemlost,
+               items.damaged
        from items
        join biblio on items.biblionumber = biblio.biblionumber
-       where barcode = ?
+       join biblioitems on items.biblionumber = biblioitems.biblionumber
+       where barcode = ? + 0
        };
 
        #warn "# sql $sql\n";
@@ -82,9 +98,20 @@ if ( $barcode ) {
                        $row = $sth->fetchrow_hashref;
 
                        print qq|
-BARCODE: <tt>$barcode</tt><br>
-TITLE: <b>$row->{title}</b><br>
-AUTHOR: $row->{author}<br>
+barcode: <tt>$barcode</tt><br>
+naslov: <b>$row->{title}</b><br>
+autor: $row->{author}<br>
+izdavač: $row->{publishercode}<br>
+izdanje: $row->{editionstatement}<br>
+godina izdanja: $row->{copyrightdate}<br>
+inventarni broj novi: $row->{stocknumber}<br>
+inventarni broj stari: $row->{copynumber}<br>
+signatura: $row->{itemcallnumber}<br>
+stalna lokacija: $row->{homebranch}<br>
+lokacija na polici: $row->{location}<br>
+status otpisano: $row->{withdrawn}<br>
+status izgubljeno: $row->{itemlost}<br>
+status uništeno: $row->{damaged}<br>
                        |;
 
                        my $sth_update = $dbh->prepare(qq{