5 #script to show display basket of orders
6 #written by chris@katipo.co.nz 24/2/2000
8 # Copyright 2000-2002 Katipo Communications
10 # This file is part of Koha.
12 # Koha is free software; you can redistribute it and/or modify it under the
13 # terms of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
17 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
18 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
19 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License along with
22 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
23 # Suite 330, Boston, MA 02111-1307 USA
30 this script shows the details for a bookseller given on input arg.
31 It allows to edit & save information about this bookseller.
38 To know the bookseller this script has to display details.
49 use C4::Interface::CGI::Output;
54 my $id=$query->param('supplierid');
55 my @booksellers = GetBookSeller($id);
56 my $count = scalar @booksellers;
58 my ($template, $loggedinuser, $cookie)
59 = get_template_and_user({template_name => "acqui/supplier.tmpl",
63 flagsrequired => {acquisition => 1},
67 #build array for currencies
68 my @currencies = GetCurrencies();
69 my $count = scalar @currencies;
71 my @loop_pricescurrency;
72 my @loop_invoicecurrency;
73 for (my $i=0;$i<$count;$i++) {
74 if ($booksellers[0]->{'listprice'} eq $currencies[$i]->{'currency'}) {
75 push @loop_pricescurrency, { currency => "<option selected=\"selected\" value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>" };
77 push @loop_pricescurrency, { currency => "<option value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
79 if ($booksellers[0]->{'invoiceprice'} eq $currencies[$i]->{'currency'}) {
80 push @loop_invoicecurrency, { currency => "<option selected=\"selected\" value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
82 push @loop_invoicecurrency, { currency => "<option value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
85 $template->param(id => $id,
86 name => $booksellers[0]->{'name'},
87 postal =>$booksellers[0]->{'postal'},
88 address1 => $booksellers[0]->{'address1'},
89 address2 => $booksellers[0]->{'address2'},
90 address3 => $booksellers[0]->{'address3'},
91 address4 => $booksellers[0]->{'address4'},
92 phone =>$booksellers[0]->{'phone'},
93 fax => $booksellers[0]->{'fax'},
94 url => $booksellers[0]->{'url'},
95 contact => $booksellers[0]->{'contact'},
96 contpos => $booksellers[0]->{'contpos'},
97 contphone => $booksellers[0]->{'contphone'},
98 contaltphone => $booksellers[0]->{'contaltphone'},
99 contfax => $booksellers[0]->{'contfax'},
100 contemail => $booksellers[0]->{'contemail'},
101 contnotes => $booksellers[0]->{'contnotes'},
102 notes => $booksellers[0]->{'notes'},
103 active => $booksellers[0]->{'active'},
104 specialty => $booksellers[0]->{'specialty'},
105 gstreg => $booksellers[0]->{'gstreg'},
106 listincgst => $booksellers[0]->{'listincgst'},
107 invoiceincgst => $booksellers[0]->{'invoiceincgst'},
108 discount => $booksellers[0]->{'discount'},
109 loop_pricescurrency => \@loop_pricescurrency,
110 loop_invoicecurrency => \@loop_invoicecurrency,);
112 output_html_with_http_headers $query, $cookie, $template->output;