added old inventory number (copynumber) and statuses: withdrawn, itemlost, dameged
[share-koha-fer] / intranet / cgi-bin / fer / inventura.pl
index af0aa55..458ca1c 100755 (executable)
@@ -63,6 +63,8 @@ if ( $barcode ) {
 
        my $dbh = C4::Context->dbh;
 
+       warn "inventura barcode: $barcode ",dump($barcode);
+
        my $sql = qq{
        select
                itemnumber,
@@ -73,14 +75,18 @@ if ( $barcode ) {
                biblioitems.editionstatement,
                biblio.copyrightdate,
                items.stocknumber,
+               items.copynumber,
                items.itemcallnumber,
                items.barcode,
                items.homebranch,
-               items.location
+               items.location,
+               items.withdrawn,
+               items.itemlost,
+               items.damaged
        from items
        join biblio on items.biblionumber = biblio.biblionumber
        join biblioitems on items.biblionumber = biblioitems.biblionumber
-       where barcode = ?
+       where barcode = ? + 0
        };
 
        #warn "# sql $sql\n";
@@ -98,10 +104,14 @@ autor: $row->{author}<br>
 izdavač: $row->{publishercode}<br>
 izdanje: $row->{editionstatement}<br>
 godina izdanja: $row->{copyrightdate}<br>
-inventarni broj: $row->{stocknumber}<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{