From 8d868bb448fa311587642deb648022fff8a68508 Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 6 Sep 2004 10:00:19 +0000 Subject: [PATCH] adding a "location" field to the library. This field is useful when the callnumber contains no information on the room where the item is stored. With this field, we now have 3 levels of informations to find a book : * the branch. * the location. * the callnumber. This should be versatile enough to solve any storing method. This hack is quite simple, due to the nice Biblio.pm API. The MARC => koha db link is automatically managed. Just add the link in the parameters section. --- C4/Biblio.pm | 30 ++++++++---- koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl | 2 +- .../opac-tmpl/css/en/opac-searchresults.tmpl | 2 +- updater/updatedatabase | 46 ++++++++++++------- 4 files changed, 53 insertions(+), 27 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index c60eb82af2..5787e40ef9 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1742,7 +1742,8 @@ sub OLDnewitems { homebranch = ?, holdingbranch = ?, price = ?, replacementprice = ?, replacementpricedate = NOW(), itemnotes = ?, - itemcallnumber =?, notforloan = ? + itemcallnumber =?, notforloan = ?, + location = ? " ); $sth->execute( @@ -1752,7 +1753,7 @@ sub OLDnewitems { $item->{'homebranch'}, $item->{'holdingbranch'}, $item->{'price'}, $item->{'replacementprice'}, $item->{'itemnotes'}, $item->{'itemcallnumber'}, - $item->{'notforloan'} + $item->{'notforloan'}, $item->{'location'} ); } else { @@ -1763,7 +1764,8 @@ sub OLDnewitems { homebranch = ?, holdingbranch = ?, price = ?, replacementprice = ?, replacementpricedate = NOW(), itemnotes = ?, - itemcallnumber = ? , notforloan = ? + itemcallnumber = ? , notforloan = ?, + location = ? " ); $sth->execute( @@ -1772,7 +1774,8 @@ sub OLDnewitems { $item->{'booksellerid'}, $item->{'homebranch'}, $item->{'holdingbranch'}, $item->{'price'}, $item->{'replacementprice'}, $item->{'itemnotes'}, - $item->{'itemcallnumber'}, $item->{'notforloan'} + $item->{'itemcallnumber'}, $item->{'notforloan'}, + $item->{'location'} ); } if ( defined $sth->errstr ) { @@ -1788,8 +1791,7 @@ sub OLDmoditem { # my ($dbh,$loan,$itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn,$replacement)=@_; # my $dbh=C4Connect; $item->{'itemnum'} = $item->{'itemnumber'} unless $item->{'itemnum'}; - my $query = -"update items set barcode=?,itemnotes=?,itemcallnumber=?,notforloan=? where itemnumber=?"; + my $query = "update items set barcode=?,itemnotes=?,itemcallnumber=?,notforloan=? where itemnumber=?"; my @bind = ( $item->{'barcode'}, $item->{'notes'}, $item->{'itemcallnumber'}, $item->{'notforloan'}, @@ -1808,13 +1810,14 @@ sub OLDmoditem { itemlost=?, wthdrawn=?, itemcallnumber=?, - notforloan=?"; + notforloan=?, + location=?"; @bind = ( $item->{'bibitemnum'}, $item->{'barcode'}, $item->{'notes'}, $item->{'homebranch'}, $item->{'lost'}, $item->{'wthdrawn'}, $item->{'itemcallnumber'}, $item->{'notforloan'}, - $item->{'itemnum'} + $item->{'location'}, $item->{'itemnum'} ); if ($item->{homebranch}) { $query.=",homebranch=?"; @@ -2533,6 +2536,17 @@ Paul POULAIN paul.poulain@free.fr # $Id$ # $Log$ +# Revision 1.102 2004/09/06 10:00:19 tipaul +# adding a "location" field to the library. +# This field is useful when the callnumber contains no information on the room where the item is stored. +# With this field, we now have 3 levels of informations to find a book : +# * the branch. +# * the location. +# * the callnumber. +# +# This should be versatile enough to solve any storing method. +# This hack is quite simple, due to the nice Biblio.pm API. The MARC => koha db link is automatically managed. Just add the link in the parameters section. +# # Revision 1.101 2004/08/18 16:01:37 tipaul # modifs to support frameworkcodes # diff --git a/koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl b/koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl index e5fc2851e0..70d049201d 100644 --- a/koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl @@ -106,7 +106,7 @@ - () + () diff --git a/koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl b/koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl index c720a3638d..d3523343cc 100644 --- a/koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl +++ b/koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl @@ -65,7 +65,7 @@ class="hilighted"> - () + () class="hilighted"> diff --git a/updater/updatedatabase b/updater/updatedatabase index a9ce54bdc2..fd8e587220 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -288,23 +288,23 @@ my %requiretables = ( suggestions => "( suggestionid int(8) NOT NULL auto_increment, suggestedby int(11) NOT NULL default '0', - managedby int(11) default NULL, - status varchar(10) NOT NULL default '', + managedby int(11) default NULL , + STATUS varchar(10) NOT NULL default '', note text, - author varchar(80) default NULL, - title varchar(80) default NULL, - copyrightdate smallint(6) default NULL, - publishercode varchar(255) default NULL, - date timestamp(8) NOT NULL, - volumedesc char(255) default NULL, - publicationyear smallint(6) default NULL, - place char(255) default NULL, - isbn char(10) default NULL, - mailoverseeing smallint(1) default 0, - biblionumber int(11) default NULL, - PRIMARY KEY (suggestionnumber), - KEY suggestedby (suggestedby), - KEY managedby (managedby) + author varchar(80) default NULL , + title varchar(80) default NULL , + copyrightdate smallint(6) default NULL , + publishercode varchar(255) default NULL , + date timestamp(8) NOT NULL , + volumedesc varchar(255) default NULL , + publicationyear smallint(6) default '0', + place varchar(255) default NULL , + isbn varchar(10) default NULL , + mailoverseeing smallint(1) default '0', + biblionumber int(11) default NULL , + PRIMARY KEY (suggestionid) , + KEY suggestedby(suggestedby) , + KEY managedby(managedby) )", aqbasket => "(basketno int(11) NOT NULL auto_increment, creationdate date, @@ -404,7 +404,7 @@ my %requirefields = ( 'sort1' => 'char(80)', 'sort2' => 'char(80)', }, aqbudget => {'aqbudgetid' => 'tinyint(4) auto_increment primary key'}, - items => {'paidfor' => 'text'}, + items => {'paidfor' => 'text', 'location' => 'char(80)'}, #added so that reference items are not available for reserves... itemtypes => { 'notforloan' => 'smallint(6)' }, @@ -418,6 +418,7 @@ my %requirefields = ( 'frameworkcode' => 'char(4) not NULL default \'\'', 'hidden' => 'tinyint(1)', 'isurl' => 'tinyint(1)', + 'link' => 'char(80)', }, bookshelf => {'owner' => 'char(80)', 'category' => 'char(1)', @@ -1368,6 +1369,17 @@ $sth->finish; exit; # $Log$ +# Revision 1.94 2004/09/06 10:00:29 tipaul +# adding a "location" field to the library. +# This field is useful when the callnumber contains no information on the room where the item is stored. +# With this field, we now have 3 levels of informations to find a book : +# * the branch. +# * the location. +# * the callnumber. +# +# This should be versatile enough to solve any storing method. +# This hack is quite simple, due to the nice Biblio.pm API. The MARC => koha db link is automatically managed. Just add the link in the parameters section. +# # Revision 1.93 2004/08/12 14:50:50 tipaul # bugfixes # -- 2.39.5