MT2716: fixing finishreceive.pl Software Error
authorPaul Poulain <paul.poulain@biblibre.com>
Tue, 16 Feb 2010 20:46:54 +0000 (21:46 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 17 Feb 2010 12:49:08 +0000 (07:49 -0500)
finishreceive.pl was buggy when AcqCreateItem was set to recieve (wrong API)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
acqui/finishreceive.pl
acqui/orderreceive.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl

index 31c7c35..3042453 100755 (executable)
@@ -103,7 +103,7 @@ if ($quantityrec > $origquantityrec ) {
                                     $itemhash{$item}->{'subfields'},
                                     $itemhash{$item}->{'field_values'},
                                     $itemhash{$item}->{'ind_tag'},
-                                    $itemhash{$item}->{'indicator'});
+                                    $itemhash{$item}->{'indicator'},'ITEM');
             my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
             my ($biblionumber,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber);
         }
index bcf6f74..a4bdbef 100755 (executable)
@@ -111,7 +111,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 if ( $count == 1 ) {
     if (C4::Context->preference('AcqCreateItem') eq 'receiving') {
         # prepare empty item form
-        my $cell = PrepareItemrecordDisplay();
+        my $cell = PrepareItemrecordDisplay('','','','ACQ');
+        unless ($cell) {
+            $cell = PrepareItemrecordDisplay('','','','');
+            $template->param('NoACQframework' => 1);
+        }
         my @itemloop;
         push @itemloop,$cell;
         
index 62d712d..8206ec4 100644 (file)
@@ -38,6 +38,9 @@
     <!-- TMPL_IF name="items" -->
     <fieldset class="rows">
         <legend>Item</legend>
+        <!-- TMPL_IF name="NoACQframework" -->
+            <p class="required">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</p>
+        <!-- /TMPL_IF -->
 
         <!-- TMPL_LOOP NAME="items" -->
         <div id="outeritemblock">