Bug 7180: (follow-up) fix regression on bug 6074
authorGalen Charlton <gmc@esilibrary.com>
Sun, 4 May 2014 21:12:33 +0000 (21:12 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 4 May 2014 21:12:33 +0000 (21:12 +0000)
This patch ensures that bibs selected for ordering are marked
as imported in their import batch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
acqui/addorderiso2709.pl

index 2999206..ad028b6 100755 (executable)
@@ -195,6 +195,7 @@ if ($op eq ""){
                 }
             }
             ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' );
+            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
             # 2nd add authorities if applicable
             if (C4::Context->preference("BiblioAddsAuthorities")){
                 my $headings_linked =BiblioAutoLink($marcrecord, $cgiparams->{'frameworkcode'});
@@ -279,6 +280,8 @@ if ($op eq ""){
                 my ( $biblionumber, $bibitemnum, $itemnumber ) = AddItemFromMarc( $record, $biblionumber );
                 NewOrderItem( $itemnumber, $ordernumber );
             }
+        } else {
+            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
         }
     }
     # go to basket page