Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6d7fc901

Von Tamino Steinert vor 7 Monaten hinzugefügt

  • ID 6d7fc90169c0a2b6c8ca19b4896cd12af1d744d3
  • Vorgänger e3c3f316
  • Nachfolger 1e228b7c

EmailJournal: Workflow angepasst

Unterschiede anzeigen:

SL/DB/EmailJournal.pm
2 2

  
3 3
use strict;
4 4

  
5
use Carp qw(croak);
6
use List::Util qw(first);
7

  
5 8
use SL::Webdav;
6 9
use SL::File;
7 10

  
......
33 36
  return $result || ($self->id <=> $other->id);
34 37
}
35 38

  
39
sub link_to_record_with_attachment {
40
  my ($self, $record, $attachment_or_id) = @_;
41

  
42
  if ($attachment_or_id ne '') {
43
    my $attachment = ref $attachment_or_id ?
44
        $attachment_or_id
45
      : first {$_->id == $attachment_or_id} @{$self->attachments_sorted};
46
    croak "Email journal attachment does not belong to this email journal"
47
      unless  $attachment && $attachment->email_journal_id == $self->id;
48
    $attachment->add_file_to_record($record);
49
  }
50

  
51
  $self->link_to_record($record);
52
}
53

  
36 54
sub process_attachments_as_purchase_invoices {
37 55
  my ($self) = @_;
38 56

  

Auch abrufbar als: Unified diff