Koha/acqui/updatesupplier.pl
tipaul 528f1b2b80 Long is the road to MARC..
Not related to MARC :
* removed HLT- empty link when no basket for a supplier (should be useful to copy this into rel-1-2 i think)
* fixed some "use of uninitialized value"
related to MARC
* changed use Acquisition to use Catalogue, new package for MARC management

For instance, nothing is done to MARC DB, but structure is modified (see Biblio.pm for details), and everything seems to work : it's still possible to use acqui, and it fills old-DB pretty good.

WARNING : if you work on main trunk, please note Acquisition.pm is NO MORE USED in /acqui/ system. Every sub in Acquisition.pm has been moved to Biblio.pm or Catalogue.pm.
2002-07-04 15:53:02 +00:00

62 lines
1.8 KiB
Perl
Executable file

#!/usr/bin/perl
#script to show suppliers and orders
#written by chris@katipo.co.nz 23/2/2000
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;
my %data;
$data{'id'}=$input->param('id');
$data{'name'}=$input->param('company');
$data{'name'}=~ s/\'/\\\'/g;
$data{'postal'}=$input->param('company_postal');
my $address=$input->param('physical');
my @addresses=split('\n',$address);
$data{'address1'}=$addresses[0];
$data{'address2'}=$addresses[1];
$data{'address3'}=$addresses[2];
$data{'address4'}=$addresses[3];
$data{'phone'}=$input->param('company_phone');
$data{'fax'}=$input->param('company_fax');
$data{'url'}=$input->param('website');
$data{'contact'}=$input->param('company_contact_name');
$data{'contpos'}=$input->param('company_contact_position');
$data{'contphone'}=$input->param('contact_phone');
$data{'contaltphone'}=$input->param('contact_phone_2');
$data{'contfax'}=$input->param('contact_fax');
$data{'contemail'}=$input->param('company_email');
$data{'contnotes'}=$input->param('notes');
$data{'active'}=$input->param('status');
$data{'specialty'}=$input->param('publishers_imprints');
$data{'listprice'}=$input->param('list_currency');
$data{'invoiceprice'}=$input->param('invoice_currency');
$data{'gstreg'}=$input->param('gst');
$data{'listincgst'}=$input->param('list_gst');
$data{'invoiceincgst'}=$input->param('invoice_gst');
$data{'discount'}=$input->param('discount');
my $id=$input->param('id');
if ($data{'id'} != 0){
updatesup(\%data);
} else {
$id=insertsup(\%data);
}
#print startmenu('acquisitions');
#my ($count,@suppliers)=bookseller($supplier);
#print $input->dump;
#print endmenu('acquisitions');
#print endpage;
print $input->redirect("order.pl?supplier=$id");