Revision f042650d
Von Jan Büren vor mehr als 4 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
2171 | 2171 |
$config = SL::YAML::Load($::form->{periodic_invoices_config}) if $::form->{periodic_invoices_config}; |
2172 | 2172 |
|
2173 | 2173 |
if ('HASH' ne ref $config) { |
2174 |
my $lang_id = $::form->{language_id}; |
|
2175 | 2174 |
$config = { periodicity => 'm', |
2176 | 2175 |
order_value_periodicity => 'p', # = same as periodicity |
2177 | 2176 |
start_date_as_date => $::form->{transdate} || $::form->current_date, |
2178 | 2177 |
extend_automatically_by => 12, |
2179 | 2178 |
active => 1, |
2180 |
email_subject => GenericTranslations->get(language_id => $lang_id, |
|
2181 |
translation_type =>"preset_text_periodic_invoices_email_subject"), |
|
2182 |
email_body => GenericTranslations->get(language_id => $lang_id, |
|
2183 |
translation_type =>"preset_text_periodic_invoices_email_body"), |
|
2184 | 2179 |
}; |
2185 | 2180 |
} |
2181 |
# for older configs, replace email preset text if not yet set. |
|
2182 |
$config->{email_subject} ||= GenericTranslations->get(language_id => $::form->{lanuage_id}, |
|
2183 |
translation_type =>"preset_text_periodic_invoices_email_subject"); |
|
2184 |
$config->{email_body} ||= GenericTranslations->get(language_id => $::form->{lanuage_id}, |
|
2185 |
translation_type =>"preset_text_periodic_invoices_email_body"); |
|
2186 | 2186 |
|
2187 | 2187 |
$config->{periodicity} = 'm' if none { $_ eq $config->{periodicity} } @SL::DB::PeriodicInvoicesConfig::PERIODICITIES; |
2188 | 2188 |
$config->{order_value_periodicity} = 'p' if none { $_ eq $config->{order_value_periodicity} } ('p', @SL::DB::PeriodicInvoicesConfig::ORDER_VALUE_PERIODICITIES); |
Auch abrufbar als: Unified diff
Wiederkehrende Rechnungen: vorbelegte E-Mail-Texte setzen falls leer
Vorher wurde nur geprüft, ob die Konfiguration schon gesetzt wurde.
Sollte ein Kunde im Nachhinein auf E-Mail-Versand umstelle ist
das Verhalten jetzt komfortabler