Reportgenerator: Die Funktionen in report_generator.pl umbenannt und den Mechanismus...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 14 Jun 2007 11:25:55 +0000 (11:25 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 14 Jun 2007 11:25:55 +0000 (11:25 +0000)
12 files changed:
bin/mozilla/report_generator.pl
locale/de/all
locale/de/ap
locale/de/ar
locale/de/dn
locale/de/oe
templates/webpages/report_generator/csv_export_options_de.html
templates/webpages/report_generator/csv_export_options_master.html
templates/webpages/report_generator/html_report_de.html
templates/webpages/report_generator/html_report_master.html
templates/webpages/report_generator/pdf_export_options_de.html
templates/webpages/report_generator/pdf_export_options_master.html

index 6c76678..db65eb0 100644 (file)
@@ -14,7 +14,7 @@ use SL::Common;
 use SL::MoreCommon;
 use SL::ReportGenerator;
 
-sub export_as_pdf {
+sub report_generator_export_as_pdf {
   $lxdebug->enter_sub();
 
   if ($form->{report_generator_pdf_options_set}) {
@@ -35,7 +35,7 @@ sub export_as_pdf {
   $lxdebug->leave_sub();
 }
 
-sub export_as_csv {
+sub report_generator_export_as_csv {
   $lxdebug->enter_sub();
 
   if ($form->{report_generator_csv_options_set}) {
@@ -54,6 +54,14 @@ sub export_as_csv {
   $lxdebug->leave_sub();
 }
 
+sub report_generator_back {
+  $lxdebug->enter_sub();
+
+  report_generator_do('HTML');
+
+  $lxdebug->leave_sub();
+}
+
 sub report_generator_do {
   $lxdebug->enter_sub();
 
@@ -77,4 +85,19 @@ sub report_generator_do {
   $lxdebug->leave_sub();
 }
 
+sub report_generator_dispatcher {
+  $lxdebug->enter_sub();
+
+  my $nextsub = $form->{report_generator_dispatch_to};
+  if (!$nextsub) {
+    $form->error($locale->text('report_generator_dispatch_to is not defined.'));
+  }
+
+  delete $form->{report_generator_dispatch_to};
+
+  call_sub($nextsub);
+
+  $lxdebug->leave_sub();
+}
+
 1;
index a3d249f..6a9ac26 100644 (file)
@@ -1318,6 +1318,7 @@ aktualisieren wollen?',
   'purchase_order_list'         => 'lieferantenauftragsliste',
   'quarter'                     => 'Vierteljährliche (quartalsweise) Abgabe',
   'quotation_list'              => 'angebotsliste',
+  'report_generator_dispatch_to is not defined.' => 'report_generator_dispatch_to ist nicht definiert.',
   'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
   'request_quotation'           => 'Angebotsanforderung',
   'reset'                       => 'zurücksetzen',
index dbefb99..671d9c5 100644 (file)
@@ -190,6 +190,7 @@ $self->{texts} = {
   'pick_list'                   => 'Entnahmeliste',
   'proforma'                    => 'Proforma',
   'purchase_order'              => 'Auftrag',
+  'report_generator_dispatch_to is not defined.' => 'report_generator_dispatch_to ist nicht definiert.',
   'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
   'request_quotation'           => 'Angebotsanforderung',
   'sales_order'                 => 'Kundenauftrag',
@@ -224,8 +225,6 @@ $self->{subs} = {
   'draft_action_dispatcher'     => 'draft_action_dispatcher',
   'edit'                        => 'edit',
   'employee_selection_internal' => 'employee_selection_internal',
-  'export_as_csv'               => 'export_as_csv',
-  'export_as_pdf'               => 'export_as_pdf',
   'form_footer'                 => 'form_footer',
   'form_header'                 => 'form_header',
   'format_dates'                => 'format_dates',
@@ -243,7 +242,11 @@ $self->{subs} = {
   'project_selection_internal'  => 'project_selection_internal',
   'reformat_numbers'            => 'reformat_numbers',
   'remove_draft'                => 'remove_draft',
+  'report_generator_back'       => 'report_generator_back',
+  'report_generator_dispatcher' => 'report_generator_dispatcher',
   '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',
   'sales_invoice'               => 'sales_invoice',
   'save_draft'                  => 'save_draft',
   'search'                      => 'search',
@@ -268,8 +271,6 @@ $self->{subs} = {
   'löschen'                     => 'delete',
   'entwürfe_löschen'            => 'delete_drafts',
   'kreditorenbuchung_bearbeiten' => 'edit_accounts_payables_transaction',
-  'als_csv_exportieren'         => 'export_as_csv',
-  'als_pdf_exportieren'         => 'export_as_pdf',
   'buchen'                      => 'post',
   'zahlung_buchen'              => 'post_payment',
   'entwurf_speichern'           => 'save_draft',
index 14dbe45..6d0d1fd 100644 (file)
@@ -195,6 +195,7 @@ $self->{texts} = {
   'pick_list'                   => 'Entnahmeliste',
   'proforma'                    => 'Proforma',
   'purchase_order'              => 'Auftrag',
+  'report_generator_dispatch_to is not defined.' => 'report_generator_dispatch_to ist nicht definiert.',
   'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
   'request_quotation'           => 'Angebotsanforderung',
   'sales_order'                 => 'Kundenauftrag',
@@ -232,8 +233,6 @@ $self->{subs} = {
   'draft_action_dispatcher'     => 'draft_action_dispatcher',
   'edit'                        => 'edit',
   'employee_selection_internal' => 'employee_selection_internal',
-  'export_as_csv'               => 'export_as_csv',
-  'export_as_pdf'               => 'export_as_pdf',
   'form_footer'                 => 'form_footer',
   'form_header'                 => 'form_header',
   'format_dates'                => 'format_dates',
@@ -251,7 +250,11 @@ $self->{subs} = {
   'project_selection_internal'  => 'project_selection_internal',
   'reformat_numbers'            => 'reformat_numbers',
   'remove_draft'                => 'remove_draft',
+  'report_generator_back'       => 'report_generator_back',
+  'report_generator_dispatcher' => 'report_generator_dispatcher',
   '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',
   'sales_invoice'               => 'sales_invoice',
   'save_draft'                  => 'save_draft',
   'search'                      => 'search',
@@ -275,8 +278,6 @@ $self->{subs} = {
   'weiter'                      => 'continue',
   'löschen'                     => 'delete',
   'entwürfe_löschen'            => 'delete_drafts',
-  'als_csv_exportieren'         => 'export_as_csv',
-  'als_pdf_exportieren'         => 'export_as_pdf',
   'buchen'                      => 'post',
   'zahlung_buchen'              => 'post_payment',
   'rechnung'                    => 'sales_invoice',
index d324f3f..bc988ca 100644 (file)
@@ -206,6 +206,7 @@ $self->{texts} = {
   'pick_list'                   => 'Entnahmeliste',
   'proforma'                    => 'Proforma',
   'purchase_order'              => 'Auftrag',
+  'report_generator_dispatch_to is not defined.' => 'report_generator_dispatch_to ist nicht definiert.',
   'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
   'request_quotation'           => 'Angebotsanforderung',
   'sales_order'                 => 'Kundenauftrag',
@@ -239,8 +240,6 @@ $self->{subs} = {
   'edit_config'                 => 'edit_config',
   'edit_e_mail'                 => 'edit_e_mail',
   'employee_selection_internal' => 'employee_selection_internal',
-  'export_as_csv'               => 'export_as_csv',
-  'export_as_pdf'               => 'export_as_pdf',
   'format_dates'                => 'format_dates',
   'gl_transaction'              => 'gl_transaction',
   'invoicetotal'                => 'invoicetotal',
@@ -262,7 +261,11 @@ $self->{subs} = {
   'quotation'                   => 'quotation',
   'reformat_numbers'            => 'reformat_numbers',
   'relink_accounts'             => 'relink_accounts',
+  'report_generator_back'       => 'report_generator_back',
+  'report_generator_dispatcher' => 'report_generator_dispatcher',
   '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',
   'request_for_quotation'       => 'request_for_quotation',
   'sales_invoice'               => 'sales_invoice',
   'save'                        => 'save',
@@ -290,8 +293,6 @@ $self->{subs} = {
   'vendor_invoice'              => 'vendor_invoice',
   'vendor_selection'            => 'vendor_selection',
   'weiter'                      => 'continue',
-  'als_csv_exportieren'         => 'export_as_csv',
-  'als_pdf_exportieren'         => 'export_as_pdf',
   'drucken'                     => 'print',
   'speichern'                   => 'save',
 };
index 349dee8..26fbe48 100644 (file)
@@ -271,6 +271,7 @@ $self->{texts} = {
   'purchase_order'              => 'Auftrag',
   'purchase_order_list'         => 'lieferantenauftragsliste',
   'quotation_list'              => 'angebotsliste',
+  'report_generator_dispatch_to is not defined.' => 'report_generator_dispatch_to ist nicht definiert.',
   'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
   'request_quotation'           => 'Angebotsanforderung',
   'rfq_list'                    => 'anfragenliste',
@@ -317,8 +318,6 @@ $self->{subs} = {
   'edit'                        => 'edit',
   'edit_e_mail'                 => 'edit_e_mail',
   'employee_selection_internal' => 'employee_selection_internal',
-  'export_as_csv'               => 'export_as_csv',
-  'export_as_pdf'               => 'export_as_pdf',
   'form_footer'                 => 'form_footer',
   'form_header'                 => 'form_header',
   'format_dates'                => 'format_dates',
@@ -347,7 +346,11 @@ $self->{subs} = {
   'quotation'                   => 'quotation',
   'reformat_numbers'            => 'reformat_numbers',
   'relink_accounts'             => 'relink_accounts',
+  'report_generator_back'       => 'report_generator_back',
+  'report_generator_dispatcher' => 'report_generator_dispatcher',
   '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',
   'request_for_quotation'       => 'request_for_quotation',
   'sales_invoice'               => 'sales_invoice',
   'sales_order'                 => 'sales_order',
@@ -380,8 +383,6 @@ $self->{subs} = {
   'weiter'                      => 'continue',
   'löschen'                     => 'delete',
   'email'                       => 'e_mail',
-  'als_csv_exportieren'         => 'export_as_csv',
-  'als_pdf_exportieren'         => 'export_as_pdf',
   'rechnung'                    => 'invoice',
   'nein'                        => 'no',
   'auftrag'                     => 'order',
index d76bb03..24ff285 100644 (file)
@@ -1,13 +1,25 @@
 <body>
 
+ <script type="text/javascript">
+  <!--
+      function submit_report_generator_form(nextsub) {
+        document.report_generator_form.report_generator_dispatch_to.value = nextsub;
+        document.report_generator_form.submit();
+      }
+
+    -->
+ </script>
+
  <div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
 
- <form action="<TMPL_VAR script ESCAPE=HTML>" method="post">
+ <form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
 
   <TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
   </TMPL_LOOP>
 
   <input type="hidden" name="report_generator_csv_options_set" value="1">
+  <input type="hidden" name="report_generator_dispatch_to" value="">
+  <input type="hidden" name="action" value="report_generator_dispatcher">
 
   <table>
    <tr>
 
   </table>
 
-  <p><input type="submit" name="action" class="submit" value="Als CSV exportieren"></p>
+  <p>
+   <button type="button" class="submit" onclick="submit_report_generator_form('report_generator_export_as_csv')">Als CSV exportieren</button>
+   <button type="button" class="submit" onclick="submit_report_generator_form('report_generator_back')">Zurück</button>
+  </p>
 
  </form>
 </body>
index 927ef6f..2db96d4 100644 (file)
@@ -1,13 +1,25 @@
 <body>
 
+ <script type="text/javascript">
+  <!--
+      function submit_report_generator_form(nextsub) {
+        document.report_generator_form.report_generator_dispatch_to.value = nextsub;
+        document.report_generator_form.submit();
+      }
+
+    -->
+ </script>
+
  <div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
 
- <form action="<TMPL_VAR script ESCAPE=HTML>" method="post">
+ <form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
 
   <TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
   </TMPL_LOOP>
 
   <input type="hidden" name="report_generator_csv_options_set" value="1">
+  <input type="hidden" name="report_generator_dispatch_to" value="">
+  <input type="hidden" name="action" value="report_generator_dispatcher">
 
   <table>
    <tr>
 
   </table>
 
-  <p><input type="submit" name="action" class="submit" value="<translate>Export as CSV</translate>"></p>
+  <p>
+   <button type="button" class="submit" onclick="submit_report_generator_form('report_generator_export_as_csv')"><translate>Export as CSV</translate></button>
+   <button type="button" class="submit" onclick="submit_report_generator_form('report_generator_back')"><translate>Back</translate></button>
+  </p>
 
  </form>
 </body>
index 99eae37..302aced 100644 (file)
@@ -1,5 +1,15 @@
 <body>
 
+ <script type="text/javascript">
+  <!--
+      function submit_report_generator_form(nextsub) {
+        document.report_generator_form.report_generator_dispatch_to.value = nextsub;
+        document.report_generator_form.submit();
+      }
+
+    -->
+ </script>
+
  <div class="listtop" width="100%"><TMPL_VAR TITLE></div>
 
  <TMPL_IF TOP_INFO_TEXT>
@@ -46,7 +56,7 @@
  </TMPL_IF>
 
  <TMPL_IF SHOW_EXPORT_BUTTONS>
-  <form action="<TMPL_VAR script ESCAPE=HTML>" name="generate_report_form" method="post">
+  <form action="<TMPL_VAR script ESCAPE=HTML>" name="report_generator_form" method="post">
    <input type="hidden" name="login" value="<TMPL_VAR login ESCAPE=HTML>">
    <input type="hidden" name="password" value="<TMPL_VAR password ESCAPE=HTML>">
 
 
    <input type="hidden" name="report_generator_nextsub" value="<TMPL_VAR EXPORT_NEXTSUB ESCAPE=HTML>">
    <input type="hidden" name="report_generator_variable_list" value="<TMPL_VAR EXPORT_VARIABLE_LIST ESCAPE=HTML>">
+   <input type="hidden" name="report_generator_dispatch_to" value="">
+   <input type="hidden" name="action" value="report_generator_dispatcher">
 
    <p>
     Listenexport<br>
-    <TMPL_IF ALLOW_PDF_EXPORT><input type="submit" class="submit" name="action" value="Als PDF exportieren"></TMPL_IF>
-    <TMPL_IF ALLOW_CSV_EXPORT><input type="submit" class="submit" name="action" value="Als CSV exportieren"></TMPL_IF>
+    <TMPL_IF ALLOW_PDF_EXPORT><button type="button" class="submit" onclick="submit_report_generator_form('report_generator_export_as_pdf')">Als PDF exportieren</button></TMPL_IF>
+    <TMPL_IF ALLOW_CSV_EXPORT><button type="button" class="submit" onclick="submit_report_generator_form('report_generator_export_as_csv')">Als CSV exportieren</button></TMPL_IF>
    </p>
   </form>
  </TMPL_IF>
index 8be73af..57876d2 100644 (file)
@@ -1,5 +1,15 @@
 <body>
 
+ <script type="text/javascript">
+  <!--
+      function submit_report_generator_form(nextsub) {
+        document.report_generator_form.report_generator_dispatch_to.value = nextsub;
+        document.report_generator_form.submit();
+      }
+
+    -->
+ </script>
+
  <div class="listtop" width="100%"><TMPL_VAR TITLE></div>
 
  <TMPL_IF TOP_INFO_TEXT>
@@ -46,7 +56,7 @@
  </TMPL_IF>
 
  <TMPL_IF SHOW_EXPORT_BUTTONS>
-  <form action="<TMPL_VAR script ESCAPE=HTML>" name="generate_report_form" method="post">
+  <form action="<TMPL_VAR script ESCAPE=HTML>" name="report_generator_form" method="post">
    <input type="hidden" name="login" value="<TMPL_VAR login ESCAPE=HTML>">
    <input type="hidden" name="password" value="<TMPL_VAR password ESCAPE=HTML>">
 
 
    <input type="hidden" name="report_generator_nextsub" value="<TMPL_VAR EXPORT_NEXTSUB ESCAPE=HTML>">
    <input type="hidden" name="report_generator_variable_list" value="<TMPL_VAR EXPORT_VARIABLE_LIST ESCAPE=HTML>">
+   <input type="hidden" name="report_generator_dispatch_to" value="">
+   <input type="hidden" name="action" value="report_generator_dispatcher">
 
    <p>
     <translate>List export</translate><br>
-    <TMPL_IF ALLOW_PDF_EXPORT><input type="submit" class="submit" name="action" value="<translate>Export as PDF</translate>"></TMPL_IF>
-    <TMPL_IF ALLOW_CSV_EXPORT><input type="submit" class="submit" name="action" value="<translate>Export as CSV</translate>"></TMPL_IF>
+    <TMPL_IF ALLOW_PDF_EXPORT><button type="button" class="submit" onclick="submit_report_generator_form('report_generator_export_as_pdf')"><translate>Export as PDF</translate></button></TMPL_IF>
+    <TMPL_IF ALLOW_CSV_EXPORT><button type="button" class="submit" onclick="submit_report_generator_form('report_generator_export_as_csv')"><translate>Export as CSV</translate></button></TMPL_IF>
    </p>
   </form>
  </TMPL_IF>
index de8e33f..6c30322 100644 (file)
@@ -1,13 +1,25 @@
 <body>
 
+ <script type="text/javascript">
+  <!--
+      function submit_report_generator_form(nextsub) {
+        document.report_generator_form.report_generator_dispatch_to.value = nextsub;
+        document.report_generator_form.submit();
+      }
+
+    -->
+ </script>
+
  <div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
 
- <form action="<TMPL_VAR script ESCAPE=HTML>" method="post">
+ <form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
 
   <TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
   </TMPL_LOOP>
 
   <input type="hidden" name="report_generator_pdf_options_set" value="1">
+  <input type="hidden" name="report_generator_dispatch_to" value="">
+  <input type="hidden" name="action" value="report_generator_dispatcher">
 
   <table>
    <tr>
 
   </table>
 
-  <p><input type="submit" name="action" class="submit" value="Als PDF exportieren"></p>
+  <p>
+   <button type="button" class="submit" onclick="submit_report_generator_form('report_generator_export_as_pdf')">Als PDF exportieren</button>
+   <button type="button" class="submit" onclick="submit_report_generator_form('report_generator_back')">Zurück</button>
+  </p>
 
  </form>
 </body>
index 75bfc56..066e4d7 100644 (file)
@@ -1,13 +1,25 @@
 <body>
 
+ <script type="text/javascript">
+  <!--
+      function submit_report_generator_form(nextsub) {
+        document.report_generator_form.report_generator_dispatch_to.value = nextsub;
+        document.report_generator_form.submit();
+      }
+
+    -->
+ </script>
+
  <div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
 
- <form action="<TMPL_VAR script ESCAPE=HTML>" method="post">
+ <form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
 
   <TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
   </TMPL_LOOP>
 
   <input type="hidden" name="report_generator_pdf_options_set" value="1">
+  <input type="hidden" name="report_generator_dispatch_to" value="">
+  <input type="hidden" name="action" value="report_generator_dispatcher">
 
   <table>
    <tr>
 
   </table>
 
-  <p><input type="submit" name="action" class="submit" value="<translate>Export as PDF</translate>"></p>
+  <p>
+   <button type="button" class="submit" onclick="submit_report_generator_form('report_generator_export_as_pdf')"><translate>Export as PDF</translate></button>
+   <button type="button" class="submit" onclick="submit_report_generator_form('report_generator_back')"><translate>Back</translate></button>
+  </p>
 
  </form>
 </body>