'Already counted' => 'Bereits erfasst',
'Already imported entries (duplicates)' => 'Bereits importierte Einträge (Duplikate)',
'Always edit assembly items (user can change/delete items even if assemblies are already produced)' => 'Erzeugnisbestandteile verändern (Löschen/Umsortieren) auch nachdem dieses Erzeugnis schon produziert wurde.',
+ 'Always edit assortment items (user can change/delete items even if assortments are already used)' => 'Sortimentsbestandteile verändern (Löschen/Umsortieren), auch nachdem dieses Sortiment schon verwendet wurde.',
'Always save orders with a projectnumber (create new projects)' => 'Aufträge immer mit Projektnummer speichern (neue Projekte erstellen)',
'Amended Advance Turnover Tax Return' => 'Berichtigte Anmeldung',
'Amount' => 'Betrag',
'Already counted' => '',
'Already imported entries (duplicates)' => '',
'Always edit assembly items (user can change/delete items even if assemblies are already produced)' => '',
+ 'Always edit assortment items (user can change/delete items even if assortments are already used)' => '',
'Always save orders with a projectnumber (create new projects)' => '',
'Amended Advance Turnover Tax Return' => '',
'Amount' => '',
--- /dev/null
+-- @tag: right_assortment_edit
+-- @description: Recht zum Ändern von Sortimentsbestandteilen auch nach Verwendeung
+-- @depends: release_3_5_7 move_shop_part_edit_right
+-- @locales: Always edit assortment items (user can change/delete items even if assortments are already used)
+
+INSERT INTO auth.master_rights (position, name, description, category)
+ VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'assembly_edit'),
+ 'assortment_edit',
+ 'Always edit assortment items (user can change/delete items even if assortments are already used)',
+ FALSE);
+
+INSERT INTO auth.group_rights (group_id, "right", granted)
+ SELECT id, 'assortment_edit', true
+ FROM auth.group
+ WHERE name = 'Vollzugriff';
<thead>
<tr class="listheading">
<th class="listheading" style='display:none'></th>
- [% IF SELF.orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assortment_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('assortment_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="15"><a href='#' onClick='javascript:kivi.Part.reorder_items("partnumber")'> [%- 'Partnumber' | $T8 %]</a></th>
</tbody>
<tbody id="assortment_input">
<tr>
- [% IF SELF.orphaned %]
+ [% IF SELF.orphaned || AUTH.assert('assortment_edit', 1) %]
<td></td>
<td></td>
<td align="right">[% 'Part' | $T8 %]:</td>
<th 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('assortment_edit', 1) %]
<td></td>
<td></td>
[% END %]
[%- USE P %]
<tr class="listrow[% listrow %] assortment_item_row">
<td style='display:none'>
- [% IF orphaned %]
+ [% IF orphaned || AUTH.assert('assortment_edit', 1) %]
[% L.hidden_tag("assortment_items[+].parts_id", ITEM.part.id) %]
[% END %]
</td>
- <td align="center" [% UNLESS orphaned %]style='display:none'[% END %]>
+ <td align="center" [% UNLESS orphaned || AUTH.assert('assortment_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('assortment_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 nowrap>
- [% IF orphaned %]
+ [% IF orphaned || AUTH.assert('assortment_edit', 1) %]
[%- L.input_tag("assortment_items[].qty_as_number",
ITEM.qty_as_number,
size = 10,
[% END %]
</td>
<td nowrap>
- [% IF orphaned %]
+ [% IF orphaned || AUTH.assert('assortment_edit', 1) %]
[%- L.select_tag("assortment_items[].unit",
ITEM.part.available_units,
default = ITEM.part.unit,
[% END %]
</td>
<td>
- [% IF orphaned %]
+ [% IF orphaned || AUTH.assert('assortment_edit', 1) %]
[% L.checkbox_tag('assortment_items[].charge', checked => ITEM.charge, class => 'checkbox', for_submit=1) %]
[% ELSE %]
[% IF ITEM.charge %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]