+
+sub _get_unalterable_data {
+ my ($self) = @_;
+
+ foreach my $item (@{ $self->order->items }) {
+ if ($item->id) {
+ # load data from orderitems (db)
+ my $db_item = SL::DB::OrderItem->new(id => $item->id)->load;
+ $item->$_($db_item->$_) for qw(active_discount_source active_price_source longdescription);
+ } else {
+ # set data from part (or other sources)
+ $item->longdescription($item->part->notes);
+ #$item->active_price_source('');
+ #$item->active_discount_source('');
+ }
+ }
+}
+
+