Bug 10403: (follow-up) fix test to use vendor created earlier during test
[koha.git] / serials / acqui-search-result.pl
index df73738..e7d1e61 100755 (executable)
@@ -16,9 +16,9 @@
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 
 =head1 NAME
@@ -27,7 +27,7 @@ acqui-search-result.pl
 
 =head1 DESCRIPTION
  TODO
+
 =head1 PARAMETERS
 
 =over 4
@@ -45,9 +45,9 @@ use C4::Auth;
 use C4::Biblio;
 use C4::Output;
 use CGI;
-use C4::Acquisition;
+use C4::Acquisition qw( SearchOrders );
 use C4::Dates qw/format_date/;
-use C4::Bookseller;
+use C4::Bookseller qw( GetBookSeller );
 
 my $query=new CGI;
 my ($template, $loggedinuser, $cookie)
@@ -55,7 +55,7 @@ my ($template, $loggedinuser, $cookie)
                  query => $query,
                  type => "intranet",
                  authnotrequired => 0,
-                 flagsrequired => {serials => 1},
+                 flagsrequired => {serials => '*'},
                  debug => 1,
                  });
 
@@ -66,8 +66,11 @@ my @suppliers = GetBookSeller($supplier);
 #build result page
 my $loop_suppliers = [];
 for my $s (@suppliers) {
-    my $orders = GetPendingOrders($s->{'id'});
-    
+    my $orders = SearchOrders({
+        booksellerid => $s->{'id'},
+        pending => 1
+    });
+
     my $loop_basket = [];
     for my $ord ( @{$orders} ) {
         push @{$loop_basket}, {