43 |
43 |
my $output = '';
|
44 |
44 |
|
45 |
45 |
$output .= _requirement_spec_list( $self, $groups{requirement_specs}, %params) if $groups{requirement_specs};
|
46 |
|
$output .= _shop_order_list( $self, $groups{shop_orders}, %params) if $groups{shop_orders};
|
|
46 |
$output .= _shop_order_list( $self, $groups{shop_orders}, %params) if $groups{shop_orders};
|
47 |
47 |
$output .= _sales_quotation_list( $self, $groups{sales_quotations}, %params) if $groups{sales_quotations};
|
48 |
48 |
$output .= _sales_order_list( $self, $groups{sales_orders}, %params) if $groups{sales_orders};
|
49 |
49 |
$output .= _sales_delivery_order_list( $self, $groups{sales_delivery_orders}, %params) if $groups{sales_delivery_orders};
|
... | ... | |
168 |
168 |
|
169 |
169 |
sub _group_records {
|
170 |
170 |
my ($list) = @_;
|
171 |
|
$main::lxdebug->dump(0, 'WH: GROUP_RECORDS: ',\@_);
|
172 |
171 |
my %matchers = (
|
173 |
172 |
requirement_specs => sub { (ref($_[0]) eq 'SL::DB::RequirementSpec') },
|
174 |
|
shop_orders => sub { (ref($_[0]) eq 'SL::DB::ShopOrder') },
|
|
173 |
shop_orders => sub { (ref($_[0]) eq 'SL::DB::ShopOrder') && $_[0]->id },
|
175 |
174 |
sales_quotations => sub { (ref($_[0]) eq 'SL::DB::Order') && $_[0]->is_type('sales_quotation') },
|
176 |
175 |
sales_orders => sub { (ref($_[0]) eq 'SL::DB::Order') && $_[0]->is_type('sales_order') },
|
177 |
176 |
sales_delivery_orders => sub { (ref($_[0]) eq 'SL::DB::DeliveryOrder') && $_[0]->is_sales },
|
... | ... | |
235 |
234 |
|
236 |
235 |
sub _shop_order_list {
|
237 |
236 |
my ($self, $list, %params) = @_;
|
238 |
|
$main::lxdebug->dump(0, 'WH: ORDER_LIST: ',\@_);
|
|
237 |
|
239 |
238 |
return $self->record_list(
|
240 |
239 |
$list,
|
241 |
240 |
title => $::locale->text('Shop Orders'),
|
242 |
241 |
type => 'shop_order',
|
243 |
242 |
columns => [
|
244 |
|
[ $::locale->text('Shop Order Date'), 'order_date' ],
|
245 |
|
[ $::locale->text('Shop Order Number'), sub { $self->shop_order($_[0], display => 'table-cell') } ],
|
246 |
|
[ $::locale->text('Transfer Date'), 'transfer_date' ],
|
247 |
|
# [ $::locale->text('Customer'), 'customer' ],
|
248 |
|
[ $::locale->text('Net amount'), 'netamount' ],
|
249 |
|
#[ $::locale->text('Transaction description'), 'transaction_description' ],
|
250 |
|
#[ $::locale->text('Project'), 'globalproject', ],
|
251 |
|
#[ $::locale->text('Closed'), 'closed' ],
|
|
243 |
[ $::locale->text('Shop Order Date'), sub { $_[0]->order_date->to_kivitendo } ],
|
|
244 |
[ $::locale->text('Shop Order Number'), sub { $self->shop_order($_[0], display => 'table-cell') } ],
|
|
245 |
[ $::locale->text('Transfer Date'), 'transfer_date' ],
|
|
246 |
[ $::locale->text('Amount'), 'amount' ],
|
252 |
247 |
],
|
253 |
248 |
%params,
|
254 |
249 |
);
|
... | ... | |
262 |
257 |
title => $::locale->text('Sales Quotations'),
|
263 |
258 |
type => 'sales_quotation',
|
264 |
259 |
columns => [
|
265 |
|
[ $::locale->text('Quotation Date'), 'transdate' ],
|
266 |
|
[ $::locale->text('Quotation Number'), sub { $self->sales_quotation($_[0], display => 'table-cell') } ],
|
267 |
|
[ $::locale->text('Customer'), 'customer' ],
|
268 |
|
[ $::locale->text('Net amount'), 'netamount' ],
|
269 |
|
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
270 |
|
[ $::locale->text('Project'), 'globalproject', ],
|
271 |
|
[ $::locale->text('Closed'), 'closed' ],
|
|
260 |
[ $::locale->text('Quotation Date'), 'transdate' ],
|
|
261 |
[ $::locale->text('Quotation Number'), sub { $self->sales_quotation($_[0], display => 'table-cell') } ],
|
|
262 |
[ $::locale->text('Customer'), 'customer' ],
|
|
263 |
[ $::locale->text('Amount'), 'amount' ],
|
|
264 |
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
|
265 |
[ $::locale->text('Project'), 'globalproject', ],
|
|
266 |
[ $::locale->text('Closed'), 'closed' ],
|
272 |
267 |
],
|
273 |
268 |
%params,
|
274 |
269 |
);
|
... | ... | |
282 |
277 |
title => $::locale->text('Request Quotations'),
|
283 |
278 |
type => 'request_quotation',
|
284 |
279 |
columns => [
|
285 |
|
[ $::locale->text('Quotation Date'), 'transdate' ],
|
286 |
|
[ $::locale->text('Quotation Number'), sub { $self->request_quotation($_[0], display => 'table-cell') } ],
|
287 |
|
[ $::locale->text('Vendor'), 'vendor' ],
|
288 |
|
[ $::locale->text('Net amount'), 'netamount' ],
|
289 |
|
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
290 |
|
[ $::locale->text('Project'), 'globalproject', ],
|
291 |
|
[ $::locale->text('Closed'), 'closed' ],
|
|
280 |
[ $::locale->text('Quotation Date'), 'transdate' ],
|
|
281 |
[ $::locale->text('Quotation Number'), sub { $self->request_quotation($_[0], display => 'table-cell') } ],
|
|
282 |
[ $::locale->text('Vendor'), 'vendor' ],
|
|
283 |
[ $::locale->text('Net amount'), 'netamount' ],
|
|
284 |
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
|
285 |
[ $::locale->text('Project'), 'globalproject', ],
|
|
286 |
[ $::locale->text('Closed'), 'closed' ],
|
292 |
287 |
],
|
293 |
288 |
%params,
|
294 |
289 |
);
|
... | ... | |
302 |
297 |
title => $::locale->text('Sales Orders'),
|
303 |
298 |
type => 'sales_order',
|
304 |
299 |
columns => [
|
305 |
|
[ $::locale->text('Order Date'), 'transdate' ],
|
306 |
|
[ $::locale->text('Order Number'), sub { $self->sales_order($_[0], display => 'table-cell') } ],
|
307 |
|
[ $::locale->text('Quotation'), 'quonumber' ],
|
308 |
|
[ $::locale->text('Customer'), 'customer' ],
|
309 |
|
[ $::locale->text('Net amount'), 'netamount' ],
|
310 |
|
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
311 |
|
[ $::locale->text('Project'), 'globalproject', ],
|
312 |
|
[ $::locale->text('Closed'), 'closed' ],
|
|
300 |
[ $::locale->text('Order Date'), 'transdate' ],
|
|
301 |
[ $::locale->text('Order Number'), sub { $self->sales_order($_[0], display => 'table-cell') } ],
|
|
302 |
[ $::locale->text('Quotation'), 'quonumber' ],
|
|
303 |
[ $::locale->text('Customer'), 'customer' ],
|
|
304 |
[ $::locale->text('Amount'), 'amount' ],
|
|
305 |
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
|
306 |
[ $::locale->text('Project'), 'globalproject', ],
|
|
307 |
[ $::locale->text('Closed'), 'closed' ],
|
313 |
308 |
],
|
314 |
309 |
%params,
|
315 |
310 |
);
|
... | ... | |
323 |
318 |
title => $::locale->text('Purchase Orders'),
|
324 |
319 |
type => 'purchase_order',
|
325 |
320 |
columns => [
|
326 |
|
[ $::locale->text('Order Date'), 'transdate' ],
|
|
321 |
[ $::locale->text('Order Date'), 'transdate' ],
|
327 |
322 |
[ $::locale->text('Order Number'), sub { $self->purchase_order($_[0], display => 'table-cell') } ],
|
328 |
|
[ $::locale->text('Request for Quotation'), 'quonumber' ],
|
329 |
|
[ $::locale->text('Vendor'), 'vendor' ],
|
330 |
|
[ $::locale->text('Net amount'), 'netamount' ],
|
331 |
|
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
332 |
|
[ $::locale->text('Project'), 'globalproject', ],
|
333 |
|
[ $::locale->text('Closed'), 'closed' ],
|
|
323 |
[ $::locale->text('Request for Quotation'), 'quonumber' ],
|
|
324 |
[ $::locale->text('Vendor'), 'vendor' ],
|
|
325 |
[ $::locale->text('Net amount'), 'netamount' ],
|
|
326 |
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
|
327 |
[ $::locale->text('Project'), 'globalproject', ],
|
|
328 |
[ $::locale->text('Closed'), 'closed' ],
|
334 |
329 |
],
|
335 |
330 |
%params,
|
336 |
331 |
);
|
... | ... | |
344 |
339 |
title => $::locale->text('Sales Delivery Orders'),
|
345 |
340 |
type => 'sales_delivery_order',
|
346 |
341 |
columns => [
|
347 |
|
[ $::locale->text('Delivery Order Date'), 'transdate' ],
|
|
342 |
[ $::locale->text('Delivery Order Date'), 'transdate' ],
|
348 |
343 |
[ $::locale->text('Delivery Order Number'), sub { $self->sales_delivery_order($_[0], display => 'table-cell') } ],
|
349 |
|
[ $::locale->text('Order Number'), 'ordnumber' ],
|
350 |
|
[ $::locale->text('Customer'), 'customer' ],
|
351 |
|
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
352 |
|
[ $::locale->text('Project'), 'globalproject', ],
|
353 |
|
[ $::locale->text('Delivered'), 'delivered' ],
|
354 |
|
[ $::locale->text('Closed'), 'closed' ],
|
|
344 |
[ $::locale->text('Order Number'), 'ordnumber' ],
|
|
345 |
[ $::locale->text('Customer'), 'customer' ],
|
|
346 |
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
|
347 |
[ $::locale->text('Project'), 'globalproject', ],
|
|
348 |
[ $::locale->text('Delivered'), 'delivered' ],
|
|
349 |
[ $::locale->text('Closed'), 'closed' ],
|
355 |
350 |
],
|
356 |
351 |
%params,
|
357 |
352 |
);
|
... | ... | |
365 |
360 |
title => $::locale->text('Purchase Delivery Orders'),
|
366 |
361 |
type => 'purchase_delivery_order',
|
367 |
362 |
columns => [
|
368 |
|
[ $::locale->text('Delivery Order Date'), 'transdate' ],
|
|
363 |
[ $::locale->text('Delivery Order Date'), 'transdate' ],
|
369 |
364 |
[ $::locale->text('Delivery Order Number'), sub { $self->purchase_delivery_order($_[0], display => 'table-cell') } ],
|
370 |
|
[ $::locale->text('Order Number'), 'ordnumber' ],
|
371 |
|
[ $::locale->text('Vendor'), 'vendor' ],
|
372 |
|
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
373 |
|
[ $::locale->text('Project'), 'globalproject', ],
|
374 |
|
[ $::locale->text('Delivered'), 'delivered' ],
|
375 |
|
[ $::locale->text('Closed'), 'closed' ],
|
|
365 |
[ $::locale->text('Order Number'), 'ordnumber' ],
|
|
366 |
[ $::locale->text('Vendor'), 'vendor' ],
|
|
367 |
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
|
368 |
[ $::locale->text('Project'), 'globalproject', ],
|
|
369 |
[ $::locale->text('Delivered'), 'delivered' ],
|
|
370 |
[ $::locale->text('Closed'), 'closed' ],
|
376 |
371 |
],
|
377 |
372 |
%params,
|
378 |
373 |
);
|
... | ... | |
386 |
381 |
title => $::locale->text('Sales Invoices'),
|
387 |
382 |
type => 'sales_invoice',
|
388 |
383 |
columns => [
|
389 |
|
[ $::locale->text('Invoice Date'), 'transdate' ],
|
390 |
|
[ $::locale->text('Type'), sub { $_[0]->displayable_type } ],
|
|
384 |
[ $::locale->text('Invoice Date'), 'transdate' ],
|
|
385 |
[ $::locale->text('Type'), sub { $_[0]->displayable_type } ],
|
391 |
386 |
[ $::locale->text('Invoice Number'), sub { $self->sales_invoice($_[0], display => 'table-cell') } ],
|
392 |
|
[ $::locale->text('Quotation Number'), 'quonumber' ],
|
393 |
|
[ $::locale->text('Order Number'), 'ordnumber' ],
|
394 |
|
[ $::locale->text('Customer'), 'customer' ],
|
395 |
|
[ $::locale->text('Net amount'), 'netamount' ],
|
396 |
|
[ $::locale->text('Paid'), 'paid' ],
|
397 |
|
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
|
387 |
[ $::locale->text('Quotation Number'), 'quonumber' ],
|
|
388 |
[ $::locale->text('Order Number'), 'ordnumber' ],
|
|
389 |
[ $::locale->text('Customer'), 'customer' ],
|
|
390 |
[ $::locale->text('Amount'), 'amount' ],
|
|
391 |
[ $::locale->text('Paid'), 'paid' ],
|
|
392 |
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
398 |
393 |
],
|
399 |
394 |
%params,
|
400 |
395 |
);
|
Shopmodul: RecordLinks - Vernüpfte Belege gefixt(bei 2 Shoporder),Linktext anstatt id shop_ordernumber