Skip to content

Commit 2d3180e

Browse files
committed
FIX: S:C:Order: Artikelbesch. in Eingabe übersetzen und Text übernehmen
1 parent 2209f10 commit 2d3180e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

SL/Controller/Order.pm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,9 +1024,11 @@ sub action_update_item_input_row {
10241024

10251025
my ($price_src, $discount_src) = SL::Model::Record->get_best_price_and_discount_source($record, $item, ignore_given => 0);
10261026

1027+
my $texts = get_part_texts($item->part, $self->order->language_id);
1028+
10271029
$self->js
10281030
->val ('#add_item_unit', $item->unit)
1029-
->val ('#add_item_description', $item->part->description)
1031+
->val ('#add_item_description', $texts->{description})
10301032
->val ('#add_item_sellprice_as_number', '')
10311033
->attr ('#add_item_sellprice_as_number', 'placeholder', $price_src->price_as_number)
10321034
->attr ('#add_item_sellprice_as_number', 'title', $price_src->source_description)
@@ -1947,7 +1949,13 @@ sub new_item {
19471949
# saved. Adding empty custom_variables to new orderitem here solves this problem.
19481950
$new_attr{custom_variables} = [];
19491951

1950-
my $texts = get_part_texts($item->part, $record->language_id, description => $new_attr{description}, longdescription => $new_attr{longdescription});
1952+
my $texts = get_part_texts(
1953+
$item->part, $record->language_id,
1954+
description => $new_attr{description},
1955+
longdescription => $new_attr{longdescription}
1956+
);
1957+
delete $texts->{description} if $item->description;
1958+
delete $texts->{longdescription} if $item->longdescription;
19511959

19521960
$item->assign_attributes(%new_attr, %{ $texts });
19531961

0 commit comments

Comments
 (0)