($form->{ $form->{vc} }, $form->{"${form->{vc}}_id"}) = split(/--/, $form->{ $form->{vc} });
- $form->{sort} ||= 'transdate';
- $form->{sortdir} = 1 unless (defined $form->{sortdir});
- $form->{sortdir} = $form->{sortdir} ? 1 : 0;
+ report_generator_set_default_sort('transdate', 1);
DO->transactions();
($form->{ $form->{vc} }, $form->{"${form->{vc}}_id"}) = split(/--/, $form->{ $form->{vc} });
- $form->{sort} ||= 'transdate';
- $form->{sortdir} = 1 unless (defined $form->{sortdir});
- $form->{sortdir} = $form->{sortdir} ? 1 : 0;
+ report_generator_set_default_sort('transdate', 1);
OE->transactions(\%myconfig, \%$form);
use SL::MoreCommon;
use SL::ReportGenerator;
+sub report_generator_set_default_sort {
+ $lxdebug->enter_sub();
+
+ my $default_sortorder = shift;
+ my $default_sortdir = shift;
+
+ $form->{sort} ||= $default_sortorder;
+ $form->{sortdir} = $default_sortdir unless (defined $form->{sortdir});
+ $form->{sortdir} = $form->{sortdir} ? 1 : 0;
+
+ $lxdebug->leave_sub();
+}
+
+
sub report_generator_export_as_pdf {
$lxdebug->enter_sub();
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'retrieve_partunits' => 'retrieve_partunits',
'save_draft' => 'save_draft',
'search' => 'search',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'retrieve_partunits' => 'retrieve_partunits',
'save_draft' => 'save_draft',
'search' => 'search',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'weiter' => 'continue',
'buchungsliste' => 'list_transactions',
};
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'retrieve_partunits' => 'retrieve_partunits',
'save' => 'save',
'save_and_ap_transaction' => 'save_and_ap_transaction',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'request_for_quotation' => 'request_for_quotation',
'retrieve_partunits' => 'retrieve_partunits',
'save' => 'save',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'request_for_quotation' => 'request_for_quotation',
'retrieve_partunits' => 'retrieve_partunits',
'save' => 'save',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'save' => 'save',
'save_access_rights' => 'save_access_rights',
'save_follow_up' => 'save_follow_up',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'retrieve_partunits' => 'retrieve_partunits',
'search' => 'search',
'select_part' => 'select_part',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'request_for_quotation' => 'request_for_quotation',
'retrieve_partunits' => 'retrieve_partunits',
'save' => 'save',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'request_for_quotation' => 'request_for_quotation',
'retrieve_partunits' => 'retrieve_partunits',
'sales_order' => 'sales_order',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'request_for_quotation' => 'request_for_quotation',
'retrieve_partunits' => 'retrieve_partunits',
'sales_order' => 'sales_order',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'retrieve_partunits' => 'retrieve_partunits',
'save' => 'save',
'save_as_new' => 'save_as_new',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'weiter' => 'continue',
};
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'retrieve_partunits' => 'retrieve_partunits',
'select_all' => 'select_all',
'select_name' => 'select_name',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'request_for_quotation' => 'request_for_quotation',
'retrieve_partunits' => 'retrieve_partunits',
'sales_order' => 'sales_order',
'report_generator_do' => 'report_generator_do',
'report_generator_export_as_csv' => 'report_generator_export_as_csv',
'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'report_generator_set_default_sort' => 'report_generator_set_default_sort',
'retrieve_partunits' => 'retrieve_partunits',
'select_part' => 'select_part',
'select_part_internal' => 'select_part_internal',