X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=SL%2FController%2FLetter.pm;fp=SL%2FController%2FLetter.pm;h=4faf452cf60248f4d1232f4dc0769e0ace1cab45;hp=4da3e1918dfac81e6020a27ea78c63b0e8503bb8;hb=b293ff8ad52fc76ba0c44783e3982418114d6b08;hpb=d4925a8b60f04674885e30d9316dc0263f8b9a84 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, ], ],