Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9e22970b

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID 9e22970b0d2170ad2819a2f0d0fd14de42d41e0f
  • Vorgänger 84ae013c
  • Nachfolger d2a38472

Workflow: E-Mail → Reklamation hinzugefügt

Unterschiede anzeigen:

SL/Controller/Reclamation.pm
25 25
use SL::DB::Shipto;
26 26
use SL::DB::Translation;
27 27
use SL::DB::ValidityToken;
28
use SL::DB::EmailJournal;
28 29
use SL::DB::Helper::RecordLink qw(RECORD_ID RECORD_TYPE_REF RECORD_ITEM_ID RECORD_ITEM_TYPE_REF);
29 30
use SL::DB::Helper::TypeDataProxy;
30 31
use SL::DB::Helper::Record qw(get_object_name_from_type get_class_from_type);
......
149 150
  );
150 151
}
151 152

  
153
sub action_add_from_email_journal {
154
  my ($self) = @_;
155
  die "No 'email_journal_id' was given." unless ($::form->{email_journal_id});
156

  
157
  $self->action_add();
158
}
159

  
160
sub action_edit_with_email_journal_workflow {
161
  my ($self) = @_;
162
  die "No 'email_journal_id' was given." unless ($::form->{email_journal_id});
163
  $::form->{workflow_email_journal_id}    = delete $::form->{email_journal_id};
164
  $::form->{workflow_email_attachment_id} = delete $::form->{email_attachment_id};
165

  
166
  $self->action_edit();
167
}
168

  
152 169
# edit an existing reclamation
153 170
sub action_edit {
154 171
  my ($self) = @_;
......
521 538
    type       => $to_type,
522 539
    from_id    => $self->reclamation->id,
523 540
    from_type  => $self->reclamation->type,
541
    email_journal_id    => $::form->{workflow_email_journal_id},
542
    email_attachment_id => $::form->{workflow_email_attachment_id},
524 543
    %additional_params,
525 544
  );
526 545
}
......
543 562
    controller => 'is.pl',
544 563
    action     => 'credit_note_from_reclamation',
545 564
    from_id    => $self->reclamation->id,
565
    email_journal_id    => $::form->{workflow_email_journal_id},
566
    email_attachment_id => $::form->{workflow_email_attachment_id},
546 567
  );
547 568
}
548 569

  
......
1551 1572
                          items_to_delete      => $items_to_delete,
1552 1573
  );
1553 1574

  
1575
  if ($::form->{email_journal_id}) {
1576
    my $email_journal = SL::DB::EmailJournal->new(
1577
      id => delete $::form->{email_journal_id}
1578
    )->load;
1579
    $email_journal->link_to_record_with_attachment(
1580
      $self->reclamation,
1581
      delete $::form->{email_attachment_id}
1582
    );
1583
  }
1584

  
1554 1585
  delete $::form->{form_validity_token};
1555 1586
}
1556 1587

  

Auch abrufbar als: Unified diff