Revision f2461e14
Von Bernd Bleßmann vor mehr als 7 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
610 | 610 |
$self->_js_load_second_row($item, $item_id, 0); |
611 | 611 |
} |
612 | 612 |
|
613 |
$self->js->run('kivi.Order.init_row_handlers') if $self->order->is_sales; # for lastcosts change-callback |
|
614 |
|
|
613 | 615 |
$self->js->render(); |
614 | 616 |
} |
615 | 617 |
|
... | ... | |
884 | 886 |
$item->assign_attributes(%$attr); |
885 | 887 |
$item->longdescription($item->part->notes) if $is_new && !defined $attr->{longdescription}; |
886 | 888 |
$item->project_id($record->globalproject_id) if $is_new && !defined $attr->{project_id}; |
887 |
# item fields that currently can't be set in row but are needed: |
|
888 |
$item->lastcost($item->part->lastcost) if $is_new; |
|
889 |
$item->lastcost($item->part->lastcost) if $is_new && !defined $attr->{lastcost_as_number}; |
|
889 | 890 |
|
890 | 891 |
return $item; |
891 | 892 |
} |
... | ... | |
941 | 942 |
$new_attr{active_discount_source} = $discount_src; |
942 | 943 |
$new_attr{longdescription} = $part->notes if ! defined $attr->{longdescription}; |
943 | 944 |
$new_attr{project_id} = $record->globalproject_id; |
945 |
$new_attr{lastcost} = $part->lastcost; |
|
944 | 946 |
|
945 | 947 |
# add_custom_variables adds cvars to an orderitem with no cvars for saving, but |
946 | 948 |
# they cannot be retrieved via custom_variables until the order/orderitem is |
Auch abrufbar als: Unified diff
Auftrags-Controller: Einkaufspreis in zweiter Zeile