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}) {
$lxdebug->leave_sub();
}
-sub export_as_csv {
+sub report_generator_export_as_csv {
$lxdebug->enter_sub();
if ($form->{report_generator_csv_options_set}) {
$lxdebug->leave_sub();
}
+sub report_generator_back {
+ $lxdebug->enter_sub();
+
+ report_generator_do('HTML');
+
+ $lxdebug->leave_sub();
+}
+
sub report_generator_do {
$lxdebug->enter_sub();
$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;
'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',
'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',
'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',
'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',
'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',
'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',
'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',
'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',
'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',
'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',
'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',
'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',
'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',
};
'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',
'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',
'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',
'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',
<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>
<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>
<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>
</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>
<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>
</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>
<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>
<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>