X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fpart%2F_assembly.html;h=bc32cf8999ee1914b99ab2ed5c78a2c099174573;hb=73f7989fcf23410ebd879d5150f6a13913ca2b90;hp=1e2bbd16fb867d3034b040c0ea91f7156137e2ff;hpb=13fb6d811d39a8af7144451ada59f2f7d4eb491a;p=kivitendo-erp.git diff --git a/templates/webpages/part/_assembly.html b/templates/webpages/part/_assembly.html index 1e2bbd16f..bc32cf899 100644 --- a/templates/webpages/part/_assembly.html +++ b/templates/webpages/part/_assembly.html @@ -2,6 +2,7 @@ [%- USE HTML %] [%- USE LxERP %] [%- USE L %] +[%- USE P %]
@@ -13,22 +14,23 @@ - [% IF SELF.orphaned %] + [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %] [%- LxERP.t8('delete item') %] [% END %] [%- 'position' | $T8 %] - [% IF SELF.orphaned %] + [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %] [%- LxERP.t8('reorder item') %] [% END %] - [%- 'Partnumber' | $T8 %] + [%- 'Partnumber' | $T8 %] + [% 'Type' | $T8 %] [%- 'Description' | $T8 %] - [%- 'Qty' | $T8 %] + [%- 'Qty' | $T8 %] [%- 'Unit' | $T8 %] [%- 'BOM' | $T8 %] [%- 'Line Total' | $T8 %] [%- 'Sellprice' | $T8 %] [%- 'Lastcost' | $T8 %] - [%- 'Group' | $T8 %] + [%- 'Partsgroup' | $T8 %] @@ -36,13 +38,14 @@ - [% IF SELF.orphaned %] + [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %] [% 'Part' | $T8 %]: - [% L.part_picker('add_items[+].parts_id' , '' , style='width: 300px' , class="add_assembly_item_input") %][% L.hidden_tag('add_items[].qty_as_number', 1) %] + [% P.part.picker('add_items[+].parts_id', '', style='width: 300px', multiple=1, id='assembly_picker', action={set_multi_items='kivi.Part.set_multi_assembly_items', commit_one='kivi.Part.add_assembly_item'}) %] [%- L.button_tag("kivi.Part.add_assembly_item()", LxERP.t8("Add")) %] - [% L.button_tag('kivi.Part.show_multi_items_dialog("assembly")', LxERP.t8('Add multiple items')) %] + [% L.button_tag('$("#assembly_picker").data("part_picker").open_dialog()', LxERP.t8('Add multiple items')) %] + [% L.hidden_tag('add_items[].qty_as_number', 1) %] [% ELSE %] @@ -55,10 +58,40 @@ [%- LxERP.format_amount(items_sellprice_sum, 2, 0) %] [%- LxERP.format_amount(items_lastcost_sum, 2, 0) %] + + + + + + + + + + + + [% 'Margepercent' | $T8 %]: + + + [% IF items_sellprice_sum > 0 %] + [%- LxERP.format_amount(100 - (items_lastcost_sum / items_sellprice_sum * 100), 2, 0) %] + [% END %] + + + + + + + + + + + + [% 'Margetotal' | $T8 %]: + [%- LxERP.format_amount(items_sum_diff, 2, 0) %] - [% IF SELF.orphaned %] + [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %] [% END %] @@ -69,6 +102,7 @@ + [% L.button_tag("kivi.Part.set_assembly_sellprice()", LxERP.t8("Set sellprice")) %]