Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e0a47f33

Von Bernd Bleßmann vor etwa 8 Jahren hinzugefügt

  • ID e0a47f33b02b4cd8760fbe3c3f8c9ffa722db4e4
  • Vorgänger 0b20f337
  • Nachfolger 5737ce39

Auftrags-Controller: Kosmetik und Kommentare verbessert

Unterschiede anzeigen:

SL/Controller/Order.pm
863 863
  $item ||= SL::DB::OrderItem->new(custom_variables => []);
864 864

  
865 865
  $item->assign_attributes(%$attr);
866
  $item->longdescription($item->part->notes) if $is_new && !defined $attr->{longdescription};
866
  $item->longdescription($item->part->notes)   if $is_new && !defined $attr->{longdescription};
867 867
  $item->project_id($record->globalproject_id) if $is_new && !defined $attr->{project_id};
868
  # item fields that currently can't be set in in row but are needed:
868
  # item fields that currently can't be set in row but are needed:
869 869
  $item->lastcost($item->part->lastcost) if $is_new;
870 870

  
871 871
  return $item;
......
873 873

  
874 874
# create a new item
875 875
#
876
# This is used to add one (or more) items
876
# This is used to add one item
877 877
sub _new_item {
878 878
  my ($record, $attr) = @_;
879 879

  
......
920 920
  $new_attr{discount}               = $discount_src->discount;
921 921
  $new_attr{active_price_source}    = $price_src;
922 922
  $new_attr{active_discount_source} = $discount_src;
923

  
924
  $new_attr{longdescription}        = $part->notes if ! defined $attr->{longdescription};
923
  $new_attr{longdescription}        = $part->notes           if ! defined $attr->{longdescription};
925 924
  $new_attr{project_id}             = $record->globalproject_id;
926 925

  
927 926
  # add_custom_variables adds cvars to an orderitem with no cvars for saving, but

Auch abrufbar als: Unified diff