Lines 105-126
$template->param(
Link Here
|
105 |
); |
105 |
); |
106 |
|
106 |
|
107 |
# Build suppliers list |
107 |
# Build suppliers list |
108 |
my @suppliers = Koha::Acquisition::Booksellers->search( undef, { order_by => { -asc => 'name' } } )->as_list; |
108 |
my $supplier; |
109 |
my $suppliers_loop = []; |
109 |
$supplier = Koha::Acquisition::Booksellers->find($supplierid) if $supplierid; |
110 |
my $suppliername; |
|
|
111 |
foreach (@suppliers) { |
112 |
my $selected = 0; |
113 |
if ($supplierid && $supplierid == $_->id ) { |
114 |
$selected = 1; |
115 |
$suppliername = $_->name; |
116 |
} |
117 |
push @{$suppliers_loop}, |
118 |
{ |
119 |
suppliername => $_->name, |
120 |
booksellerid => $_->id, |
121 |
selected => $selected, |
122 |
}; |
123 |
} |
124 |
|
110 |
|
125 |
my $budgets = GetBudgets(); |
111 |
my $budgets = GetBudgets(); |
126 |
my @budgets_loop; |
112 |
my @budgets_loop; |
Lines 140-163
for my $sub ( @{$invoices} ) {
Link Here
|
140 |
$template->{'VARS'}->{'budgets_loop'} = \@budgets_loop; |
126 |
$template->{'VARS'}->{'budgets_loop'} = \@budgets_loop; |
141 |
|
127 |
|
142 |
$template->param( |
128 |
$template->param( |
143 |
openedinvoices => \@openedinvoices, |
129 |
openedinvoices => \@openedinvoices, |
144 |
closedinvoices => \@closedinvoices, |
130 |
closedinvoices => \@closedinvoices, |
145 |
do_search => ( $op and $op eq 'cud-do_search' ) ? 1 : 0, |
131 |
do_search => ( $op and $op eq 'do_search' ) ? 1 : 0, |
146 |
invoices => $invoices, |
132 |
invoices => $invoices, |
147 |
invoicenumber => $invoicenumber, |
133 |
invoicenumber => $invoicenumber, |
148 |
booksellerid => $supplierid, |
134 |
booksellerid => $supplierid, |
149 |
suppliername => $suppliername, |
135 |
supplier => $supplier, |
150 |
shipmentdatefrom => $shipmentdatefrom, |
136 |
shipmentdatefrom => $shipmentdatefrom, |
151 |
shipmentdateto => $shipmentdateto, |
137 |
shipmentdateto => $shipmentdateto, |
152 |
billingdatefrom => $billingdatefrom, |
138 |
billingdatefrom => $billingdatefrom, |
153 |
billingdateto => $billingdateto, |
139 |
billingdateto => $billingdateto, |
154 |
isbneanissn => $isbneanissn, |
140 |
isbneanissn => $isbneanissn, |
155 |
title => $title, |
141 |
title => $title, |
156 |
author => $author, |
142 |
author => $author, |
157 |
publisher => $publisher, |
143 |
publisher => $publisher, |
158 |
publicationyear => $publicationyear, |
144 |
publicationyear => $publicationyear, |
159 |
branch => $branch, |
145 |
branch => $branch, |
160 |
suppliers_loop => $suppliers_loop, |
|
|
161 |
); |
146 |
); |
162 |
|
147 |
|
163 |
output_html_with_http_headers $input, $cookie, $template->output; |
148 |
output_html_with_http_headers $input, $cookie, $template->output; |