[%- USE LxERP -%][% USE L %][% USE HTML %][%- USE JavaScript -%][% USE T8 %][%- USE Dumper %]
[%- IF stock_amounts.size %]
[% LxERP.t8('Description') %][% part.description %]
[% LxERP.t8('Default Warehouse') %][% part.warehouse.description %] [% LxERP.t8('Default Bin') %][% part.bin.description %]
[% LxERP.t8('ROP') %][% part.rop_as_number %]
[% FOREACH stock = stock_amounts %] [% IF stock.wh_lead != stock.warehouse_description %] [% END %] [% IF loop.last %] [% END %] [% END %] [% ELSE %]
[% 'Warehouse' | $T8 %] [% 'Bin' | $T8 %] [% 'Chargenumber' | $T8 %] [% 'Qty' | $T8 %] [% 'Unit' | $T8 %]
[% HTML.escape(stock.warehouse_description) %] [% IF stock.order_link %][% END %] [% HTML.escape(stock.bin_description) %] [% IF stock.order_link %][% END %] [% HTML.escape(stock.chargenumber) %] [% LxERP.format_amount(stock.qty, dec) %] [% HTML.escape(stock.unit) %]
[% HTML.escape(stock.warehouse_description) %] [% LxERP.format_amount(stock.wh_run_qty, dec) %]
[% 'Total' | $T8 %] [% LxERP.format_amount(stock.run_qty, dec) %]

[% 'No transactions yet.' | $T8 %]

[% END %]
[% LxERP.t8('Sum Amount') %][% LxERP.format_amount(sum, 2) %] [% part.unit %] [%- IF part.image && INSTANCE_CONF.get_parts_show_image %] [% END %]
[% LxERP.t8('Not delivered amount') %][% LxERP.format_amount(not_delivered, 2) %] [% part.unit %]
[% LxERP.t8('Ordered, but not delivered (purchase)') %][% LxERP.format_amount(ordered, 2) %] [% part.unit %]
[% LxERP.t8('Available amount') %][% LxERP.format_amount(part.onhandqty, 2) %] [% part.unit %]
[% LxERP.t8('Consume average') %][% LxERP.format_amount(average, 2) %] [% part.unit %] [% LxERP.t8('per month') %]
([% LxERP.t8('in the time between') %] [% fromdate.to_kivitendo %] - [% todate.to_kivitendo %])
[%- L.button_tag("return \$('#detail_menu').dialog('close');", LxERP.t8('Close Details'), class => "submit") %]