Lines 49-54
use Carp;
Link Here
|
49 |
use C4::Auth; |
49 |
use C4::Auth; |
50 |
use C4::Output; |
50 |
use C4::Output; |
51 |
use CGI qw ( -utf8 ); |
51 |
use CGI qw ( -utf8 ); |
|
|
52 |
use File::Spec; |
52 |
|
53 |
|
53 |
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/; |
54 |
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/; |
54 |
use Koha::EDI qw/create_edi_order get_edifact_ean/; |
55 |
use Koha::EDI qw/create_edi_order get_edifact_ean/; |
Lines 123-151
sub displaybasketgroups {
Link Here
|
123 |
|
124 |
|
124 |
sub printbasketgrouppdf{ |
125 |
sub printbasketgrouppdf{ |
125 |
my ($basketgroupid) = @_; |
126 |
my ($basketgroupid) = @_; |
126 |
|
127 |
|
127 |
my $pdfformat = C4::Context->preference("OrderPdfFormat"); |
128 |
my $pdfformat = C4::Context->preference("OrderPdfFormat"); |
128 |
if ($pdfformat eq 'pdfformat::layout3pages' || $pdfformat eq 'pdfformat::layout2pages' || $pdfformat eq 'pdfformat::layout3pagesfr' |
129 |
my @valid_pdfformats = qw(pdfformat::layout3pages pdfformat::layout2pages pdfformat::layout3pagesfr pdfformat::layout2pagesde); |
129 |
|| $pdfformat eq 'pdfformat::layout2pagesde'){ |
130 |
if (grep {$_ eq $pdfformat} @valid_pdfformats) { |
130 |
eval { |
131 |
$pdfformat = "Koha::$pdfformat"; |
131 |
eval "require $pdfformat"; |
132 |
my $pdfformat_filepath = File::Spec->catfile(split /::/, $pdfformat) . '.pm'; |
132 |
import $pdfformat; |
133 |
require $pdfformat_filepath; |
133 |
}; |
134 |
import $pdfformat; |
134 |
if ($@){ |
|
|
135 |
} |
136 |
} |
135 |
} |
137 |
else { |
136 |
else { |
138 |
print $input->header; |
137 |
print $input->header; |
139 |
print $input->start_html; # FIXME Should do a nicer page |
138 |
print $input->start_html; # FIXME Should do a nicer page |
140 |
print "<h1>Invalid PDF Format set</h1>"; |
139 |
print "<h1>Invalid PDF Format set</h1>"; |
141 |
print "Please go to the systempreferences and set a valid pdfformat"; |
140 |
print "Please go to the systempreferences and set a valid pdfformat"; |
142 |
exit; |
141 |
exit; |
143 |
} |
142 |
} |
144 |
|
143 |
|
145 |
my $basketgroup = GetBasketgroup($basketgroupid); |
144 |
my $basketgroup = GetBasketgroup($basketgroupid); |
146 |
my $bookseller = Koha::Acquisition::Booksellers->find( $basketgroup->{booksellerid} ); |
145 |
my $bookseller = Koha::Acquisition::Booksellers->find( $basketgroup->{booksellerid} ); |
147 |
my $baskets = GetBasketsByBasketgroup($basketgroupid); |
146 |
my $baskets = GetBasketsByBasketgroup($basketgroupid); |
148 |
|
147 |
|
149 |
my %orders; |
148 |
my %orders; |
150 |
for my $basket (@$baskets) { |
149 |
for my $basket (@$baskets) { |
151 |
my @ba_orders; |
150 |
my @ba_orders; |
152 |
- |
|
|