From 6750c6aa43a1b16a28358db7fc87b997a6e43f55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 4 Feb 2019 14:04:29 +0100 Subject: [PATCH] Rechnungsversand E-Mail-Body Falls die generische E-Mail-Adresse verwendet wird, sollte auch die generische Anrede hinterlegt sein, selbst wenn ein Ansprechpartner noch in CC gesetzt wird. --- SL/Form.pm | 4 ++-- bin/mozilla/io.pl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index da4684358..d4b39f6c1 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1344,7 +1344,7 @@ sub generate_email_subject { sub generate_email_body { $main::lxdebug->enter_sub(); - my ($self) = @_; + my ($self, %params) = @_; # simple german and english will work grammatically (most european languages as well) # Dear Mr Alan Greenspan: # Sehr geehrte Frau Meyer, @@ -1352,7 +1352,7 @@ sub generate_email_body { # Gentile Signora Ferrari, my $body = ''; - if ($self->{cp_id}) { + if ($self->{cp_id} && !$params{inv_email}) { my $givenname = SL::DB::Contact->load_cached($self->{cp_id})->cp_givenname; # for qw(gender givename name); my $name = SL::DB::Contact->load_cached($self->{cp_id})->cp_name; # for qw(gender givename name); my $gender = SL::DB::Contact->load_cached($self->{cp_id})->cp_gender; # for qw(gender givename name); diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 8f2a3156e..a4a416b95 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -2046,7 +2046,7 @@ sub show_sales_purchase_email_dialog { to => $email, cc => $email_cc, subject => $::form->generate_email_subject, - message => $::form->generate_email_body, + message => $::form->generate_email_body('inv_email' => $inv_email), attachment_filename => $::form->generate_attachment_filename, js_send_function => 'kivi.SalesPurchase.send_email()', }; -- 2.20.1