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