5 #script to show display basket of orders
6 #written by chris@katipo.co.nz 24/2/2000
9 # Copyright 2000-2002 Katipo Communications
11 # This file is part of Koha.
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
31 use C4::Interface::CGI::Output;
37 my $id=$query->param('supplierid');
38 my ($count,@booksellers)=bookseller($id);
39 my ($template, $loggedinuser, $cookie)
40 = get_template_and_user({template_name => "acqui/supplier.tmpl",
44 flagsrequired => {acquisition => 1},
47 #build array for currencies
48 my ($count, $currencies) = &getcurrencies();
49 my @loop_pricescurrency;
50 my @loop_invoicecurrency;
51 for (my $i=0;$i<$count;$i++) {
52 if ($booksellers[0]->{'listprice'} eq $currencies->[$i]->{'currency'}) {
53 push @loop_pricescurrency, { currency => "<option selected=\"selected\" value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>" };
55 push @loop_pricescurrency, { currency => "<option value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
57 if ($booksellers[0]->{'invoiceprice'} eq $currencies->[$i]->{'currency'}) {
58 push @loop_invoicecurrency, { currency => "<option selected=\"selected\" value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
60 push @loop_invoicecurrency, { currency => "<option value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
63 $template->param(id => $id,
64 name => $booksellers[0]->{'name'},
65 postal =>$booksellers[0]->{'postal'},
66 address1 => $booksellers[0]->{'address1'},
67 address2 => $booksellers[0]->{'address2'},
68 address3 => $booksellers[0]->{'address3'},
69 address4 => $booksellers[0]->{'address4'},
70 phone =>$booksellers[0]->{'phone'},
71 fax => $booksellers[0]->{'fax'},
72 url => $booksellers[0]->{'url'},
73 contact => $booksellers[0]->{'contact'},
74 contpos => $booksellers[0]->{'contpos'},
75 contphone => $booksellers[0]->{'contphone'},
76 contaltphone => $booksellers[0]->{'contaltphone'},
77 contfax => $booksellers[0]->{'contfax'},
78 contemail => $booksellers[0]->{'contemail'},
79 contnotes => $booksellers[0]->{'contnotes'},
80 active => $booksellers[0]->{'active'},
81 specialty => $booksellers[0]->{'specialty'},
82 gstreg => $booksellers[0]->{'gstreg'},
83 listincgst => $booksellers[0]->{'listincgst'},
84 invoiceincgst => $booksellers[0]->{'invoiceincgst'},
85 discount => $booksellers[0]->{'discount'},
86 loop_pricescurrency => \@loop_pricescurrency,
87 loop_invoicecurrency => \@loop_invoicecurrency,);
89 output_html_with_http_headers $query, $cookie, $template->output;