projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8864a76
)
belege email dialog: Ohne Ansprechpartner Email aus Stammdaten verwenden
author
Sven Schöling
<s.schoeling@linet-services.de>
Wed, 12 Jul 2017 10:44:56 +0000
(12:44 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Wed, 12 Jul 2017 10:44:56 +0000
(12:44 +0200)
behebt #263
bin/mozilla/io.pl
patch
|
blob
|
history
diff --git
a/bin/mozilla/io.pl
b/bin/mozilla/io.pl
index
9f49b73
..
28cfc80
100644
(file)
--- a/
bin/mozilla/io.pl
+++ b/
bin/mozilla/io.pl
@@
-1983,9
+1983,16
@@
sub _get_files_for_email_dialog {
}
sub show_sales_purchase_email_dialog {
}
sub show_sales_purchase_email_dialog {
- my $contact = $::form->{cp_id} ? SL::DB::Contact->load_cached($::form->{cp_id}) : undef;
+ my $email = '';
+ if ($::form->{cp_id}) {
+ $email = SL::DB::Contact->load_cached($::form->{cp_id})->cp_email;
+ } elsif ($::form->{vc} && $::form->{vc_id}) {
+ $email = SL::DB::Customer->load_cached($::form->{vc_id})->email if 'customer' eq $::form->{vc};
+ $email = SL::DB::Vendor ->load_cached($::form->{vc_id})->email if 'vendor' eq $::form->{vc};
+ }
+
my $email_form = {
my $email_form = {
- to => $
contact ? $contact->cp_email : ''
,
+ to => $
email
,
subject => $::form->generate_email_subject,
attachment_filename => $::form->generate_attachment_filename,
};
subject => $::form->generate_email_subject,
attachment_filename => $::form->generate_attachment_filename,
};