# 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 {
$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"),
};
}
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);
'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',
[%- ELSE %]
[%- HTML.escape(language.description) %]
[%- END %]
+ [%- IF mail_string.search('preset_text_periodic_invoices') %]
+ <br />
+ <a href="doc/html/ch03.html#features.periodic-invoices.variables" target="_blank">?</a>
+ [%- END %]
</td>
<td>
[%- IF mail_string.search('preset') %]