[%- IF SELF.part.image && INSTANCE_CONF.get_parts_show_image %]
[%- END %]
[% 'Part Number' | $T8 %]
[% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, class="initial_focus") %]
[% 'Part Classification' | $T8 %]
[% P.part.select_classification('part.classification_id', default => SELF.part.classification_id, type => SELF.parts_classification_filter ) %]
[% 'Part Description' | $T8 %]
[% L.areainput_tag("part.description", SELF.part.description, size=40) %]
[% 'EAN-Code' | $T8 %]
[% L.input_tag("part.ean", SELF.part.ean, size=40) %]
[%- IF SELF.all_partsgroups.size %]
[% 'Partsgroup' | $T8 %]
[%- L.select_tag('part.partsgroup_id', SELF.all_partsgroups, default=SELF.part.partsgroup_id, title_key='partsgroup', value_key='id', with_empty=1 style='width: 200px') %]
[% END %]
[%- IF SELF.all_buchungsgruppen.size %]
[% 'Booking group' | $T8 %]
[%- L.select_tag('part.buchungsgruppen_id', SELF.all_buchungsgruppen, default=SELF.part.buchungsgruppen_id, title_key='description', value_key='id', with_empty=0 style='width: 200px') %]
[%- END %]
[%- IF SELF.all_payment_terms.size %]
[% 'Payment Terms' | $T8 %]
[%- L.select_tag('part.payment_id', SELF.all_payment_terms, default=SELF.part.payment_id, title_key='description', value_key='id', with_empty=1 style='width: 200px') %]
[% END %]
[% 'Part Notes' | $T8 %]
[% 'Formula' | $T8 %]
[% L.textarea_tag("part.notes", P.restricted_html(SELF.part.notes), class="texteditor", style="width: 600px; height: 200px") %]
[% 'Updated' | $T8 %]
[% SELF.part.priceupdate.to_kivitendo | html %]
[% 'List Price' | $T8 %]
[% L.input_tag("part.listprice_as_number", SELF.part.listprice_as_number, size=11 class='reformat_number numeric') %]
[% 'Sell Price' | $T8 %]
[% 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) %] ([% LxERP.format_amount(SELF.part.items_sellprice_sum, 2) %] ) [% END %]
[%- UNLESS SELF.part.is_assembly %]
[% 'Last Cost' | $T8 %]
[% L.input_tag("part.lastcost_as_number", SELF.part.lastcost_as_number, size=11 class='reformat_number numeric') %]
[% IF SELF.part.is_assortment %] ([% LxERP.format_amount(SELF.part.items_lastcost_sum, 2) %] ) [% END %]
[%- END %]
[%- IF SELF.all_price_factors.size %]
[% 'Price Factor' | $T8 %]
[%- L.select_tag('part.price_factor_id', SELF.all_price_factors, default=SELF.part.price_factor_id, title_key='description', value_key='id', with_empty=1) %]
[%- END %]
[% 'Unit' | $T8 %]
[%- IF !SELF.part.id or SELF.part.orphaned # same logic as unit_changable %]
[%- L.select_tag('part.unit', SELF.all_units, default=SELF.part.unit, title_key='name', value_key='name') %]
[%- ELSE %]
[% L.hidden_tag('part.unit', SELF.part.unit) %] [% HTML.escape(SELF.part.unit) %]
[%- END %]
[%- UNLESS SELF.part.is_service %]
[% 'Weight' | $T8 %]
[%- IF SELF.part.is_assembly %]
[% LxERP.format_amount(SELF.part.weight) %]
[% ELSE %]
[% L.input_tag('part.weight_as_number', SELF.part.weight_as_number, size=10, class='reformat_number numeric') %]
[% END %]
[% HTML.escape(INSTANCE_CONF.get_weightunit) %]
[% 'On Hand' | $T8 %]
[% LxERP.format_amount(SELF.part.onhand) %] [% SELF.part.unit | html %]
[% 'ROP' | $T8 %]
[% L.input_tag("part.rop_as_number", SELF.part.rop_as_number, size=10, class="reformat_number numeric") %]
[% IF SELF.all_warehouses.size %]
[% 'Default Warehouse' | $T8 %]
[% L.select_tag('part.warehouse_id', SELF.all_warehouses, default=SELF.part.warehouse.id, title_key='description', with_empty=1) %]
[% END %]
[% 'Default Bin' | $T8 %]
[% IF SELF.part.warehouse.id %]
[% L.select_tag('part.bin_id', SELF.part.warehouse.bins, default=SELF.part.bin.id, title_key='description') %]
[%- END %]
[%- END %]
[% 'Verrechnungseinheit' | $T8 %]
[% L.input_tag("part.ve", SELF.part.ve, size=10) %]
[% 'Business Volume' | $T8 %]
[% L.input_tag("part.gv_as_number", SELF.part.gv_as_number, size=10, class='reformat_number numeric') %]
[% 'Not Discountable' | $T8 %]
[% L.checkbox_tag('part.not_discountable', checked = SELF.part.not_discountable, for_submit=1) %]
[%- IF SELF.part.id %]
[% 'Obsolete' | $T8 %]
[% L.checkbox_tag('part.obsolete', checked = SELF.part.obsolete, for_submit=1) %]
[%- END %]
[%- UNLESS SELF.part.is_service %]
[% 'Has serial number' | $T8 %]
[% L.checkbox_tag('part.has_sernumber', checked = SELF.part.has_sernumber, for_submit=1) %]
[%- END %]
[% 'Shop article' | $T8 %]
[% L.checkbox_tag('part.shop', checked = SELF.part.shop, for_submit=1) %]