From 15126b1108ba5053e9262f15a1534b1b75435df7 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Wed, 16 Mar 2011 08:49:37 +0100 Subject: [PATCH] Bug 5861: items.stocknumber not saved correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The field was missing in Items.pm. It will still act strangely if you enter a stocknumber that already exists in the database. (see Bug 5860) Adding/editing items with stocknumbers you have not used before should work as expected. [F. Demians] Was able to reproduce the bug on an UNIMARC DB. The patch works. Signed-off-by: Frédéric Demians Signed-off-by: Chris Cormack --- C4/Items.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index 05df0c56f0..d2936081c2 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1897,7 +1897,8 @@ sub _koha_new_item { uri = ?, enumchron = ?, more_subfields_xml = ?, - copynumber = ? + copynumber = ?, + stocknumber = ? "; my $sth = $dbh->prepare($query); $sth->execute( @@ -1934,6 +1935,7 @@ sub _koha_new_item { $item->{'enumchron'}, $item->{'more_subfields_xml'}, $item->{'copynumber'}, + $item->{'stocknumber'}, ); my $itemnumber = $dbh->{'mysql_insertid'}; if ( defined $sth->errstr ) {