X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fdo%2Fstock_in_form.html;h=f371de1a39cfc41252ef4f88be23926fe46b9be3;hb=267826b1f494c28fd0f5c260df22b3139156f4d5;hp=27457f310b9c9421739190dae90340e7aa8e7eec;hpb=fa47048f29df0579fd47ae3faad1b898a6b41028;p=kivitendo-erp.git diff --git a/templates/webpages/do/stock_in_form.html b/templates/webpages/do/stock_in_form.html index 27457f310..f371de1a3 100644 --- a/templates/webpages/do/stock_in_form.html +++ b/templates/webpages/do/stock_in_form.html @@ -29,13 +29,21 @@ } $(function(){ + var bin_id_index = 0; + var warehouse_id_index = 0; [%- USE STOCK_INFO_it = Iterator(STOCK_INFO) %][%- FOREACH si = STOCK_INFO_it %] // new si for wh [% si.warehouse_id %] bin [% si.bin_id %] [%- SET warehouse_selected = '0' %] [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH wh = WAREHOUSES_it %] // wh [% wh.id %] + [% IF HTML.escape(PART_INFO.warehouse_id) == wh.id %] + warehouse_id_index = [% WAREHOUSES_it.count - 1%]; + [% END %] [%- USE BINS_it = Iterator(wh.BINS) %][%- FOREACH bin = BINS_it %] // bin [% bin.id %] + [% IF HTML.escape(PART_INFO.bin_id) == bin.id %] + bin_id_index = [% BINS_it.count - 1%]; + [% END %] [%- IF bin.id == si.bin_id %] warehouse_selected([% STOCK_INFO_it.count %], [% WAREHOUSES_it.count - 1 %], [% BINS_it.count - 1%]); [%- SET warehouse_selected = '1' %] @@ -43,7 +51,7 @@ [%- END %] [%- END %] [%- UNLESS warehouse_selected %] - warehouse_selected([% STOCK_INFO_it.count %], 0); + warehouse_selected([% STOCK_INFO_it.count %], warehouse_id_index, bin_id_index); [%- END %] [%- END %] }); @@ -93,7 +101,7 @@ [% 'Warehouse' | $T8 %] [% 'Bin' | $T8 %] [% 'Charge Number' | $T8 %] - [% IF conf_show_best_before %] + [% IF INSTANCE_CONF.get_show_bestbefore %] [% 'Best Before' | $T8 %] [% END %] [% 'Qty' | $T8 %] @@ -109,7 +117,7 @@ [% HTML.escape(row.warehouse_description) %] [% HTML.escape(row.bin_description) %] [% HTML.escape(row.chargenumber) %] - [% IF conf_show_best_before %] + [% IF INSTANCE_CONF.get_show_bestbefore %] [% HTML.escape(row.bestbefore) %] [% END %] [% HTML.escape(LxERP.format_amount(row.qty)) %] @@ -120,14 +128,14 @@ - [% IF conf_show_best_before %] + [% IF INSTANCE_CONF.get_show_bestbefore %] [% L.date_tag('bestbefore_'_ loop.count, row.bestbefore) %]