Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c77c1c71

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID c77c1c7174f3017732f68afe06a65811d4f87639
  • Vorgänger 91fc0b6e
  • Nachfolger ca2505b9

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(set_record_link_conversions 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

  
......
1584 1605
                          items_to_delete      => $items_to_delete,
1585 1606
  );
1586 1607

  
1608
  if ($::form->{email_journal_id}) {
1609
    my $email_journal = SL::DB::EmailJournal->new(
1610
      id => delete $::form->{email_journal_id}
1611
    )->load;
1612
    $email_journal->link_to_record_with_attachment(
1613
      $self->reclamation,
1614
      delete $::form->{email_attachment_id}
1615
    );
1616
  }
1617

  
1587 1618
  delete $::form->{form_validity_token};
1588 1619
}
1589 1620

  

Auch abrufbar als: Unified diff