Lager->Berichte->Lagerentnahme: auch alle Lagerplätze eine Lagers wählen können
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 9 Nov 2018 14:00:27 +0000 (15:00 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 9 Nov 2018 14:02:51 +0000 (15:02 +0100)
siehe #333
"Bericht Lagerentnahme: Lagerplatz lässt sich nicht auswählen"

templates/webpages/common/select_warehouse_bin.html

index 3b916ca..ae9ef17 100644 (file)
       warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
       warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %];
       warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array();
+      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0] = new Array();
+      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['description'] = "---";
+      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][0]['id'] = "";
       [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
-      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count - 1 %]] = new Array();
-      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count - 1 %]]['description'] = "[% JavaScript.escape(bin.description) %]";
-      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count - 1 %]]['id'] = [% bin.id %];
+      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]] = new Array();
+      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['description'] = "[% JavaScript.escape(bin.description) %]";
+      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'][[% BINS_it.count %]]['id'] = [% bin.id %];
       [% END %]
       [% END %]