1 [%- USE T8 %][%- USE LxERP %][% USE L %]
5 [% INCLUDE "common/flash.html" %]
7 [% PROCESS "am/_units_header_info.html" %]
12 [% 'Units that have already been used (e.g. for parts and services or in invoices or warehouse transactions) cannot be changed.' | $T8 %]
16 [% 'Units marked for deletion will be deleted upon saving.' | $T8 %]
20 [% 'You can declare different translations for singular and plural for each unit (e.g. "day" and "days).' | $T8 %]
23 <form method="post" action="[% HTML.escape(script) %]" id="form">
25 <input type="hidden" name="type" value="unit">
27 <table id="unit_list">
29 <tr class="listheading">
30 <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
31 <th>[% 'Delete' | $T8 %]</th>
32 <th>[% 'Unit' | $T8 %]</th>
33 <th>[% 'Base unit' | $T8 %]</th>
34 <th>[% 'Factor' | $T8 %]</th>
35 [% FOREACH language = LANGUAGES %]
36 <th>[% language.description %]</th>
42 [% FOREACH row = UNITS %]
43 <tr class="listrow[% loop.count % 2 %]" id="unit_id_[% row.id %]">
44 <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
47 <input type="hidden" name="unchangeable_[% loop.count %]" value="1">
48 <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
51 <td>[% HTML.escape(row.name) %]</td>
52 <td>[% IF row.base_unit %][% HTML.escape(row.base_unit) %][% ELSE %]---[% END %]</td>
53 <td>[% IF row.base_unit %][% HTML.escape(row.factor) %][% ELSE %]---[% END %]</td>
57 <td align="center"><input type="checkbox" name="delete_[% loop.count %]"></td>
59 <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
60 <input name="name_[% loop.count %]" size="10" maxlength="20" value="[% HTML.escape(row.name) %]">
63 <select name="base_unit_[% loop.count %]">
64 [% FOREACH option = row.BASE_UNIT_DDBOX %]<option [% option.selected %]>[% HTML.escape(option.name) %]</option>[% END %]
67 <td><input name="factor_[% loop.count %]" size="8" value="[% row.factor %]"></td>
70 [% FOREACH language = row.UNITLANGUAGES %]
72 [% 'singular first char' | $T8 %]:
73 <input name="localized_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized) %]" size="6" maxlength="20">
74 [% 'plural first char' | $T8 %]:
75 <input name="localized_plural_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized_plural) %]" size="6" maxlength="20">
83 <input type="hidden" name="rowcount" value="[% UNITS.size %]">
87 [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %]