[Koha-patches] [PATCH 6/9] MT2716: fixing finishreceive.pl Software Error

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Tue Feb 16 21:46:54 CET 2010


From: Paul Poulain <paul.poulain at biblibre.com>

finishreceive.pl was buggy when AcqCreateItem was set to recieve (wrong API)
---
 acqui/finishreceive.pl                             |    2 +-
 acqui/orderreceive.pl                              |    6 +++++-
 .../prog/en/modules/acqui/orderreceive.tmpl        |    3 +++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl
index 31c7c35..3042453 100755
--- a/acqui/finishreceive.pl
+++ b/acqui/finishreceive.pl
@@ -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);
         }
diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl
index bcf6f74..a4bdbef 100755
--- a/acqui/orderreceive.pl
+++ b/acqui/orderreceive.pl
@@ -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;
         
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl
index 62d712d..8206ec4 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl
@@ -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">
-- 
1.6.3.3




More information about the Koha-patches mailing list