Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e992513a

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID e992513af1203881e0420ff092de2f993bc49355
  • Vorgänger 1c08aa6f
  • Nachfolger 5b1b4713

Model::Record: FIX: Setze IDs für Belegverknüpfung richtig

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
31 31
use SL::DB::TransferType;
32 32
use SL::DB::ValidityToken;
33 33
use SL::DB::Warehouse;
34
use SL::DB::Helper::RecordLink qw(set_record_link_conversions);
34
use SL::DB::Helper::RecordLink qw(set_record_link_conversions RECORD_ID RECORD_ITEM_ID);
35 35
use SL::DB::Helper::TypeDataProxy;
36 36
use SL::DB::Helper::Record qw(get_object_name_from_type get_class_from_type);
37 37
use SL::DB::DeliveryOrder;
......
131 131
  my $delivery_order = SL::Model::Record->new_from_workflow($record, $self->type, %flags);
132 132
  $self->order($delivery_order);
133 133

  
134
  if (ref($record) eq 'SL::DB::Reclamation') {
135
    $self->{converted_from_reclamation_id}       = $delivery_order->{ RECORD_ID()      };
136
    $_   ->{converted_from_reclamation_items_id} = $_             ->{ RECORD_ITEM_ID() } for @{ $delivery_order->items_sorted };
137
  }
138
  if (ref($record) eq 'SL::DB::Order') {
139
    $self->{converted_from_oe_id}       = $delivery_order->{ RECORD_ID()      };
140
    $_   ->{converted_from_oe_items_id} = $_             ->{ RECORD_ITEM_ID() } for @{ $delivery_order->items_sorted };
141
  }
142

  
134 143
  $self->action_add;
135 144
}
136 145

  
SL/Controller/Order.pm
123 123
    $self->{converted_from_reclamation_id}       = $order->{ RECORD_ID()      };
124 124
    $_   ->{converted_from_reclamation_items_id} = $_    ->{ RECORD_ITEM_ID() } for @{ $order->items_sorted };
125 125
  }
126
  if (ref($record) eq 'SL::DB::Order') {
127
    $self->{converted_from_oe_id}       = $order->{ RECORD_ID()      };
128
    $_   ->{converted_from_oe_items_id} = $_    ->{ RECORD_ITEM_ID() } for @{ $order->items_sorted };
129
  }
126 130

  
127 131

  
128 132
  $self->recalc();

Auch abrufbar als: Unified diff