From 0b20f3379a3466235b6992f4f26398127bd4f4f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 6 Dec 2016 11:27:00 +0100 Subject: [PATCH] Auftrags-Controller: Projektnummer in zweiter Zeile --- SL/Controller/Order.pm | 2 ++ templates/webpages/order/tabs/_second_row.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index a24d1d3b5..df18eb857 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -864,6 +864,7 @@ sub _make_item { $item->assign_attributes(%$attr); $item->longdescription($item->part->notes) if $is_new && !defined $attr->{longdescription}; + $item->project_id($record->globalproject_id) if $is_new && !defined $attr->{project_id}; # item fields that currently can't be set in in row but are needed: $item->lastcost($item->part->lastcost) if $is_new; @@ -921,6 +922,7 @@ sub _new_item { $new_attr{active_discount_source} = $discount_src; $new_attr{longdescription} = $part->notes if ! defined $attr->{longdescription}; + $new_attr{project_id} = $record->globalproject_id; # add_custom_variables adds cvars to an orderitem with no cvars for saving, but # they cannot be retrieved via custom_variables until the order/orderitem is diff --git a/templates/webpages/order/tabs/_second_row.html b/templates/webpages/order/tabs/_second_row.html index cc2646ecd..8b9939ad2 100644 --- a/templates/webpages/order/tabs/_second_row.html +++ b/templates/webpages/order/tabs/_second_row.html @@ -7,6 +7,8 @@ [%- 'Serial No.' | $T8 %] [%- L.input_tag("order.orderitems[].serialnumber", ITEM.serialnumber, size = 15) %] + [%- 'Project' | $T8 %] + [% L.project_picker("order.orderitems[].project_id", ITEM.project_id, size = 15) %] [%- 'Reqdate' | $T8 %] [% L.date_tag("order.orderitems[].reqdate", ITEM.reqdate) %] [%- 'Subtotal' | $T8 %] -- 2.20.1