<table id="ic3">
<tr>
<th align="right">[% 'Part Number' | $T8 %]</th>
- <td>[% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, class="initial_focus") %]</td>
+ <td>[% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, class="initial_focus", "data-validate"="trimmed_whitespaces") %]</td>
</tr>
<tr>
<th align="right">[% 'Part Classification' | $T8 %]</th>
</tr>
<tr>
<th align="right">[% 'EAN-Code' | $T8 %]</th>
- <td>[% L.input_tag("part.ean", SELF.part.ean, size=40) %]</td>
+ <td>[% L.input_tag("part.ean", SELF.part.ean, size=40, "data-validate"="trimmed_whitespaces") %]</td>
+ </tr>
+ <tr>
+ <th align="right">[% 'Tariff Code' | $T8 %]</th>
+ <td>[% L.input_tag("part.tariff_code", SELF.part.tariff_code, size=40, "data-validate"="trimmed_whitespaces") %]</td>
</tr>
<tr>
[%- IF SELF.all_partsgroups.size %]
<textarea id="part.formel" name="part.formel" rows="[% HTML.escape(notes_rows) %]" cols="30" wrap="soft" class="tooltipster-html" title="[% 'The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br>' | $T8 %]">[% HTML.escape(SELF.part.formel) %]</textarea>
</td>
</tr>
+ [% IF CUSTOM_VARIABLES_FIRST_TAB %]
+ <tr><td>[% 'Unchecked custom variables will not appear in orders and invoices.' | $T8 %]</td></tr>
+ [%- FOREACH var = CUSTOM_VARIABLES_FIRST_TAB %]
+ <tr>
+ <td align="left" valign="top">[% var.VALID_BOX %]
+ [%- IF !var.partsgroup_filtered %]
+ [% HTML.escape(var.description) %]
+ [%- END %]
+ </tr>
+ <tr><td>[% var.HTML_CODE %]</td></tr>
+ [%- END %]
+ [% END %]
</table>
</td>
</tr>
<tr>
<th align="right" nowrap="true">[% 'List Price' | $T8 %]</th>
- <td>[% L.input_tag("part.listprice_as_number", SELF.part.listprice_as_number, size=11 class='reformat_number numeric') %]</td>
+ <td>
+ [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
+ [% L.input_tag("part.listprice_as_number", SELF.part.listprice_as_number, size=11 class='reformat_number numeric') %]</td>
+ [% ELSE %]
+ <span class="numeric">[% SELF.part.listprice_as_number %]</span>
+ [% END %]
</tr>
<tr >
<th align="right" nowrap="true">[% 'Sell Price' | $T8 %]</th>
- <td>[% L.input_tag("part.sellprice_as_number", SELF.part.sellprice_as_number, size=11, class='reformat_number numeric') %] [% IF (SELF.part.is_assortment or SELF.part.is_assembly) %] (<span id="items_sellprice_sum_basic">[% LxERP.format_amount(SELF.part.items_sellprice_sum, 2) %]</span>) [% END %]</td>
+ <td>
+ [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
+ [% L.input_tag("part.sellprice_as_number", SELF.part.sellprice_as_number, size=11, class='reformat_number numeric') %]
+ [% IF (SELF.part.is_assortment or SELF.part.is_assembly) %] (<span id="items_sellprice_sum_basic">[% LxERP.format_amount(SELF.part.items_sellprice_sum, 2) %]</span>) [% END %]
+ [% ELSE %]
+ <span class="numeric">[% SELF.part.sellprice_as_number %]</span>
+ [% END %]
+ </td>
</tr>
-
- [%- UNLESS SELF.part.is_assembly %]
<tr>
<th align="right" nowrap="true">[% 'Last Cost' | $T8 %]</th>
- <td>[% L.input_tag("part.lastcost_as_number", SELF.part.lastcost_as_number, size=11 class='reformat_number numeric') %]
- [% IF SELF.part.is_assortment %] (<span id="items_lastcost_sum_basic">[% LxERP.format_amount(SELF.part.items_lastcost_sum, 2) %]</span>) [% END %]</td>
+ <td>
+ [%- UNLESS SELF.part.is_assembly %]
+ [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
+ [% L.input_tag("part.lastcost_as_number", SELF.part.lastcost_as_number, size=11 class='reformat_number numeric') %]
+ [% ELSE %]
+ <span class="numeric">[% SELF.part.lastcost_as_number %]</span>
+ [% END %]
+ [%- END %]
+ [% IF SELF.part.is_assortment || SELF.part.is_assembly %] (<span id="items_lastcost_sum_basic">[% LxERP.format_amount(SELF.part.items_lastcost_sum, 2) %]</span>) [% END %]
+ </td>
</tr>
- [%- END %]
[%- IF SELF.all_price_factors.size %]
<tr>
<th align="right" nowrap="true">[% 'Weight' | $T8 %]</th>
<td>
[%- IF SELF.part.is_assembly %]
- [% LxERP.format_amount(SELF.part.weight) %]
+ <span id="items_weight_sum_basic">[% LxERP.format_amount(SELF.part.weight) %]</span>
[% ELSE %]
[% L.input_tag('part.weight_as_number', SELF.part.weight_as_number, size=10, class='reformat_number numeric') %]
[% END %]
<th align="right" nowrap="true">[% 'ROP' | $T8 %]</th>
<td>[% L.input_tag("part.rop_as_number", SELF.part.rop_as_number, size=10, class="reformat_number numeric") %]</td>
</tr>
+ <tr>
+ <th align="right" nowrap="true">[% 'Order Size' | $T8 %]</th>
+ <td>[% L.input_tag("part.order_qty_as_number", SELF.part.order_qty_as_number, size=10, class="numeric") %]</td>
+ </tr>
[% IF SELF.all_warehouses.size %]
<tr>
<th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %]</th>
<td>
<span id='bin'>
[% IF SELF.part.warehouse.id %]
- [% L.select_tag('part.bin_id', SELF.part.warehouse.bins, default=SELF.part.bin.id, title_key='description') %]
+ [% L.select_tag('part.bin_id', SELF.part.warehouse.bins_sorted_naturally, default=SELF.part.bin.id, title_key='description', with_empty=0) %]
[%- END %]
</span>
</td>
<th align="right" nowrap><label for="not_discountable">[% 'Not Discountable' | $T8 %]</label></th>
<td>[% L.checkbox_tag('part.not_discountable', checked = SELF.part.not_discountable, for_submit=1) %]</td>
</tr>
+ <tr>
+ <th align="right" nowrap="true"><label for="order_locked">[% 'Do not order anymore' | $T8 %]</label></th>
+ <td>[% L.checkbox_tag('part.order_locked', checked = SELF.part.order_locked, for_submit=1) %]</td>
+ </tr>
[%- IF SELF.part.id %]
<tr>
<th align="right" nowrap="true"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></th>
<table id="ic6">
<tr>
<th align="right" nowrap>[% 'Image' | $T8 %]</th>
- <td>[% L.input_tag("part.image", SELF.part.image, size=40) %]</td>
+ <td>[% L.input_tag("part.image", SELF.part.image, size=40, "data-validate"="trimmed_whitespaces") %]</td>
<th align="right" nowrap>[% 'Microfiche' | $T8 %]</th>
- <td>[% L.input_tag("part.microfiche", SELF.part.microfiche, size=20) %]</td>
+ <td>[% L.input_tag("part.microfiche", SELF.part.microfiche, size=20, "data-validate"="trimmed_whitespaces") %]</td>
</tr>
<tr>
<th align="right" nowrap>[% 'Drawing' | $T8 %]</th>
- <td>[% L.input_tag("part.drawing", SELF.part.drawing, size=40) %]</td>
+ <td>[% L.input_tag("part.drawing", SELF.part.drawing, size=40, "data-validate"="trimmed_whitespaces") %]</td>
</tr>
</table>
</td>
[%- UNLESS SELF.part.is_assembly %]
[% PROCESS 'part/_makemodel.html' %]
[% END %]
+ [% PROCESS 'part/_businessmodels.html' %]
<tr>
<td><hr size="3" noshade></td>