<thead>
<tr class="listheading">
<th class="listheading" style='display:none'></th>
- [% IF SELF.orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
<th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
[% END %]
<th class="listheading" nowrap width="3" >[%- 'position' | $T8 %] </th>
- [% IF SELF.orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
<th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
[% END %]
<th id="partnumber_header_id" class="listheading" nowrap width="5"><a href='#' onClick='javascript:kivi.Part.reorder_items("partnumber")' >[%- 'Partnumber' | $T8 %]</a></th>
</tbody>
<tbody id="assembly_input">
<tr>
- [% IF SELF.orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
<td></td>
<td></td>
<td align="right">[% 'Part' | $T8 %]:</td>
<td id="items_sum_diff" class="numeric">[%- LxERP.format_amount(items_sum_diff, 2, 0) %]</td>
</tr>
<tr>
- [% IF SELF.orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
<td></td>
<td></td>
[% END %]
[%- USE P %]
<tr class="listrow[% listrow %] assembly_item_row">
<td style='display:none'>
- [% IF orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
[% L.hidden_tag("assembly_items[+].parts_id", ITEM.part.id) %]
[% END %]
</td>
- <td align="center" [% UNLESS orphaned %]style='display:none'[% END %]>
+ <td align="center" [% UNLESS orphaned || AUTH.assert('assembly_edit', 1) %]style='display:none'[% END %]>
[%- L.button_tag("kivi.Part.delete_item_row(this)",
LxERP.t8("X")) %] [% # , confirm=LxERP.t8("Are you sure?")) %]
</td>
[% HTML.escape(position) or HTML.escape(ITEM.position) %]
</div>
</td>
- <td align="center" [% UNLESS orphaned %]style='display:none'[% END %]>
+ <td align="center" [% UNLESS orphaned || AUTH.assert('assembly_edit', 1) %]style='display:none'[% END %]>
<img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop">
</td>
<td nowrap>
[% HTML.escape(ITEM.part.description) %]
</td>
<td>
- [% IF orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
[%- L.input_tag("assembly_items[].qty_as_number",
ITEM.qty_as_number,
size = 10,
<td nowrap>
[% ITEM.part.unit | html %]
</td>
- [% IF orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
<td>[% L.checkbox_tag("assembly_items[].bom", checked=ITEM.bom, for_submit=1) %]</td>
[% ELSE %]
<td>[% IF ITEM.bom %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %]</td>