Revision f2461e14
Von Bernd Bleßmann vor etwa 8 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 |
templates/webpages/order/tabs/_second_row.html | ||
---|---|---|
25 | 25 |
</td> |
26 | 26 |
<th>[%- 'LP' | $T8 %]</th> |
27 | 27 |
<td>[%- LxERP.format_amount(ITEM.part.listprice, 2, 0) %]</td> |
28 |
<th>[%- 'EK' | $T8 %]</th> |
|
29 |
<td> |
|
30 |
[%- L.input_tag("order.orderitems[].lastcost_as_number", |
|
31 |
ITEM.lastcost_as_number, |
|
32 |
size = 5, |
|
33 |
class="recalc reformat_number numeric") %] |
|
34 |
</td> |
|
28 | 35 |
[%- END %] |
29 | 36 |
<th>[%- 'On Hand' | $T8 %]</th> |
30 | 37 |
<td> |
Auch abrufbar als: Unified diff
Auftrags-Controller: Einkaufspreis in zweiter Zeile