@@ -1024,9 +1024,11 @@ sub action_update_item_input_row {
1024
1024
1025
1025
my ($price_src , $discount_src ) = SL::Model::Record-> get_best_price_and_discount_source($record , $item , ignore_given => 0);
1026
1026
1027
+ my $texts = get_part_texts($item -> part, $self -> order-> language_id);
1028
+
1027
1029
$self -> js
1028
1030
-> val (' #add_item_unit' , $item -> unit)
1029
- -> val (' #add_item_description' , $item -> part -> description)
1031
+ -> val (' #add_item_description' , $texts -> { description } )
1030
1032
-> val (' #add_item_sellprice_as_number' , ' ' )
1031
1033
-> attr (' #add_item_sellprice_as_number' , ' placeholder' , $price_src -> price_as_number)
1032
1034
-> attr (' #add_item_sellprice_as_number' , ' title' , $price_src -> source_description)
@@ -1947,7 +1949,13 @@ sub new_item {
1947
1949
# saved. Adding empty custom_variables to new orderitem here solves this problem.
1948
1950
$new_attr {custom_variables } = [];
1949
1951
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;
1951
1959
1952
1960
$item -> assign_attributes(%new_attr , %{ $texts });
1953
1961
0 commit comments