X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/d4925a8b60f04674885e30d9316dc0263f8b9a84..b293ff8ad52fc76ba0c44783e3982418114d6b08:/SL/Controller/Letter.pm diff --git a/SL/Controller/Letter.pm b/SL/Controller/Letter.pm index 4da3e1918..4faf452cf 100644 --- a/SL/Controller/Letter.pm +++ b/SL/Controller/Letter.pm @@ -620,6 +620,8 @@ sub setup_load_letter_draft_action_bar { sub setup_display_action_bar { my ($self, %params) = @_; + my $vc = $self->is_sales ? 'customer' : 'vendor'; # needed for show_email_dialog + for my $bar ($::request->layout->get('actionbar')) { $bar->add( action => [ @@ -655,7 +657,7 @@ sub setup_display_action_bar { ], action => [ t8('E-mail'), - call => [ 'kivi.SalesPurchase.show_email_dialog', 'Letter/send_email' ], + call => [ 'kivi.SalesPurchase.show_email_dialog', 'Letter/send_email', $vc, '#letter_' . $vc . '_id' ], disabled => !$self->letter->id ? t8('The object has not been saved yet.') : undef, ], ],