X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=82f2906a680125ae803d656f68115b55c22d4848;hb=155b8aa4f756d7cd34a2b26a65207cbacce40ec3;hp=012914d036dbc7fd0876a6dbce11050ca7cdf6b8;hpb=cea7e7c53f1005f6143edbddb5832b6c48b5dc8e;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 012914d03..82f2906a6 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -525,7 +525,8 @@ sub form_header { "price_factors" => "ALL_PRICE_FACTORS"); $form->{ALL_PAYMENTS} = SL::DB::Manager::PaymentTerm->get_all( where => [ or => [ obsolete => 0, id => $form->{payment_id} || undef ] ]); - $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all; + $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted; + $form->{ALL_LANGUAGES} = SL::DB::Manager::Language->get_all_sorted; # Projects my @old_project_ids = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"}); @@ -2179,10 +2180,12 @@ sub edit_periodic_invoices_config { }; } # for older configs, replace email preset text if not yet set. - $config->{email_subject} ||= GenericTranslations->get(language_id => $::form->{lanuage_id}, - translation_type =>"preset_text_periodic_invoices_email_subject"); - $config->{email_body} ||= GenericTranslations->get(language_id => $::form->{lanuage_id}, - translation_type =>"preset_text_periodic_invoices_email_body"); + $config->{email_subject} ||= GenericTranslations->get(language_id => $::form->{lanuage_id}, translation_type => "preset_text_periodic_invoices_email_subject"); + $config->{email_body} ||= GenericTranslations->get(language_id => $::form->{lanuage_id}, translation_type => "salutation_general") + . GenericTranslations->get(language_id => $::form->{lanuage_id}, translation_type => "salutation_punctuation_mark") + . "\n\n" + . GenericTranslations->get(language_id => $::form->{lanuage_id}, translation_type => "preset_text_periodic_invoices_email_body"); + $config->{email_body} =~ s{\A[ \n\r]+|[ \n\r]+\Z}{}g; $config->{periodicity} = 'm' if none { $_ eq $config->{periodicity} } @SL::DB::PeriodicInvoicesConfig::PERIODICITIES; $config->{order_value_periodicity} = 'p' if none { $_ eq $config->{order_value_periodicity} } ('p', @SL::DB::PeriodicInvoicesConfig::ORDER_VALUE_PERIODICITIES);