From: Jan Büren Date: Thu, 20 Sep 2018 14:07:05 +0000 (+0200) Subject: Rechnungsadresse aus den Stammdaten bei periodischen Rechnungen verwenden (Anzeige... X-Git-Tag: release-3.5.4~176 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bcc996e65643;p=kivitendo-erp.git Rechnungsadresse aus den Stammdaten bei periodischen Rechnungen verwenden (Anzeige beim Editieren) --- diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 48f41b48c..03cbdf51c 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -376,7 +376,9 @@ sub _email_invoice { grep { $_ } map { trim($_) } (split(m{,}, $data->{config}->email_recipient_address), - $data->{config}->email_recipient_contact ? ($data->{config}->email_recipient_contact->cp_email) : ()); + $data->{config}->email_recipient_contact ? ($data->{config}->email_recipient_contact->cp_email) : (), + $data->{invoice}->{customer}->invoice_mail ? ($data->{invoice}->{customer}->invoice_mail) : () + ); return unless @recipients; diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index b57d772c0..10c7dd484 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -509,6 +509,7 @@ sub action_show_periodic_invoices_config_dialog { if ($::form->{customer_id}) { $::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all_sorted(where => [ cp_cv_id => $::form->{customer_id} ]); + $::form->{email_recipient_invoice_address} = SL::DB::Manager::Customer->find_by(id => $::form->{customer_id})->invoice_mail; } $self->render('oe/edit_periodic_invoices_config', { layout => 0 },