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.
This commit is contained in:
tipaul 2004-09-06 10:00:19 +00:00
parent f3e5fcd15d
commit 8d868bb448
4 changed files with 53 additions and 27 deletions

View file

@ -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
#

View file

@ -106,7 +106,7 @@
</tr>
<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
<tr>
<td><!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_IF name="itemcallnumber" -->(<!-- TMPL_VAR NAME="itemcallnumber" -->)<!-- /TMPL_IF --></td>
<td><!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_VAR NAME="location" --> <!-- TMPL_IF name="itemcallnumber" -->(<!-- TMPL_VAR NAME="itemcallnumber" -->)<!-- /TMPL_IF --></td>
<td><!-- TMPL_VAR NAME="datedue" --></td>
<td><!-- TMPL_VAR NAME="datelastseen" --></td>
<td><!-- TMPL_VAR NAME="barcode" --></td>

View file

@ -65,7 +65,7 @@
</td>
<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
<!-- TMPL_LOOP name="CN" -->
<!-- TMPL_VAR name="holdingbranch" --> <!-- TMPL_IF name="itemcallnumber" -->(<!-- TMPL_VAR name="itemcallnumber" -->)<!-- /TMPL_IF -->
<!-- TMPL_VAR name="holdingbranch" --> <!-- TMPL_VAR name="location" --> <!-- TMPL_IF name="itemcallnumber" -->(<!-- TMPL_VAR name="itemcallnumber" -->)<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</td>
<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>

View file

@ -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
#