- $template->param(
- id => $id,
- name => $booksellers[0]->{'name'},
- postal => $booksellers[0]->{'postal'},
- address1 => $booksellers[0]->{'address1'},
- address2 => $booksellers[0]->{'address2'},
- address3 => $booksellers[0]->{'address3'},
- address4 => $booksellers[0]->{'address4'},
- phone => $booksellers[0]->{'phone'},
- fax => $booksellers[0]->{'fax'},
- url => $booksellers[0]->{'url'},
- contact => $booksellers[0]->{'contact'},
- contpos => $booksellers[0]->{'contpos'},
- contphone => $booksellers[0]->{'contphone'},
- contaltphone => $booksellers[0]->{'contaltphone'},
- contfax => $booksellers[0]->{'contfax'},
- contemail => $booksellers[0]->{'contemail'},
- contnotes => $booksellers[0]->{'contnotes'},
- notes => $booksellers[0]->{'notes'},
- active => $booksellers[0]->{'active'},
- gstreg => $booksellers[0]->{'gstreg'},
- listincgst => $booksellers[0]->{'listincgst'},
- invoiceincgst => $booksellers[0]->{'invoiceincgst'},
- gstrate => $booksellers[0]->{'gstrate'}*100,
- discount => $booksellers[0]->{'discount'},
- invoiceprice => $booksellers[0]->{'invoiceprice'},
- listprice => $booksellers[0]->{'listprice'},
- GST => $GST,
- basketcount => $booksellers[0]->{'basketcount'},
- contracts => \@contracts
- );
-}
-elsif ($op eq 'delete') {
- &DelBookseller($id);
- print $query->redirect("/cgi-bin/koha/acqui/acqui-home.pl");
- exit;
+ $template->param(
+ booksellerid => $booksellerid,
+ name => $supplier->{'name'},
+ postal => $supplier->{'postal'},
+ address1 => $supplier->{'address1'},
+ address2 => $supplier->{'address2'},
+ address3 => $supplier->{'address3'},
+ address4 => $supplier->{'address4'},
+ phone => $supplier->{'phone'},
+ accountnumber => $supplier->{'accountnumber'},
+ fax => $supplier->{'fax'},
+ url => $supplier->{'url'},
+ contact => $supplier->{'contact'},
+ contpos => $supplier->{'contpos'},
+ contphone => $supplier->{'contphone'},
+ contaltphone => $supplier->{'contaltphone'},
+ contfax => $supplier->{'contfax'},
+ contemail => $supplier->{'contemail'},
+ contnotes => $supplier->{'contnotes'},
+ notes => $supplier->{'notes'},
+ active => $supplier->{'active'},
+ gstreg => $supplier->{'gstreg'},
+ listincgst => $supplier->{'listincgst'},
+ invoiceincgst => $supplier->{'invoiceincgst'},
+ discount => $supplier->{'discount'},
+ invoiceprice => $supplier->{'invoiceprice'},
+ listprice => $supplier->{'listprice'},
+ GST => $tax_rate,
+ default_tax => defined($seller_gstrate),
+ basketcount => $supplier->{'basketcount'},
+ subscriptioncount => $supplier->{'subscriptioncount'},
+ contracts => $contracts,
+ );
+} elsif ( $op eq 'delete' ) {
+ # no further message needed for the user
+ # the DELETE button only appears in the template if basketcount == 0
+ if ( $supplier->{'basketcount'} == 0 ) {
+ DelBookseller($booksellerid);
+ }
+ print $query->redirect('/cgi-bin/koha/acqui/acqui-home.pl');
+ exit;