X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FLetter.pm;h=4cc5b55737dd115c9caac8e1b60c0e8936fa7cf4;hb=a97574b881103cc09a48152a4f29f8a2cc1c38a3;hp=d299eea1e1572753c9112e7b8a0a16556579cdc5;hpb=ac1a9e8e357375b2426041eefee1f555fc5139b5;p=kivitendo-erp.git diff --git a/SL/Controller/Letter.pm b/SL/Controller/Letter.pm index d299eea1e..4cc5b5573 100644 --- a/SL/Controller/Letter.pm +++ b/SL/Controller/Letter.pm @@ -20,6 +20,7 @@ use SL::Helper::PrintOptions; use SL::Locale::String qw(t8); use SL::Mailer; use SL::IS; +use SL::Presenter::Tag qw(select_tag); use SL::ReportGenerator; use SL::Webdav; use SL::Webdav::File; @@ -124,7 +125,7 @@ sub action_update_contacts { $self->js ->replaceWith( '#letter_cp_id', - SL::Presenter->get->select_tag('letter.cp_id', $contacts, default => $default, value_key => 'cp_id', title_key => 'full_name') + select_tag('letter.cp_id', $contacts, default => $default, value_key => 'cp_id', title_key => 'full_name') ) ->render; } @@ -176,7 +177,7 @@ sub action_list { $self->prepare_report; my $letters = $self->models->get; - $self->report_generator_list_objects(report => $self->{report}, objects => $letters, action_bar => 1); + $self->report_generator_list_objects(report => $self->{report}, objects => $letters); } @@ -241,8 +242,8 @@ sub action_print_letter { my $signature = $::myconfig{signature}; $mail->{$_} = $params{email}->{$_} for qw(to cc subject message bcc); $mail->{from} = qq|"$::myconfig{name}" <$::myconfig{email}>|; - $mail->{attachments} = [{ filename => $result{file_name}, - name => $params{email}->{attachment_filename} }]; + $mail->{attachments} = [{ path => $result{file_name}, + name => $params{email}->{attachment_filename} }]; $mail->{message} .= "\n-- \n$signature"; $mail->{message} =~ s/\r//g; @@ -578,7 +579,6 @@ sub init_webdav_objects { number => $self->letter->letternumber, ); - my $webdav_path = $webdav->webdav_path; my @all_objects = $webdav->get_all_objects; return [ map { @@ -655,7 +655,7 @@ sub setup_display_action_bar { action => [ t8('Export') ], action => [ t8('Print'), - submit => [ '#form', { action => 'Letter/print_letter' } ], + call => [ 'kivi.SalesPurchase.show_print_dialog', 'Letter/print_letter' ], disabled => !$self->letter->id ? t8('The object has not been saved yet.') : undef, ], action => [