Revision 034cbfaa
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
| SL/DB/EmailJournal.pm | ||
|---|---|---|
|
|
||
|
use strict;
|
||
|
|
||
|
use Carp qw(croak);
|
||
|
use List::Util qw(first);
|
||
|
|
||
|
use SL::Webdav;
|
||
|
use SL::File;
|
||
|
|
||
| ... | ... | |
|
return $result || ($self->id <=> $other->id);
|
||
|
}
|
||
|
|
||
|
sub link_to_record_with_attachment {
|
||
|
my ($self, $record, $attachment_or_id) = @_;
|
||
|
|
||
|
if ($attachment_or_id ne '') {
|
||
|
my $attachment = ref $attachment_or_id ?
|
||
|
$attachment_or_id
|
||
|
: first {$_->id == $attachment_or_id} @{$self->attachments_sorted};
|
||
|
croak "Email journal attachment does not belong to this email journal"
|
||
|
unless $attachment && $attachment->email_journal_id == $self->id;
|
||
|
$attachment->add_file_to_record($record);
|
||
|
}
|
||
|
|
||
|
$self->link_to_record($record);
|
||
|
}
|
||
|
|
||
|
sub process_attachments_as_purchase_invoices {
|
||
|
my ($self) = @_;
|
||
|
|
||
Auch abrufbar als: Unified diff
EmailJournal: Workflow angepasst