Revision d1bffbc1
Von Bernd Bleßmann vor fast 4 Jahren hinzugefügt
SL/Controller/Letter.pm | ||
---|---|---|
184 | 184 |
sub action_print_letter { |
185 | 185 |
my ($self, %params) = @_; |
186 | 186 |
|
187 |
my $display_form = $::form->{display_form} || "display_form"; |
|
188 |
my $letter = $self->_update; |
|
187 |
my $letter = $self->_update; |
|
189 | 188 |
|
190 | 189 |
my ($template_file, @template_files) = SL::Helper::CreatePDF->find_template( |
191 | 190 |
name => 'letter', |
... | ... | |
512 | 511 |
$letter->greeting(t8('Dear Sir or Madam,')); |
513 | 512 |
} |
514 | 513 |
|
515 |
sub export_letter_to_form { |
|
516 |
my ($self, $letter) = @_; |
|
517 |
# nope, not pretty. |
|
518 |
|
|
519 |
$letter ||= $self->letter; |
|
520 |
|
|
521 |
for ($letter->meta->columns) { |
|
522 |
if ((ref $_) =~ /Date/i) { |
|
523 |
$::form->{$_->name} = $letter->$_->to_kivitendo; |
|
524 |
} else { |
|
525 |
$::form->{$_->name} = $letter->$_; |
|
526 |
} |
|
527 |
} |
|
528 |
} |
|
529 |
|
|
530 | 514 |
sub init_letter { |
531 | 515 |
my ($self) = @_; |
532 | 516 |
|
Auch abrufbar als: Unified diff
S:C:Letter: toten Code entfernt