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.
50 use C4::Interface::CGI::Output;
57 my $id=$query->param('supplierid');
58 my @booksellers = GetBookSeller($id);
59 my $count = scalar @booksellers;
61 my ($template, $loggedinuser, $cookie)
62 = get_template_and_user({template_name => "acqui/supplier.tmpl",
66 flagsrequired => {acquisition => 1},
70 #build array for currencies
71 my @currencies = GetCurrencies();
72 my $count = scalar @currencies;
74 my @loop_pricescurrency;
75 my @loop_invoicecurrency;
76 for (my $i=0;$i<$count;$i++) {
77 if ($booksellers[0]->{'listprice'} eq $currencies[$i]->{'currency'}) {
78 push @loop_pricescurrency, { currency => "<option selected=\"selected\" value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>" };
80 push @loop_pricescurrency, { currency => "<option value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
82 if ($booksellers[0]->{'invoiceprice'} eq $currencies[$i]->{'currency'}) {
83 push @loop_invoicecurrency, { currency => "<option selected=\"selected\" value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
85 push @loop_invoicecurrency, { currency => "<option value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
88 $template->param(id => $id,
89 name => $booksellers[0]->{'name'},
90 postal =>$booksellers[0]->{'postal'},
91 address1 => $booksellers[0]->{'address1'},
92 address2 => $booksellers[0]->{'address2'},
93 address3 => $booksellers[0]->{'address3'},
94 address4 => $booksellers[0]->{'address4'},
95 phone =>$booksellers[0]->{'phone'},
96 fax => $booksellers[0]->{'fax'},
97 url => $booksellers[0]->{'url'},
98 contact => $booksellers[0]->{'contact'},
99 contpos => $booksellers[0]->{'contpos'},
100 contphone => $booksellers[0]->{'contphone'},
101 contaltphone => $booksellers[0]->{'contaltphone'},
102 contfax => $booksellers[0]->{'contfax'},
103 contemail => $booksellers[0]->{'contemail'},
104 contnotes => $booksellers[0]->{'contnotes'},
105 notes => $booksellers[0]->{'notes'},
106 active => $booksellers[0]->{'active'},
107 specialty => $booksellers[0]->{'specialty'},
108 gstreg => $booksellers[0]->{'gstreg'},
109 listincgst => $booksellers[0]->{'listincgst'},
110 invoiceincgst => $booksellers[0]->{'invoiceincgst'},
111 discount => $booksellers[0]->{'discount'},
112 loop_pricescurrency => \@loop_pricescurrency,
113 loop_invoicecurrency => \@loop_invoicecurrency,);
115 output_html_with_http_headers $query, $cookie, $template->output;