$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;
$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
<tr>
<th>[%- 'Serial No.' | $T8 %]</th>
<td>[%- L.input_tag("order.orderitems[].serialnumber", ITEM.serialnumber, size = 15) %]</td>
+ <th>[%- 'Project' | $T8 %]</th>
+ <td>[% L.project_picker("order.orderitems[].project_id", ITEM.project_id, size = 15) %]</td>
<th>[%- 'Reqdate' | $T8 %]</th>
<td>[% L.date_tag("order.orderitems[].reqdate", ITEM.reqdate) %]</td>
<th>[%- 'Subtotal' | $T8 %]</th>