Revision c84c3960
Von Sven Schöling vor etwa 1 Jahr hinzugefügt
SL/DB/DeliveryOrderItem.pm | ||
---|---|---|
10 | 10 |
use SL::DB::Manager::DeliveryOrderItem; |
11 | 11 |
use SL::DB::Helper::ActsAsList; |
12 | 12 |
use SL::DB::Helper::LinkedRecords; |
13 |
use SL::DB::Helper::RecordLink qw(RECORD_ITEM_ID RECORD_ITEM_TYPE_REF); |
|
13 | 14 |
use SL::DB::Helper::RecordItem; |
14 | 15 |
use SL::DB::Helper::CustomVariables ( |
15 | 16 |
sub_module => 'delivery_order_items', |
... | ... | |
107 | 108 |
|
108 | 109 |
my $item = $class->new(%item_args); |
109 | 110 |
|
110 |
my $source_table = ''; |
|
111 |
if( ref($source) eq 'SL::DB::OrderItem' ) { |
|
112 |
$source_table = 'orderitems'; |
|
113 |
} elsif ( ref($source) eq 'SL::DB::ReclamationItem' ) { |
|
114 |
$source_table = 'reclamation_items'; |
|
111 |
unless ($params{no_linked_records}) { |
|
112 |
$item->{ RECORD_ITEM_ID() } = $source->id; |
|
113 |
$item->{ RECORD_ITEM_TYPE_REF() } = ref $source; |
|
115 | 114 |
} |
116 |
$item->{"converted_from_". $source_table ."_id"} = $_->{id}; |
|
117 | 115 |
|
118 | 116 |
return $item; |
119 | 117 |
} |
Auch abrufbar als: Unified diff
RecordLink: converted_from_* Felder in allen convert_to und new_from korrekt setzen.
Das hier benutzt jetzt das neue Reclamation Format. Statt
wird jetzt
benutzt.