Fix für Bug 845.
$filter{na} = '-' unless $filter{na};
# make order, search in $filter and $form
- $form->{sort} = $filter{sort} unless $form->{sort};
- $form->{order} = ($form->{sort} = 'itime') unless $form->{sort};
- $form->{sort} = 'itime' if $form->{sort} eq "date";
- $form->{order} = $filter{order} unless $form->{order};
- $form->{sort} .= (($form->{order}) ? " DESC" : " ASC");
+ my $sort_col = $form->{sort};
+ my $sort_order = $form->{order};
+
+ $sort_col = $filter{sort} unless $sort_col;
+ $sort_order = ($sort_col = 'itime') unless $sort_col;
+ $sort_col = 'itime' if $sort_col eq 'date';
+ $sort_order = $filter{order} unless $sort_order;
+ my $sort_spec = "${sort_col} " . ($sort_order ? " DESC" : " ASC");
my $where_clause = join(" AND ", @filter_ary) . " AND " if (@filter_ary);
WHERE $where_clause i1.qty > 0 AND
i1.trans_id IN ( SELECT i.trans_id FROM inventory i GROUP BY i.trans_id HAVING COUNT(i.trans_id) = 1 )
GROUP BY $group_clause
- ORDER BY r_$form->{sort}|;
+ ORDER BY r_${sort_spec}|;
my $sth = prepare_execute_query($form, $dbh, $query, @filter_vars, @filter_vars, @filter_vars);
map { $form->{"l_${_}id"} = "Y" if ($form->{"l_${_}description"} || $form->{"l_${_}number"}); } qw(warehouse bin);
# make order, search in $filter and $form
- $form->{sort} = $filter{sort} unless $form->{sort};
- $form->{sort} = "parts_id" unless $form->{sort};
- $form->{order} = $filter{order} unless $form->{order};
- $form->{sort} =~ s/ASC|DESC//; # kill stuff left in from previous queries
- my $orderby = $form->{sort};
- $form->{sort} .= (($form->{order}) ? " DESC" : " ASC");
+ my $sort_col = $form->{sort};
+ my $sort_order = $form->{order};
+
+ $sort_col = $filter{sort} unless $sort_col;
+ $sort_col = "parts_id" unless $sort_col;
+ $sort_order = $filter{order} unless $sort_order;
+ $sort_col =~ s/ASC|DESC//; # kill stuff left in from previous queries
+ my $orderby = $sort_col;
+ my $sort_spec = "${sort_col} " . ($sort_order ? " DESC" : " ASC");
my $where_clause = join " AND ", ("1=1", @filter_ary);
$joins
WHERE $where_clause
GROUP BY $group_clause $group_by
- ORDER BY $form->{sort}|;
+ ORDER BY $sort_spec|;
my $sth = prepare_execute_query($form, $dbh, $query, @filter_vars);
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('ap_transactions', @hidden_variables);
+ $report->set_export_options('ap_transactions', @hidden_variables, qw(sort sortdir));
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
'raw_bottom_info_text' => $form->parse_html_template('ap/ap_transactions_bottom'),
'output_format' => 'HTML',
'title' => $form->{title},
- 'attachment_basename' => $locale->text('invoice_list') . strftime('_%Y%m%d', localtime time),
+ 'attachment_basename' => $locale->text('vendor_invoice_list') . strftime('_%Y%m%d', localtime time),
);
$report->set_options_from_form();
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('ar_transactions', @hidden_variables);
+ $report->set_export_options('ar_transactions', @hidden_variables, qw(sort sortdir));
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('list_names', @hidden_variables);
+ $report->set_export_options('list_names', @hidden_variables, qw(sort sortdir));
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
$report->set_options('std_column_visibility' => 1,
'title' => $form->{title});
- $report->set_export_options('show_dunning', @filter_field_list);
+ $report->set_export_options('show_dunning', @filter_field_list, qw(sort sortdir));
my %column_defs = (
'checkbox' => { 'text' => '', 'visible' => 'HTML' },
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('orders', @hidden_variables);
+ $report->set_export_options('orders', @hidden_variables, qw(sort sortdir));
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('report', @report_params);
+ $report->set_export_options('report', @report_params, qw(sort sortdir));
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
foreach my $name (qw(id transdate reference source description debit_accno credit_accno debit_tax_accno credit_tax_accno)) {
my $sortname = $name =~ m/accno/ ? 'accno' : $name;
- my $sortdir = $sortname eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
+ my $sortdir = $sortname eq $form->{sort} ? 1 - $form->{sortdir} : $form->{sortdir};
$column_defs{$name}->{link} = $callback . "&sort=$sortname&sortdir=$sortdir";
}
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('generate_report', @hidden_variables);
+ $report->set_export_options('generate_report', @hidden_variables, qw(sort sortdir));
$report->set_sort_indicator($form->{sort} eq 'accno' ? 'debit_accno' : $form->{sort}, $form->{sortdir});
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('orders', @hidden_variables);
+ $report->set_export_options('orders', @hidden_variables, qw(sort sortdir));
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
my @options;
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('project_report', @hidden_vars);
+ $report->set_export_options('project_report', @hidden_vars, 'sort');
$report->set_sort_indicator($form->{sort}, 1);
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('list_payments', @hidden_variables);
+ $report->set_export_options('list_payments', @hidden_variables, qw(sort sortdir));
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('generate_journal', @hidden_variables);
+ $report->set_export_options('generate_journal', @hidden_variables, qw(sort order));
$report->set_sort_indicator($form->{sort}, $form->{order});
$report->set_options('output_format' => 'HTML',
'title' => $form->{title},
- 'attachment_basename' => strftime('warehouse_journal_%Y%m%d', localtime time));
+ 'attachment_basename' => strftime($locale->text('warehouse_journal_list') . '_%Y%m%d', localtime time));
$report->set_options_from_form();
my $all_units = AM->retrieve_units(\%myconfig, $form);
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('generate_report', @hidden_variables);
+ $report->set_export_options('generate_report', @hidden_variables, qw(sort order));
$report->set_sort_indicator($sort_col, $form->{order});
$report->set_options('output_format' => 'HTML',
'title' => $form->{title},
- 'attachment_basename' => strftime('warehouse_report_%Y%m%d', localtime time));
+ 'attachment_basename' => strftime($locale->text('warehouse_report_list') . '_%Y%m%d', localtime time));
$report->set_options_from_form();
my $all_units = AM->retrieve_units(\%myconfig, $form);
'You\'ve already chosen the following limitations:' => 'Sie haben bereits die folgenden Einschränkungen vorgenommen:',
'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.',
'Your TODO list' => 'Ihre Aufgabenliste',
+ '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.',
'Zeitpunkt' => 'Zeitpunkt',
'Zeitraum' => 'Zeitraum',
'Zero amount posting!' => 'Buchung ohne Wert',
'used' => 'Verbraucht',
'valid from' => 'Gültig ab',
'vendor' => 'Lieferant',
+ 'vendor_invoice_list' => 'kreditorenbuchungsliste',
'vendor_list' => 'lieferantenliste',
+ 'warehouse_journal_list' => 'lagerbuchungsliste',
+ 'warehouse_report_list' => 'lagerbestandsliste',
'wrongformat' => 'Falsches Format',
'yes' => 'ja',
};
'customer' => 'Kunde',
'history' => 'Historie',
'invoice' => 'Rechnung',
- 'invoice_list' => 'debitorenbuchungsliste',
'mark as paid' => 'als bezahlt markieren',
'no' => 'nein',
'packing_list' => 'Versandliste',
'sales_order' => 'Kundenauftrag',
'sales_quotation' => 'Verkaufsangebot',
'vendor' => 'Lieferant',
+ 'vendor_invoice_list' => 'kreditorenbuchungsliste',
'wrongformat' => 'Falsches Format',
'yes' => 'ja',
};
'Warehouse management' => 'Lagerverwaltung/Bestandsveränderung',
'You do not have the permissions to access this function.' => 'Sie verfügen nicht über die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
'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.',
+ '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.',
'Zeitraum' => 'Zeitraum',
'[email]' => '[email]',
'bin_list' => 'Lagerliste',
'transfer' => 'Umlagerung',
'used' => 'Verbraucht',
'vendor' => 'Lieferant',
+ 'warehouse_journal_list' => 'lagerbuchungsliste',
+ 'warehouse_report_list' => 'lagerbestandsliste',
'yes' => 'ja',
};