Revision 19688fca
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
SL/WH.pm | ||
---|---|---|
301 | 301 |
$filter{na} = '-' unless $filter{na}; |
302 | 302 |
|
303 | 303 |
# make order, search in $filter and $form |
304 |
$form->{sort} = $filter{sort} unless $form->{sort}; |
|
305 |
$form->{order} = ($form->{sort} = 'itime') unless $form->{sort}; |
|
306 |
$form->{sort} = 'itime' if $form->{sort} eq "date"; |
|
307 |
$form->{order} = $filter{order} unless $form->{order}; |
|
308 |
$form->{sort} .= (($form->{order}) ? " DESC" : " ASC"); |
|
304 |
my $sort_col = $form->{sort}; |
|
305 |
my $sort_order = $form->{order}; |
|
306 |
|
|
307 |
$sort_col = $filter{sort} unless $sort_col; |
|
308 |
$sort_order = ($sort_col = 'itime') unless $sort_col; |
|
309 |
$sort_col = 'itime' if $sort_col eq 'date'; |
|
310 |
$sort_order = $filter{order} unless $sort_order; |
|
311 |
my $sort_spec = "${sort_col} " . ($sort_order ? " DESC" : " ASC"); |
|
309 | 312 |
|
310 | 313 |
my $where_clause = join(" AND ", @filter_ary) . " AND " if (@filter_ary); |
311 | 314 |
|
... | ... | |
400 | 403 |
WHERE $where_clause i1.qty > 0 AND |
401 | 404 |
i1.trans_id IN ( SELECT i.trans_id FROM inventory i GROUP BY i.trans_id HAVING COUNT(i.trans_id) = 1 ) |
402 | 405 |
GROUP BY $group_clause |
403 |
ORDER BY r_$form->{sort}|;
|
|
406 |
ORDER BY r_${sort_spec}|;
|
|
404 | 407 |
|
405 | 408 |
my $sth = prepare_execute_query($form, $dbh, $query, @filter_vars, @filter_vars, @filter_vars); |
406 | 409 |
|
... | ... | |
521 | 524 |
map { $form->{"l_${_}id"} = "Y" if ($form->{"l_${_}description"} || $form->{"l_${_}number"}); } qw(warehouse bin); |
522 | 525 |
|
523 | 526 |
# make order, search in $filter and $form |
524 |
$form->{sort} = $filter{sort} unless $form->{sort}; |
|
525 |
$form->{sort} = "parts_id" unless $form->{sort}; |
|
526 |
$form->{order} = $filter{order} unless $form->{order}; |
|
527 |
$form->{sort} =~ s/ASC|DESC//; # kill stuff left in from previous queries |
|
528 |
my $orderby = $form->{sort}; |
|
529 |
$form->{sort} .= (($form->{order}) ? " DESC" : " ASC"); |
|
527 |
my $sort_col = $form->{sort}; |
|
528 |
my $sort_order = $form->{order}; |
|
529 |
|
|
530 |
$sort_col = $filter{sort} unless $sort_col; |
|
531 |
$sort_col = "parts_id" unless $sort_col; |
|
532 |
$sort_order = $filter{order} unless $sort_order; |
|
533 |
$sort_col =~ s/ASC|DESC//; # kill stuff left in from previous queries |
|
534 |
my $orderby = $sort_col; |
|
535 |
my $sort_spec = "${sort_col} " . ($sort_order ? " DESC" : " ASC"); |
|
530 | 536 |
|
531 | 537 |
my $where_clause = join " AND ", ("1=1", @filter_ary); |
532 | 538 |
|
... | ... | |
571 | 577 |
$joins |
572 | 578 |
WHERE $where_clause |
573 | 579 |
GROUP BY $group_clause $group_by |
574 |
ORDER BY $form->{sort}|;
|
|
580 |
ORDER BY $sort_spec|;
|
|
575 | 581 |
|
576 | 582 |
my $sth = prepare_execute_query($form, $dbh, $query, @filter_vars); |
577 | 583 |
|
bin/mozilla/ap.pl | ||
---|---|---|
1420 | 1420 |
$report->set_columns(%column_defs); |
1421 | 1421 |
$report->set_column_order(@columns); |
1422 | 1422 |
|
1423 |
$report->set_export_options('ap_transactions', @hidden_variables); |
|
1423 |
$report->set_export_options('ap_transactions', @hidden_variables, qw(sort sortdir));
|
|
1424 | 1424 |
|
1425 | 1425 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir}); |
1426 | 1426 |
|
... | ... | |
1440 | 1440 |
'raw_bottom_info_text' => $form->parse_html_template('ap/ap_transactions_bottom'), |
1441 | 1441 |
'output_format' => 'HTML', |
1442 | 1442 |
'title' => $form->{title}, |
1443 |
'attachment_basename' => $locale->text('invoice_list') . strftime('_%Y%m%d', localtime time), |
|
1443 |
'attachment_basename' => $locale->text('vendor_invoice_list') . strftime('_%Y%m%d', localtime time),
|
|
1444 | 1444 |
); |
1445 | 1445 |
$report->set_options_from_form(); |
1446 | 1446 |
|
bin/mozilla/ar.pl | ||
---|---|---|
1507 | 1507 |
$report->set_columns(%column_defs); |
1508 | 1508 |
$report->set_column_order(@columns); |
1509 | 1509 |
|
1510 |
$report->set_export_options('ar_transactions', @hidden_variables); |
|
1510 |
$report->set_export_options('ar_transactions', @hidden_variables, qw(sort sortdir));
|
|
1511 | 1511 |
|
1512 | 1512 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir}); |
1513 | 1513 |
|
bin/mozilla/ct.pl | ||
---|---|---|
206 | 206 |
$report->set_columns(%column_defs); |
207 | 207 |
$report->set_column_order(@columns); |
208 | 208 |
|
209 |
$report->set_export_options('list_names', @hidden_variables); |
|
209 |
$report->set_export_options('list_names', @hidden_variables, qw(sort sortdir));
|
|
210 | 210 |
|
211 | 211 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir}); |
212 | 212 |
|
bin/mozilla/dn.pl | ||
---|---|---|
310 | 310 |
|
311 | 311 |
$report->set_options('std_column_visibility' => 1, |
312 | 312 |
'title' => $form->{title}); |
313 |
$report->set_export_options('show_dunning', @filter_field_list); |
|
313 |
$report->set_export_options('show_dunning', @filter_field_list, qw(sort sortdir));
|
|
314 | 314 |
|
315 | 315 |
my %column_defs = ( |
316 | 316 |
'checkbox' => { 'text' => '', 'visible' => 'HTML' }, |
bin/mozilla/do.pl | ||
---|---|---|
460 | 460 |
$report->set_columns(%column_defs); |
461 | 461 |
$report->set_column_order(@columns); |
462 | 462 |
|
463 |
$report->set_export_options('orders', @hidden_variables); |
|
463 |
$report->set_export_options('orders', @hidden_variables, qw(sort sortdir));
|
|
464 | 464 |
|
465 | 465 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir}); |
466 | 466 |
|
bin/mozilla/fu.pl | ||
---|---|---|
259 | 259 |
$report->set_columns(%column_defs); |
260 | 260 |
$report->set_column_order(@columns); |
261 | 261 |
|
262 |
$report->set_export_options('report', @report_params); |
|
262 |
$report->set_export_options('report', @report_params, qw(sort sortdir));
|
|
263 | 263 |
|
264 | 264 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir}); |
265 | 265 |
|
bin/mozilla/gl.pl | ||
---|---|---|
499 | 499 |
|
500 | 500 |
foreach my $name (qw(id transdate reference source description debit_accno credit_accno debit_tax_accno credit_tax_accno)) { |
501 | 501 |
my $sortname = $name =~ m/accno/ ? 'accno' : $name; |
502 |
my $sortdir = $sortname eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
|
|
502 |
my $sortdir = $sortname eq $form->{sort} ? 1 - $form->{sortdir} : $form->{sortdir};
|
|
503 | 503 |
$column_defs{$name}->{link} = $callback . "&sort=$sortname&sortdir=$sortdir"; |
504 | 504 |
} |
505 | 505 |
|
... | ... | |
516 | 516 |
$report->set_columns(%column_defs); |
517 | 517 |
$report->set_column_order(@columns); |
518 | 518 |
|
519 |
$report->set_export_options('generate_report', @hidden_variables); |
|
519 |
$report->set_export_options('generate_report', @hidden_variables, qw(sort sortdir));
|
|
520 | 520 |
|
521 | 521 |
$report->set_sort_indicator($form->{sort} eq 'accno' ? 'debit_accno' : $form->{sort}, $form->{sortdir}); |
522 | 522 |
|
bin/mozilla/oe.pl | ||
---|---|---|
972 | 972 |
|
973 | 973 |
$report->set_columns(%column_defs); |
974 | 974 |
$report->set_column_order(@columns); |
975 |
$report->set_export_options('orders', @hidden_variables); |
|
975 |
$report->set_export_options('orders', @hidden_variables, qw(sort sortdir));
|
|
976 | 976 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir}); |
977 | 977 |
|
978 | 978 |
my @options; |
bin/mozilla/projects.pl | ||
---|---|---|
132 | 132 |
$report->set_columns(%column_defs); |
133 | 133 |
$report->set_column_order(@columns); |
134 | 134 |
|
135 |
$report->set_export_options('project_report', @hidden_vars); |
|
135 |
$report->set_export_options('project_report', @hidden_vars, 'sort');
|
|
136 | 136 |
|
137 | 137 |
$report->set_sort_indicator($form->{sort}, 1); |
138 | 138 |
|
bin/mozilla/rp.pl | ||
---|---|---|
2308 | 2308 |
$report->set_columns(%column_defs); |
2309 | 2309 |
$report->set_column_order(@columns); |
2310 | 2310 |
|
2311 |
$report->set_export_options('list_payments', @hidden_variables); |
|
2311 |
$report->set_export_options('list_payments', @hidden_variables, qw(sort sortdir));
|
|
2312 | 2312 |
|
2313 | 2313 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir}); |
2314 | 2314 |
|
bin/mozilla/wh.pl | ||
---|---|---|
645 | 645 |
$report->set_columns(%column_defs); |
646 | 646 |
$report->set_column_order(@columns); |
647 | 647 |
|
648 |
$report->set_export_options('generate_journal', @hidden_variables); |
|
648 |
$report->set_export_options('generate_journal', @hidden_variables, qw(sort order));
|
|
649 | 649 |
|
650 | 650 |
$report->set_sort_indicator($form->{sort}, $form->{order}); |
651 | 651 |
|
652 | 652 |
$report->set_options('output_format' => 'HTML', |
653 | 653 |
'title' => $form->{title}, |
654 |
'attachment_basename' => strftime('warehouse_journal_%Y%m%d', localtime time));
|
|
654 |
'attachment_basename' => strftime($locale->text('warehouse_journal_list') . '_%Y%m%d', localtime time));
|
|
655 | 655 |
$report->set_options_from_form(); |
656 | 656 |
|
657 | 657 |
my $all_units = AM->retrieve_units(\%myconfig, $form); |
... | ... | |
767 | 767 |
$report->set_columns(%column_defs); |
768 | 768 |
$report->set_column_order(@columns); |
769 | 769 |
|
770 |
$report->set_export_options('generate_report', @hidden_variables); |
|
770 |
$report->set_export_options('generate_report', @hidden_variables, qw(sort order));
|
|
771 | 771 |
|
772 | 772 |
$report->set_sort_indicator($sort_col, $form->{order}); |
773 | 773 |
|
774 | 774 |
$report->set_options('output_format' => 'HTML', |
775 | 775 |
'title' => $form->{title}, |
776 |
'attachment_basename' => strftime('warehouse_report_%Y%m%d', localtime time));
|
|
776 |
'attachment_basename' => strftime($locale->text('warehouse_report_list') . '_%Y%m%d', localtime time));
|
|
777 | 777 |
$report->set_options_from_form(); |
778 | 778 |
|
779 | 779 |
my $all_units = AM->retrieve_units(\%myconfig, $form); |
locale/de/all | ||
---|---|---|
1680 | 1680 |
'You\'ve already chosen the following limitations:' => 'Sie haben bereits die folgenden Einschränkungen vorgenommen:', |
1681 | 1681 |
'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie m?ssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.', |
1682 | 1682 |
'Your TODO list' => 'Ihre Aufgabenliste', |
1683 |
'Your download does not exist anymore. Please re-run the DATEV export assistant.' => 'Ihr Download existiert nicht mehr. Bitte starten Sie den DATEV-Exportassistenten erneut.', |
|
1683 | 1684 |
'Zeitpunkt' => 'Zeitpunkt', |
1684 | 1685 |
'Zeitraum' => 'Zeitraum', |
1685 | 1686 |
'Zero amount posting!' => 'Buchung ohne Wert', |
... | ... | |
1812 | 1813 |
'used' => 'Verbraucht', |
1813 | 1814 |
'valid from' => 'G?ltig ab', |
1814 | 1815 |
'vendor' => 'Lieferant', |
1816 |
'vendor_invoice_list' => 'kreditorenbuchungsliste', |
|
1815 | 1817 |
'vendor_list' => 'lieferantenliste', |
1818 |
'warehouse_journal_list' => 'lagerbuchungsliste', |
|
1819 |
'warehouse_report_list' => 'lagerbestandsliste', |
|
1816 | 1820 |
'wrongformat' => 'Falsches Format', |
1817 | 1821 |
'yes' => 'ja', |
1818 | 1822 |
}; |
locale/de/ap | ||
---|---|---|
271 | 271 |
'customer' => 'Kunde', |
272 | 272 |
'history' => 'Historie', |
273 | 273 |
'invoice' => 'Rechnung', |
274 |
'invoice_list' => 'debitorenbuchungsliste', |
|
275 | 274 |
'mark as paid' => 'als bezahlt markieren', |
276 | 275 |
'no' => 'nein', |
277 | 276 |
'packing_list' => 'Versandliste', |
... | ... | |
284 | 283 |
'sales_order' => 'Kundenauftrag', |
285 | 284 |
'sales_quotation' => 'Verkaufsangebot', |
286 | 285 |
'vendor' => 'Lieferant', |
286 |
'vendor_invoice_list' => 'kreditorenbuchungsliste', |
|
287 | 287 |
'wrongformat' => 'Falsches Format', |
288 | 288 |
'yes' => 'ja', |
289 | 289 |
}; |
locale/de/datev | ||
---|---|---|
165 | 165 |
'Warehouse management' => 'Lagerverwaltung/Bestandsver?nderung', |
166 | 166 |
'You do not have the permissions to access this function.' => 'Sie verfügen nicht über die notwendigen Rechte, um auf diese Funktion zuzugreifen.', |
167 | 167 |
'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie m?ssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.', |
168 |
'Your download does not exist anymore. Please re-run the DATEV export assistant.' => 'Ihr Download existiert nicht mehr. Bitte starten Sie den DATEV-Exportassistenten erneut.', |
|
168 | 169 |
'Zeitraum' => 'Zeitraum', |
169 | 170 |
'[email]' => '[email]', |
170 | 171 |
'bin_list' => 'Lagerliste', |
locale/de/wh | ||
---|---|---|
219 | 219 |
'transfer' => 'Umlagerung', |
220 | 220 |
'used' => 'Verbraucht', |
221 | 221 |
'vendor' => 'Lieferant', |
222 |
'warehouse_journal_list' => 'lagerbuchungsliste', |
|
223 |
'warehouse_report_list' => 'lagerbestandsliste', |
|
222 | 224 |
'yes' => 'ja', |
223 | 225 |
}; |
224 | 226 |
|
Auch abrufbar als: Unified diff
Beim PDF- und CSV-Export der verschiedenen Berichte die vorherige Sortierreihenfolge beibehalten.
Fix für Bug 845.