From: Moritz Bunkus Date: Wed, 9 Feb 2011 12:58:23 +0000 (+0100) Subject: Merge branch 'after-262' X-Git-Tag: release-2.6.3~61^2~9^2~3 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/3a94f4d2dd9a835d4a7007e1b999ea00b3c4e1cd?ds=inline;hp=--cc Merge branch 'after-262' Conflicts: scripts/dbupgrade2_tool.pl --- 3a94f4d2dd9a835d4a7007e1b999ea00b3c4e1cd diff --cc DEBIAN/DEBIAN/postinst index b0a525cf0,02f5ac927..97acf8a28 --- a/DEBIAN/DEBIAN/postinst +++ b/DEBIAN/DEBIAN/postinst @@@ -176,22 -170,14 +170,22 @@@ mk_links() ln -s /etc/lx-office-erp/lx-office-erp.cherokee /etc/cherokee/sites-available/lx-office-erp.cherokee fi; fi; + if [ -e /etc/lighttpd ] ; then + if ! [ -f /etc/lighttpd/conf-enabled/lx-office-erp.lighttpd ] ; then + ln -s /etc/lx-office-erp/lx-office-erp.lighttpd /etc/lighttpf/conf-enabled/10-lx-office-erp + fi; + fi; } reload_web_server() { - if [ -f /etc/init.d/apache* ] ; then + if [ -f /etc/init.d/apache* ] ; then /etc/init.d/apache* reload fi - if [ -f /etc/init.d/cherokee ] ; then + if [ -f /etc/init.d/cherokee ] ; then /etc/init.d/cherokee reload fi + if [ -f /etc/init.d/lighttpd ] ; then + /etc/init.d/lighttpd reload + fi } case "$1" in diff --cc bin/mozilla/oe.pl index beaf99134,caf6749c1..97cc38896 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@@ -1940,11 -1956,76 +1956,74 @@@ sub report_for_todo_list return $content; } + sub edit_periodic_invoices_config { + $::lxdebug->enter_sub(); + + $::form->{type} = 'sales_order'; + + check_oe_access(); + + my $config; + $config = YAML::Load($::form->{periodic_invoices_config}) if $::form->{periodic_invoices_config}; + + if ('HASH' ne ref $config) { + $config = { periodicity => 'y', + start_date_as_date => $::form->{transdate}, + extend_automatically_by => 12, + active => 1, + }; + } + + $config->{periodicity} = 'm' if none { $_ eq $config->{periodicity} } qw(m q y); + + $::form->get_lists(printers => "ALL_PRINTERS", + charts => { key => 'ALL_CHARTS', + transdate => 'current_date' }); + + $::form->{AR} = [ grep { $_->{link} =~ m/(?:^|:)AR(?::|$)/ } @{ $::form->{ALL_CHARTS} } ]; + $::form->{title} = $::locale->text('Edit the configuration for periodic invoices'); + + $::form->header(); + print $::form->parse_html_template('oe/edit_periodic_invoices_config', $config); + + $::lxdebug->leave_sub(); + } + + sub save_periodic_invoices_config { + $::lxdebug->enter_sub(); + + $::form->{type} = 'sales_order'; + + check_oe_access(); + + $::form->isblank('start_date_as_date', $::locale->text('The start date is missing.')); + + my $config = { active => $::form->{active} ? 1 : 0, + terminated => $::form->{terminated} ? 1 : 0, + periodicity => (any { $_ eq $::form->{periodicity} } qw(m q y)) ? $::form->{periodicity} : 'm', + start_date_as_date => $::form->{start_date_as_date}, + end_date_as_date => $::form->{end_date_as_date}, + print => $::form->{print} ? 1 : 0, + printer_id => $::form->{print} ? $::form->{printer_id} * 1 : undef, + copies => $::form->{copies} * 1 ? $::form->{copies} : 1, + extend_automatically_by => $::form->{extend_automatically_by} * 1 || undef, + ar_chart_id => $::form->{ar_chart_id} * 1, + }; + + $::form->{periodic_invoices_config} = YAML::Dump($config); + + $::form->{title} = $::locale->text('Edit the configuration for periodic invoices'); + $::form->header; + print $::form->parse_html_template('oe/save_periodic_invoices_config', $config); + + $::lxdebug->leave_sub(); + } + sub dispatcher { - my $form = $main::form; - my $locale = $main::locale; - foreach my $action (qw(delete delivery_order e_mail invoice print purchase_order purchase_order quotation request_for_quotation sales_order sales_order save save_and_close save_as_new ship_to update)) { - if ($form->{"action_${action}"}) { + if ($::form->{"action_${action}"}) { + $::form->{dispatched_action} = $action; call_sub($action); return; } diff --cc locale/de_DE/all index 11d7d4169,c6a530e70..5cdbecb64 --- a/locale/de_DE/all +++ b/locale/de_DE/all @@@ -1682,9 -1702,11 +1703,11 @@@ $self->{texts} = 'The selected bin does not exist.' => 'Der ausgewählte Lagerplatz existiert nicht.', 'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.', 'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.', - 'The selected warehouse is empty.' => 'Das ausgewählte Lager ist leer.', + 'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => 'Das ausgewählte Lager ist leer, oder die Suche ergab keine Übereinstimmungen.', 'The session is invalid or has expired.' => 'Sie sind von Lx-Office abgemeldet.', + 'The settings were saved, but the password was not changed.' => '', 'The source warehouse does not contain any bins.' => 'Das Quelllager enthält keine Lagerplätze.', + 'The start date is missing.' => '', 'The subject is missing.' => 'Der Betreff fehlt.', 'The tables for user management and authentication do not exist. They will be created in the next step in the following database:' => 'Die Tabellen zum Speichern der Benutzerdaten und zur Benutzerauthentifizierung wurden nicht gefunden. Sie werden in der folgenden Datenbank angelegt:', 'The tabulator character' => 'Das Tabulator-Symbol', diff --cc scripts/dbupgrade2_tool.pl index fec77ab29,a9054aaff..97e8e3f77 --- a/scripts/dbupgrade2_tool.pl +++ b/scripts/dbupgrade2_tool.pl @@@ -358,11 -359,8 +361,8 @@@ sub build_upgrade_order ####### ####### - eval { require "config/lx-erp.conf"; }; - eval { require "config/lx-erp-local.conf"; } if (-f "config/lx-erp-local.conf"); - - $locale = Locale->new($::language); --$form = Form->new(); -$locale = Locale->new("de"); ++$locale = Locale->new; ++$form = Form->new; ####### #######