#!/usr/bin/perl #script to show suppliers and orders #written by chris@katipo.co.nz 23/2/2000 # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # Koha is distributed in the hope that it will be useful, but WITHOUT ANY # 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 use C4::Catalogue; use C4::Biblio; use C4::Output; use CGI; use strict; my $input=new CGI; print $input->header(); my $supplier=$input->param('supplier'); print startpage; print startmenu('acquisitions'); my ($count,@suppliers)=bookseller($supplier); print <Supplier Search Results
Add New Supplier
You searched on supplier $supplier, $count results found

printend ; my $colour='#ffffcc'; my $toggle=0; for (my $i=0; $i<$count; $i++) { if ($toggle==0){ $colour='#ffffcc'; $toggle=1; } else { $colour='white'; $toggle=0; } my ($ordcount,$orders)=getorders($suppliers[$i]->{'id'}); # print $ordcount; if ($orders->[0]->{'basketno'}>0) { print < printend ; } else { print < printend ; } for (my $i2=1;$i2<$ordcount;$i2++){ if ($orders->[$i2]->{'basketno'}>=1) { print < printend ; } else { print < printend ; } } } print < printend ; print endmenu('acquisitions'); print endpage;
  COMPANY BASKETSITEMSSTAFFDATE
New Basket Receive Order $suppliers[$i]->{'name'} HLT-$orders->[0]->{'basketno'} $orders->[0]->{'count(*)'} $orders->[0]->{'authorisedby'} $orders->[0]->{'entrydate'}
New Basket Receive Order $suppliers[$i]->{'name'}   $orders->[0]->{'count(*)'} $orders->[0]->{'authorisedby'} $orders->[0]->{'entrydate'}
    HLT-$orders->[$i2]->{'basketno'} $orders->[$i2]->{'count(*)'}$orders->[$i2]->{'authorisedby'}   $orders->[$i2]->{'entrydate'}
      $orders->[$i2]->{'count(*)'}$orders->[$i2]->{'authorisedby'}   $orders->[$i2]->{'entrydate'}