bug 2009: fix to include "type" so that adding items to label batches works.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Andrew Moore 2008-04-09 10:36:06 -05:00 committed by Joshua Ferraro
parent 12273aa88d
commit b5d356e6be
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@ to add to Batch <!-- TMPL_VAR NAME="batch_id" -->
<form name="f" method="post" action="/cgi-bin/koha/labels/label-item-search.pl">
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="batch_id" value="<!-- TMPL_VAR NAME="batch_id" -->" />
<input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
<fieldset class="rows">
<ol><li>
<select name="idx" disabled="disabled"><!-- FIXME: script does keyword search regardless -->

View file

@ -113,7 +113,7 @@ elsif ( $op eq 'add' ) { # add item
my $query2 = "INSERT INTO $batch_type ( " . (($batch_type eq 'labels') ? 'itemnumber' : 'borrowernumber') . ", batch_id ) values ( ?,? )";
my $sth2 = $dbh->prepare($query2);
for my $inum (@itemnumber) {
warn "INSERTing " . (($batch_type eq 'labels') ? 'itemnumber' : 'borrowernumber') . ":$inum for batch $batch_id";
# warn "INSERTing " . (($batch_type eq 'labels') ? 'itemnumber' : 'borrowernumber') . ":$inum for batch $batch_id";
$sth2->execute($inum, $batch_id);
}
$sth2->finish;