3 #script to show suppliers and orders
4 #written by chris@katipo.co.nz 23/2/2000
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
31 #print $input->header();
32 my $supplier=$input->param('supplier');
35 $data{'id'}=$input->param('id');
37 $data{'name'}=$input->param('company');
38 $data{'postal'}=$input->param('company_postal');
39 my $address=$input->param('physical');
40 my @addresses=split('\n',$address);
41 $data{'address1'}=$addresses[0];
42 $data{'address2'}=$addresses[1];
43 $data{'address3'}=$addresses[2];
44 $data{'address4'}=$addresses[3];
45 $data{'phone'}=$input->param('company_phone');
46 $data{'fax'}=$input->param('company_fax');
47 $data{'url'}=$input->param('website');
48 $data{'contact'}=$input->param('company_contact_name');
49 $data{'contpos'}=$input->param('company_contact_position');
50 $data{'contphone'}=$input->param('contact_phone');
51 $data{'contaltphone'}=$input->param('contact_phone_2');
52 $data{'contfax'}=$input->param('contact_fax');
53 $data{'contemail'}=$input->param('company_email');
54 $data{'contnotes'}=$input->param('notes');
55 $data{'active'}=$input->param('status');
56 $data{'specialty'}=$input->param('publishers_imprints');
57 $data{'listprice'}=$input->param('list_currency');
58 $data{'invoiceprice'}=$input->param('invoice_currency');
59 $data{'gstreg'}=$input->param('gst');
60 $data{'listincgst'}=$input->param('list_gst');
61 $data{'invoiceincgst'}=$input->param('invoice_gst');
62 $data{'discount'}=$input->param('discount');
63 my $id=$input->param('id');
64 if ($data{'id'} != 0){
67 $id=insertsup(\%data);
69 #print startmenu('acquisitions');
70 #my ($count,@suppliers)=bookseller($supplier);
75 #print endmenu('acquisitions');
79 print $input->redirect("order.pl?supplier=$id");