bug 2009: fix to include "type" so that adding items to label batches works.
authorAndrew Moore <andrew.moore@liblime.com>
Wed, 9 Apr 2008 15:36:06 +0000 (10:36 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 10 Apr 2008 08:00:36 +0000 (03:00 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tmpl
labels/label-manager.pl

index d5e939a..b468ecc 100644 (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 -->
index f320812..c6684b8 100755 (executable)
@@ -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;