Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 84ae013c

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID 84ae013c066831bae75806588c3e45dc38747cc7
  • Vorgänger b50be513
  • Nachfolger 9e22970b

Workflow: E-Mail → Lieferschein hinzugefügt

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
32 32
use SL::DB::Translation;
33 33
use SL::DB::TransferType;
34 34
use SL::DB::ValidityToken;
35
use SL::DB::EmailJournal;
35 36
use SL::DB::Warehouse;
36 37
use SL::DB::Helper::RecordLink qw(set_record_link_conversions RECORD_ID RECORD_TYPE_REF RECORD_ITEM_ID RECORD_ITEM_TYPE_REF);
37 38
use SL::DB::Helper::TypeDataProxy;
......
145 146
  $self->action_add;
146 147
}
147 148

  
149
sub action_add_from_email_journal {
150
  my ($self) = @_;
151
  die "No 'email_journal_id' was given." unless ($::form->{email_journal_id});
152

  
153
  $self->action_add();
154
}
155

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

  
162
  $self->action_edit();
163
}
164

  
148 165
# edit an existing order
149 166
sub action_edit {
150 167
  my ($self) = @_;
......
548 565
    type       => $to_type,
549 566
    from_id    => $self->order->id,
550 567
    from_type  => $self->order->type,
568
    email_journal_id    => $::form->{workflow_email_journal_id},
569
    email_attachment_id => $::form->{workflow_email_attachment_id},
551 570
    %additional_params,
552 571
  );
553 572
}
......
561 580
    controller => 'do.pl',
562 581
    action     => 'invoice_from_delivery_order_controller',
563 582
    from_id    => $self->order->id,
583
    email_journal_id    => $::form->{workflow_email_journal_id},
584
    email_attachment_id => $::form->{workflow_email_attachment_id},
564 585
  );
565 586
}
566 587

  
......
1788 1809
    items_to_delete            => $items_to_delete,
1789 1810
  );
1790 1811

  
1812
  if ($::form->{email_journal_id}) {
1813
    my $email_journal = SL::DB::EmailJournal->new(
1814
      id => delete $::form->{email_journal_id}
1815
    )->load;
1816
    $email_journal->link_to_record_with_attachment(
1817
      $self->order,
1818
      delete $::form->{email_attachment_id}
1819
    );
1820
  }
1821

  
1791 1822
  delete $::form->{form_validity_token};
1792 1823
}
1793 1824

  

Auch abrufbar als: Unified diff