Revision dde9d68d
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
bin/mozilla/dn.pl | ||
---|---|---|
287 | 287 |
my @filter_field_list = qw(customer_id customer dunning_level department_id invnumber ordnumber |
288 | 288 |
transdatefrom transdateto dunningfrom dunningto notes showold); |
289 | 289 |
|
290 |
report_generator_set_default_sort('customername', 1); |
|
291 |
|
|
290 | 292 |
DN->get_dunning(\%myconfig, \%$form); |
291 | 293 |
|
292 | 294 |
if (!$form->{callback}) { |
... | ... | |
310 | 312 |
'title' => $form->{title}); |
311 | 313 |
$report->set_export_options('show_dunning', @filter_field_list); |
312 | 314 |
|
313 |
$report->set_columns(
|
|
315 |
my %column_defs = (
|
|
314 | 316 |
'checkbox' => { 'text' => '', 'visible' => 'HTML' }, |
315 | 317 |
'dunning_description' => { 'text' => $locale->text('Dunning Level') }, |
316 | 318 |
'customername' => { 'text' => $locale->text('Customername') }, |
... | ... | |
324 | 326 |
'interest' => { 'text' => $locale->text('Interest') }, |
325 | 327 |
); |
326 | 328 |
|
329 |
$report->set_columns(%column_defs); |
|
327 | 330 |
$report->set_column_order(qw(checkbox dunning_description customername invnumber transdate |
328 | 331 |
duedate amount dunning_date dunning_duedate fee interest)); |
332 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir}); |
|
329 | 333 |
|
330 | 334 |
my $edit_url = build_std_url('script=is.pl', 'action=edit', 'callback') . '&id='; |
331 | 335 |
my $print_url = build_std_url('action=print_dunning', 'format=pdf', 'media=screen') . '&dunning_id='; |
336 |
my $sort_url = build_std_url('action=show_dunning', grep { $form->{$_} } @filter_field_list); |
|
337 |
|
|
338 |
foreach my $name (qw(dunning_description customername invnumber transdate duedate dunning_date dunning_duedate)) { |
|
339 |
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; |
|
340 |
$column_defs{$name}->{link} = $sort_url . "&sort=$name&sortdir=$sortdir"; |
|
341 |
} |
|
332 | 342 |
|
333 | 343 |
my %alignment = map { $_ => 'right' } qw(transdate duedate amount dunning_date dunning_duedate fee interest); |
334 | 344 |
|
Auch abrufbar als: Unified diff
Bericht über Mahnungen sortierbar gemacht.