From ee8cd38f439e1c8136fe7c1cbb31c5852d1cfd49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Thu, 5 Oct 2017 15:09:03 +0200 Subject: [PATCH] =?utf8?q?Vorbelegte=20E-Mail-Texte=20um=20Vorbelegung=20p?= =?utf8?q?eriodic=20invoices=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/generictranslations.pl | 22 ++++++++++--------- bin/mozilla/oe.pl | 5 +++++ js/edit_periodic_invoices_config.js | 6 +++-- locale/de/all | 2 ++ .../edit_email_strings.html | 4 ++++ 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/bin/mozilla/generictranslations.pl b/bin/mozilla/generictranslations.pl index d3341f212..0261ef1b1 100644 --- a/bin/mozilla/generictranslations.pl +++ b/bin/mozilla/generictranslations.pl @@ -10,16 +10,18 @@ use strict; # and will be preset in $form email dialog if the form name matches my %mail_strings = ( - salutation_male => t8('Salutation male'), - salutation_female => t8('Salutation female'), - salutation_general => t8('Salutation general'), - salutation_punctuation_mark => t8('Salutation punctuation mark'), - preset_text_sales_quotation => t8('Preset email text for sales quotations'), - preset_text_sales_order => t8('Preset email text for sales orders'), - preset_text_sales_delivery_order => t8('Preset email text for sales delivery orders'), - preset_text_invoice => t8('Preset email text for sales invoices'), - preset_text_request_quotation => t8('Preset email text for requests (rfq)'), - preset_text_purchase_order => t8('Preset email text for purchase orders'), + salutation_male => t8('Salutation male'), + salutation_female => t8('Salutation female'), + salutation_general => t8('Salutation general'), + salutation_punctuation_mark => t8('Salutation punctuation mark'), + preset_text_sales_quotation => t8('Preset email text for sales quotations'), + preset_text_sales_order => t8('Preset email text for sales orders'), + preset_text_sales_delivery_order => t8('Preset email text for sales delivery orders'), + preset_text_invoice => t8('Preset email text for sales invoices'), + preset_text_request_quotation => t8('Preset email text for requests (rfq)'), + preset_text_purchase_order => t8('Preset email text for purchase orders'), + preset_text_periodic_invoices_email_body => t8('Preset email body for periodic invoices'), + preset_text_periodic_invoices_email_subject => t8('Preset email subject for periodic invoices'), ); sub edit_greetings { diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 3b5bcd043..ce18a327a 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -2117,11 +2117,16 @@ sub edit_periodic_invoices_config { $config = YAML::Load($::form->{periodic_invoices_config}) if $::form->{periodic_invoices_config}; if ('HASH' ne ref $config) { + my $lang_id = $::form->{language_id}; $config = { periodicity => 'm', order_value_periodicity => 'p', # = same as periodicity start_date_as_date => $::form->{transdate} || $::form->current_date, extend_automatically_by => 12, active => 1, + email_subject => GenericTranslations->get(language_id => $lang_id, + translation_type =>"preset_text_periodic_invoices_email_subject"), + email_body => GenericTranslations->get(language_id => $lang_id, + translation_type =>"preset_text_periodic_invoices_email_body"), }; } diff --git a/js/edit_periodic_invoices_config.js b/js/edit_periodic_invoices_config.js index 775f58418..263b2faf2 100644 --- a/js/edit_periodic_invoices_config.js +++ b/js/edit_periodic_invoices_config.js @@ -6,11 +6,13 @@ function edit_periodic_invoices_config() { var config = $('#periodic_invoices_config').val(); var cus_id = $('[name=customer_id]').val(); var transdate = $('#transdate').val(); + var lang_id = $('#language_id').val(); var url = "oe.pl?" + "action=edit_periodic_invoices_config&" + - "customer_id=" + encodeURIComponent(cus_id) + "&" + - "periodic_invoices_config=" + encodeURIComponent(config) + "&" + + "customer_id=" + encodeURIComponent(cus_id) + "&" + + "language_id=" + encodeURIComponent(lang_id) + "&" + + "periodic_invoices_config=" + encodeURIComponent(config) + "&" + "transdate=" + encodeURIComponent(transdate || ''); // alert(url); diff --git a/locale/de/all b/locale/de/all index c9482c266..847135311 100755 --- a/locale/de/all +++ b/locale/de/all @@ -2277,7 +2277,9 @@ $self->{texts} = { 'Prepare bank collection via SEPA XML' => 'Einzug via SEPA XML vorbereiten', 'Prepare bank transfer via SEPA XML' => 'Überweisung via SEPA XML vorbereiten', 'Prepayment' => 'Vorauszahlung', + 'Preset email body for periodic invoices' => 'Vorbelegter E-Mail-Text für wiederkehrende Rechnungen', 'Preset email strings' => 'Vorbelegte E-Mail-Texte', + 'Preset email subject for periodic invoices' => 'Vorbelegter E-Mail-Betreff für wiederkehrende Rechnungen', 'Preset email text for purchase orders' => 'Vorbelegter E-Mail-Text für Einkaufsaufträge', 'Preset email text for requests (rfq)' => 'Vorbelegter E-Mail-Text für Anfragen', 'Preset email text for sales delivery orders' => 'Vorbelegter E-Mail-Text für Verkaufs-Lieferscheine', diff --git a/templates/webpages/generictranslations/edit_email_strings.html b/templates/webpages/generictranslations/edit_email_strings.html index c24a8c831..2db858dad 100644 --- a/templates/webpages/generictranslations/edit_email_strings.html +++ b/templates/webpages/generictranslations/edit_email_strings.html @@ -22,6 +22,10 @@ [%- ELSE %] [%- HTML.escape(language.description) %] [%- END %] + [%- IF mail_string.search('preset_text_periodic_invoices') %] +
+ ? + [%- END %] [%- IF mail_string.search('preset') %] -- 2.20.1