removing multivolume,multivolumepart,binding

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Joshua Ferraro 2007-10-06 00:23:45 -05:00
parent ed1539eef5
commit 3dcc72ad91
5 changed files with 14 additions and 70 deletions

View File

@ -3555,13 +3555,12 @@ sub _koha_new_items {
$sth = $dbh->prepare(
"Insert into items set
itemnumber = ?, biblionumber = ?,
multivolumepart = ?,
biblioitemnumber = ?, barcode = ?,
booksellerid = ?, dateaccessioned = NOW(),
homebranch = ?, holdingbranch = ?,
price = ?, replacementprice = ?,
replacementpricedate = NOW(), datelastseen = NOW(),
multivolume = ?, stack = ?,
stack = ?,
itemlost = ?, wthdrawn = ?,
paidfor = ?, itemnotes = ?,
itemcallnumber =?, notforloan = ?,
@ -3570,11 +3569,11 @@ sub _koha_new_items {
);
$sth->execute(
$itemnumber, $item->{'biblionumber'},
$item->{'multivolumepart'}, $item->{'biblioitemnumber'},
$item->{'biblioitemnumber'},
$barcode, $item->{'booksellerid'},
$item->{'homebranch'}, $item->{'holdingbranch'},
$item->{'price'}, $item->{'replacementprice'},
$item->{multivolume}, $item->{stack},
$item->{stack},
$item->{itemlost}, $item->{wthdrawn},
$item->{paidfor}, $item->{'itemnotes'},
$item->{'itemcallnumber'}, $item->{'notforloan'},
@ -3585,13 +3584,12 @@ sub _koha_new_items {
$sth = $dbh->prepare(
"INSERT INTO items SET
itemnumber = ?, biblionumber = ?,
multivolumepart = ?,
biblioitemnumber = ?, barcode = ?,
booksellerid = ?, dateaccessioned = ?,
homebranch = ?, holdingbranch = ?,
price = ?, replacementprice = ?,
replacementpricedate = NOW(), datelastseen = NOW(),
multivolume = ?, stack = ?,
stack = ?,
itemlost = ?, wthdrawn = ?,
paidfor = ?, itemnotes = ?,
itemcallnumber = ?, notforloan = ?,
@ -3601,11 +3599,11 @@ sub _koha_new_items {
);
$sth->execute(
$itemnumber, $item->{'biblionumber'},
$item->{'multivolumepart'}, $item->{'biblioitemnumber'},
$item->{'biblioitemnumber'},
$barcode, $item->{'booksellerid'},
$item->{'dateaccessioned'}, $item->{'homebranch'},
$item->{'holdingbranch'}, $item->{'price'},
$item->{'replacementprice'}, $item->{multivolume},
$item->{'replacementprice'},
$item->{stack}, $item->{itemlost},
$item->{wthdrawn}, $item->{paidfor},
$item->{'itemnotes'}, $item->{'itemcallnumber'},
@ -3636,10 +3634,10 @@ sub _koha_modify_item {
# if all we're doing is setting statuses, just update those and get out
if ( $op eq "setstatus" ) {
my $query =
"UPDATE items SET itemlost=?,wthdrawn=?,binding=? WHERE itemnumber=?";
"UPDATE items SET itemlost=?,wthdrawn=? WHERE itemnumber=?";
my @bind = (
$item->{'itemlost'}, $item->{'wthdrawn'},
$item->{'binding'}, $item->{'itemnumber'}
$item->{'itemnumber'}
);
my $sth = $dbh->prepare($query);
$sth->execute(@bind);
@ -3651,32 +3649,29 @@ sub _koha_modify_item {
itemcalculator( $dbh, $item->{'bibitemnum'}, $item->{'itemcallnumber'} );
my $query = "UPDATE items SET
barcode=?,itemnotes=?,itemcallnumber=?,notforloan=?,location=?,multivolumepart=?,multivolume=?,stack=?,wthdrawn=?,holdingbranch=?,homebranch=?,cutterextra=?, onloan=?, binding=?";
barcode=?,itemnotes=?,itemcallnumber=?,notforloan=?,location=?,stack=?,wthdrawn=?,holdingbranch=?,homebranch=?,cutterextra=?, onloan=?";
my @bind = (
$item->{'barcode'}, $item->{'notes'},
$item->{'itemcallnumber'}, $item->{'notforloan'},
$item->{'location'}, $item->{multivolumepart},
$item->{multivolume}, $item->{stack},
$item->{'location'}, $item->{stack},
$item->{wthdrawn}, $item->{holdingbranch},
$item->{homebranch}, $cutterextra,
$item->{onloan}, $item->{binding}
$item->{onloan},
);
if ( $item->{'lost'} ne '' ) {
$query =
"update items set biblioitemnumber=?,barcode=?,itemnotes=?,homebranch=?,
itemlost=?,wthdrawn=?,itemcallnumber=?,notforloan=?,
location=?,multivolumepart=?,multivolume=?,stack=?,wthdrawn=?,holdingbranch=?,cutterextra=?,onloan=?, binding=?";
location=?,stack=?,wthdrawn=?,holdingbranch=?,cutterextra=?,onloan=?";
@bind = (
$item->{'bibitemnum'}, $item->{'barcode'},
$item->{'notes'}, $item->{'homebranch'},
$item->{'lost'}, $item->{'wthdrawn'},
$item->{'itemcallnumber'}, $item->{'notforloan'},
$item->{'location'}, $item->{multivolumepart},
$item->{multivolume}, $item->{stack},
$item->{'location'}, $item->{stack},
$item->{wthdrawn}, $item->{holdingbranch},
$cutterextra, $item->{onloan},
$item->{binding}
$cutterextra, $item->{onloan}
);
if ( $item->{homebranch} ) {
$query .= ",homebranch=?";

View File

@ -278,36 +278,6 @@ sub GetAuthItemlost {
return ( $count, @results );
}
=head2 GetAuthItembinding
grab itemlost authorized values
=cut
sub GetAuthItembinding {
my $itembinding = shift;
my $count = 0;
my @results;
my $dbh = C4::Context->dbh;
my $sth =
$dbh->prepare(
"SELECT * FROM authorised_values ORDER BY authorised_value");
$sth->execute;
while ( my $data = $sth->fetchrow_hashref ) {
if ( $data->{category} eq "BINDING" ) {
$count++;
if ( $itembinding eq $data->{'authorised_value'} ) {
$data->{'selected'} = 1;
}
$results[$count] = $data;
#warn "data: $data";
}
}
$sth->finish;
return ( $count, @results );
}
=head2 getauthtypes
$authtypes = &getauthtypes();

View File

@ -941,7 +941,6 @@ sub searchResults {
my $onloan_count = 0;
my $wthdrawn_count = 0;
my $itemlost_count = 0;
my $itembinding_count = 0;
my $norequests = 1;
foreach my $field (@fields) {
@ -959,9 +958,6 @@ sub searchResults {
elsif ( $item->{itemlost} ) {
$itemlost_count++;
}
elsif ( $item->{binding} ) {
$itembinding_count++;
}
elsif ( ( $item->{onloan} ) && ( $item->{onloan} != '0000-00-00' ) )
{
$onloan_count++;
@ -999,7 +995,6 @@ sub searchResults {
$oldbiblio->{onloancount} = $onloan_count;
$oldbiblio->{wthdrawncount} = $wthdrawn_count;
$oldbiblio->{itemlostcount} = $itemlost_count;
$oldbiblio->{bindingcount} = $itembinding_count;
$oldbiblio->{orderedcount} = $ordered_count;
$oldbiblio->{isbn} =~ s/-//g; # deleting - in isbn to enable amazon content

View File

@ -749,7 +749,6 @@ DROP TABLE IF EXISTS `deleteditems`;
CREATE TABLE `deleteditems` (
`itemnumber` int(11) NOT NULL default 0,
`biblionumber` int(11) NOT NULL default 0,
`multivolumepart` varchar(30) default NULL,
`biblioitemnumber` int(11) NOT NULL default 0,
`barcode` varchar(9) NOT NULL default '',
`dateaccessioned` date default NULL,
@ -760,7 +759,6 @@ CREATE TABLE `deleteditems` (
`replacementpricedate` date default NULL,
`datelastborrowed` date default NULL,
`datelastseen` date default NULL,
`multivolume` tinyint(1) default NULL,
`stack` tinyint(1) default NULL,
`notforloan` tinyint(1) default NULL,
`itemlost` tinyint(1) default NULL,
@ -770,7 +768,6 @@ CREATE TABLE `deleteditems` (
`renewals` smallint(6) default NULL,
`reserves` smallint(6) default NULL,
`restricted` tinyint(1) default NULL,
`binding` decimal(28,6) default NULL,
`itemnotes` mediumtext,
`holdingbranch` varchar(4) default NULL,
`interim` tinyint(1) default NULL,
@ -781,7 +778,6 @@ CREATE TABLE `deleteditems` (
`itemcallnumber` varchar(30) default NULL,
`onloan` date default NULL,
`cutterextra` varchar(45) default NULL,
`issue_date` date default NULL,
`itype` varchar(10) default NULL,
PRIMARY KEY (`itemnumber`),
UNIQUE KEY `barcode` (`barcode`),
@ -859,7 +855,6 @@ DROP TABLE IF EXISTS `items`;
CREATE TABLE `items` (
`itemnumber` int(11) NOT NULL default 0,
`biblionumber` int(11) NOT NULL default 0,
`multivolumepart` varchar(30) default NULL,
`biblioitemnumber` int(11) NOT NULL default 0,
`barcode` varchar(20) default NULL,
`dateaccessioned` date default NULL,
@ -870,7 +865,6 @@ CREATE TABLE `items` (
`replacementpricedate` date default NULL,
`datelastborrowed` date default NULL,
`datelastseen` date default NULL,
`multivolume` tinyint(1) default NULL,
`stack` tinyint(1) default NULL,
`notforloan` tinyint(1) default NULL,
`itemlost` tinyint(1) default NULL,
@ -880,7 +874,6 @@ CREATE TABLE `items` (
`renewals` smallint(6) default NULL,
`reserves` smallint(6) default NULL,
`restricted` tinyint(1) default NULL,
`binding` decimal(28,6) default NULL,
`itemnotes` mediumtext,
`holdingbranch` varchar(10) default NULL,
`paidfor` mediumtext,
@ -888,7 +881,6 @@ CREATE TABLE `items` (
`location` varchar(80) default NULL,
`onloan` date default NULL,
`cutterextra` varchar(45) default NULL,
`issue_date` date default NULL,
`itype` varchar(10) default NULL,
PRIMARY KEY (`itemnumber`),
KEY `itembarcodeidx` (`barcode`),

View File

@ -1038,14 +1038,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion) ) {
default => '',
extra => '',
},
{
field => 'issue_date',
type => 'date',
null => 'NULL',
key => '',
default => '',
extra => '',
},
{
field => 'homebranch',
type => 'varchar(10)',