From: Moritz Bunkus Date: Tue, 19 Jun 2007 11:07:40 +0000 (+0000) Subject: report_generator.pl in reportgenerator.pl umbenannt. X-Git-Tag: release-2.4.3^2~98 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=18da4a96827fd65559a6f64334c3d8a313884f84;p=kivitendo-erp.git report_generator.pl in reportgenerator.pl umbenannt. --- diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 1919dbdbf..57822abc9 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -42,7 +42,7 @@ use SL::ReportGenerator; require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/drafts.pl"; -require "bin/mozilla/report_generator.pl"; +require "bin/mozilla/reportgenerator.pl"; 1; diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 699cb7dee..f755bbc15 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -47,7 +47,7 @@ our ($cgi, $form, $lxdebug, $locale, %myconfig); require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/drafts.pl"; -require "bin/mozilla/report_generator.pl"; +require "bin/mozilla/reportgenerator.pl"; 1; diff --git a/bin/mozilla/ca.pl b/bin/mozilla/ca.pl index 497ee6157..d2fab4888 100644 --- a/bin/mozilla/ca.pl +++ b/bin/mozilla/ca.pl @@ -37,7 +37,7 @@ use POSIX qw(strftime); use SL::CA; use SL::ReportGenerator; -require "bin/mozilla/report_generator.pl"; +require "bin/mozilla/reportgenerator.pl"; 1; diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index de85948ee..d1dac5e3e 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -39,7 +39,7 @@ use SL::DN; use SL::ReportGenerator; require "bin/mozilla/common.pl"; -require "bin/mozilla/report_generator.pl"; +require "bin/mozilla/reportgenerator.pl"; require "bin/mozilla/io.pl"; require "bin/mozilla/arap.pl"; diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index b90f29c14..5069cefa7 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -40,7 +40,7 @@ use SL::ReportGenerator; require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; -require "bin/mozilla/report_generator.pl"; +require "bin/mozilla/reportgenerator.pl"; 1; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 52463623e..0388aa032 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -41,7 +41,7 @@ use SL::ReportGenerator; require "bin/mozilla/io.pl"; require "bin/mozilla/arap.pl"; -require "bin/mozilla/report_generator.pl"; +require "bin/mozilla/reportgenerator.pl"; 1; diff --git a/bin/mozilla/report_generator.pl b/bin/mozilla/report_generator.pl deleted file mode 100644 index 112116d69..000000000 --- a/bin/mozilla/report_generator.pl +++ /dev/null @@ -1,121 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2004 -# Based on SQL-Ledger Version 2.1.9 -# Web http://www.lx-office.org -###################################################################### -# -# Stuff that can be used from other modules -# -###################################################################### - -use List::Util qw(max); - -use SL::Form; -use SL::Common; -use SL::MoreCommon; -use SL::ReportGenerator; - -sub report_generator_export_as_pdf { - $lxdebug->enter_sub(); - - if ($form->{report_generator_pdf_options_set}) { - my $saved_form = save_form(); - - report_generator_do('PDF'); - - if ($form->{report_generator_printed}) { - restore_form($saved_form); - $form->{MESSAGE} = $locale->text('The list has been printed.'); - report_generator_do('HTML'); - } - - $lxdebug->leave_sub(); - return; - } - - my @form_values; - map { push @form_values, { 'key' => $_, 'value' => $form->{$_} } } keys %{ $form }; - - $form->get_lists('printers' => 'ALL_PRINTERS'); - map { $_->{selected} = $myconfig{default_printer_id} == $_->{id} } @{ $form->{ALL_PRINTERS} }; - - $form->{copies} = max $myconfig{copies} * 1, 1; - - $form->{title} = $locale->text('PDF export -- options'); - $form->header(); - print $form->parse_html_template('report_generator/pdf_export_options', - { 'HIDDEN' => \@form_values, - 'default_margin' => $form->format_amount(\%myconfig, 1.5), - 'SHOW_PRINTERS' => scalar @{ $form->{ALL_PRINTERS} }, - }); - - $lxdebug->leave_sub(); -} - -sub report_generator_export_as_csv { - $lxdebug->enter_sub(); - - if ($form->{report_generator_csv_options_set}) { - report_generator_do('CSV'); - $lxdebug->leave_sub(); - return; - } - - my @form_values; - map { push @form_values, { 'key' => $_, 'value' => $form->{$_} } } keys %{ $form }; - - $form->{title} = $locale->text('CSV export -- options'); - $form->header(); - print $form->parse_html_template('report_generator/csv_export_options', { 'HIDDEN' => \@form_values }); - - $lxdebug->leave_sub(); -} - -sub report_generator_back { - $lxdebug->enter_sub(); - - report_generator_do('HTML'); - - $lxdebug->leave_sub(); -} - -sub report_generator_do { - $lxdebug->enter_sub(); - - my $format = shift; - - my $nextsub = $form->{report_generator_nextsub}; - if (!$nextsub) { - $form->error($locale->text('report_generator_nextsub is not defined.')); - } - - foreach my $key (split m/ +/, $form->{report_generator_variable_list}) { - $form->{$key} = $form->{"report_generator_hidden_${key}"}; - } - - $form->{report_generator_output_format} = $format; - - delete @{$form}{map { "report_generator_$_" } qw(nextsub variable_list)}; - - call_sub($nextsub); - - $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; diff --git a/bin/mozilla/reportgenerator.pl b/bin/mozilla/reportgenerator.pl new file mode 100644 index 000000000..112116d69 --- /dev/null +++ b/bin/mozilla/reportgenerator.pl @@ -0,0 +1,121 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2004 +# Based on SQL-Ledger Version 2.1.9 +# Web http://www.lx-office.org +###################################################################### +# +# Stuff that can be used from other modules +# +###################################################################### + +use List::Util qw(max); + +use SL::Form; +use SL::Common; +use SL::MoreCommon; +use SL::ReportGenerator; + +sub report_generator_export_as_pdf { + $lxdebug->enter_sub(); + + if ($form->{report_generator_pdf_options_set}) { + my $saved_form = save_form(); + + report_generator_do('PDF'); + + if ($form->{report_generator_printed}) { + restore_form($saved_form); + $form->{MESSAGE} = $locale->text('The list has been printed.'); + report_generator_do('HTML'); + } + + $lxdebug->leave_sub(); + return; + } + + my @form_values; + map { push @form_values, { 'key' => $_, 'value' => $form->{$_} } } keys %{ $form }; + + $form->get_lists('printers' => 'ALL_PRINTERS'); + map { $_->{selected} = $myconfig{default_printer_id} == $_->{id} } @{ $form->{ALL_PRINTERS} }; + + $form->{copies} = max $myconfig{copies} * 1, 1; + + $form->{title} = $locale->text('PDF export -- options'); + $form->header(); + print $form->parse_html_template('report_generator/pdf_export_options', + { 'HIDDEN' => \@form_values, + 'default_margin' => $form->format_amount(\%myconfig, 1.5), + 'SHOW_PRINTERS' => scalar @{ $form->{ALL_PRINTERS} }, + }); + + $lxdebug->leave_sub(); +} + +sub report_generator_export_as_csv { + $lxdebug->enter_sub(); + + if ($form->{report_generator_csv_options_set}) { + report_generator_do('CSV'); + $lxdebug->leave_sub(); + return; + } + + my @form_values; + map { push @form_values, { 'key' => $_, 'value' => $form->{$_} } } keys %{ $form }; + + $form->{title} = $locale->text('CSV export -- options'); + $form->header(); + print $form->parse_html_template('report_generator/csv_export_options', { 'HIDDEN' => \@form_values }); + + $lxdebug->leave_sub(); +} + +sub report_generator_back { + $lxdebug->enter_sub(); + + report_generator_do('HTML'); + + $lxdebug->leave_sub(); +} + +sub report_generator_do { + $lxdebug->enter_sub(); + + my $format = shift; + + my $nextsub = $form->{report_generator_nextsub}; + if (!$nextsub) { + $form->error($locale->text('report_generator_nextsub is not defined.')); + } + + foreach my $key (split m/ +/, $form->{report_generator_variable_list}) { + $form->{$key} = $form->{"report_generator_hidden_${key}"}; + } + + $form->{report_generator_output_format} = $format; + + delete @{$form}{map { "report_generator_$_" } qw(nextsub variable_list)}; + + call_sub($nextsub); + + $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; diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 2a6321422..67ad8a5e3 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -45,7 +45,7 @@ use SL::ReportGenerator; require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; -require "bin/mozilla/report_generator.pl"; +require "bin/mozilla/reportgenerator.pl"; 1; diff --git a/locale/de/all b/locale/de/all index d19fcd7ff..f09e9e3f1 100644 --- a/locale/de/all +++ b/locale/de/all @@ -665,7 +665,6 @@ aktualisieren wollen?', 'List Pricegroups' => 'Preisgruppen anzeigen', 'List Printer' => 'Drucker anzeigen', 'List Transactions' => 'Buchungsliste', - 'List export' => 'Listenexport', 'Load draft' => 'Entwurf laden', 'Local Tax Office Preferences' => 'Angaben zum Finanzamt', 'Lock System' => 'System sperren', diff --git a/locale/de/reportgenerator b/locale/de/reportgenerator new file mode 100644 index 000000000..dcaf27760 --- /dev/null +++ b/locale/de/reportgenerator @@ -0,0 +1,64 @@ +$self->{texts} = { + 'ADDED' => 'Hinzugefügt', + 'Bin List' => 'Lagerliste', + 'CANCELED' => 'Storniert', + 'CSV export -- options' => 'CSV-Export -- Optionen', + 'Confirmation' => 'Auftragsbestätigung', + 'Could not spawn html2ps or GhostScript.' => 'html2ps oder GhostScript konnte nicht gestartet werden.', + 'Could not spawn the printer command.' => 'Die Druckanwendung konnte nicht gestartet werden.', + 'Could not write the html2ps config file.' => 'Die temporäre html2ps-Konfigurationsdatei konnte nicht geschrieben werden.', + 'Could not write the temporary HTML file.' => 'Eine temporäre HTML-Datei konnte nicht geschrieben werden.', + 'Credit Note' => 'Gutschrift', + 'DELETED' => 'Gelöscht', + 'DUNNING STARTED' => 'Mahnprozess gestartet', + 'Dataset upgrade' => 'Datenbankaktualisierung', + 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', + 'ELSE' => 'Zusatz', + 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Invoice' => 'Rechnung', + 'MAILED' => 'Gesendet', + 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', + 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', + 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', + 'PAYMENT POSTED' => 'Rechung gebucht', + 'PDF export -- options' => 'PDF-Export -- Optionen', + 'POSTED' => 'Gebucht', + 'POSTED AS NEW' => 'Als neu gebucht', + 'PRINTED' => 'Gedruckt', + 'Packing List' => 'Lieferschein', + 'Pick List' => 'Sammelliste', + 'Proforma Invoice' => 'Proformarechnung', + 'Purchase Order' => 'Lieferantenauftrag', + 'Quotation' => 'Angebot', + 'RFQ' => 'Anfrage', + 'SAVED' => 'Gespeichert', + 'SAVED FOR DUNNING' => 'Gespeichert', + 'SCREENED' => 'Angezeigt', + 'Storno Invoice' => 'Stornorechnung', + 'Storno Packing List' => 'Stornolieferschein', + 'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.', + 'The list has been printed.' => 'Die Liste wurde ausgedruckt.', + 'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.', + 'bin_list' => 'Lagerliste', + 'invoice' => 'Rechnung', + 'packing_list' => 'Versandliste', + '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', + 'sales_quotation' => 'Verkaufsangebot', +}; + +$self->{subs} = { + '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', + 'weiter' => 'continue', +}; + +1;