Auslagerung gemeinsamen Codes.
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 7 Jul 2008 09:26:09 +0000 (09:26 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 7 Jul 2008 09:26:09 +0000 (09:26 +0000)
19 files changed:
bin/mozilla/do.pl
bin/mozilla/oe.pl
bin/mozilla/reportgenerator.pl
locale/de/ap
locale/de/ar
locale/de/ca
locale/de/ct
locale/de/dn
locale/de/do
locale/de/fu
locale/de/gl
locale/de/ic
locale/de/login
locale/de/oe
locale/de/projects
locale/de/reportgenerator
locale/de/rp
locale/de/todo
locale/de/wh

index c3c4b07..b4ccfe3 100644 (file)
@@ -409,9 +409,7 @@ sub orders {
 
   ($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();
 
index 5c1a9c2..322706a 100644 (file)
@@ -888,9 +888,7 @@ sub orders {
 
   ($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);
 
index 50f6ecc..5f5d407 100644 (file)
@@ -16,6 +16,20 @@ use SL::Common;
 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();
 
index b3268c3..575e482 100644 (file)
@@ -311,6 +311,7 @@ $self->{subs} = {
   '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',
index 9259d31..6f48917 100644 (file)
@@ -322,6 +322,7 @@ $self->{subs} = {
   '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',
index 4629504..959acfe 100644 (file)
@@ -175,6 +175,7 @@ $self->{subs} = {
   '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',
 };
index cdd9e03..19126f0 100644 (file)
@@ -215,6 +215,7 @@ $self->{subs} = {
   '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',
index fb35eac..98089a1 100644 (file)
@@ -318,6 +318,7 @@ $self->{subs} = {
   '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',
index 3e05f0a..137c9ac 100644 (file)
@@ -361,6 +361,7 @@ $self->{subs} = {
   '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',
index c91b0bf..0c08e93 100644 (file)
@@ -161,6 +161,7 @@ $self->{subs} = {
   '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',
index ce11afc..f1e7687 100644 (file)
@@ -284,6 +284,7 @@ $self->{subs} = {
   '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',
index bd2bd7c..30845d6 100644 (file)
@@ -386,6 +386,7 @@ $self->{subs} = {
   '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',
index 4b4fcd2..380f835 100644 (file)
@@ -469,6 +469,7 @@ $self->{subs} = {
   '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',
index da8a298..23553b9 100644 (file)
@@ -426,6 +426,7 @@ $self->{subs} = {
   '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',
index 3f1ede5..82ab89d 100644 (file)
@@ -181,6 +181,7 @@ $self->{subs} = {
   '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',
index a4e7c3c..18eac66 100644 (file)
@@ -112,6 +112,7 @@ $self->{subs} = {
   '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',
 };
 
index 098f749..0338f21 100644 (file)
@@ -307,6 +307,7 @@ $self->{subs} = {
   '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',
index 04e38ce..2b8ca2e 100644 (file)
@@ -458,6 +458,7 @@ $self->{subs} = {
   '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',
index a305ae5..5adb82f 100644 (file)
@@ -228,6 +228,7 @@ $self->{subs} = {
   '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',