@model PantheonRA.BackOffice.Models.SetItemCreateViewModel

<div class="wrapper wrapper-content">
    <div class="tabs-container">
        <div class="tab-content">
            <div class="row document-head">
                <div class="col-md-4 col-xs-6">
                    <div class="form-group">
                        @Html.Hidden("Ident", Model.ProductEditData.Id)
                        @Html.Hidden("SelectedSerialNo", Model.SerialNo)
                        <label class="control-label">@Loc.ProductSnColumns</label>
                        @Html.DropDownListFor(model => model.SerialNo, Model.SnColumns, new { @class = "form-control custom-select" })
                    </div>
                </div>
                <div class="col-md-3 col-xs-6 @(Model.SerialNo != "N" && Model.SerialNo != "S" ? "" : "hidden")" id="columnContainer">
                    <div class="form-group">
                        @Html.Hidden("SelectedColumn", Model.Column)
                        <label class="control-label">@Loc.SerialNumberTemplate</label>
                        @Html.DropDownListFor(model => model.Column, Model.SetItemSnt, "", new { @class = "form-control custom-select" })
                    </div>
                </div>
                <div class="col-md-2 col-xs-6 otherDataContainer @(Model.SerialNo != "N" ? "" : "hidden")">
                    <div class="form-group">
                        @Html.Hidden("SelectedDateDue", Model.DateDue)
                        <label class="control-label">@Loc.StockDateDue</label>
                        <div class="selectpicker-container m-t-xs">
                            @Html.CheckBoxFor(model => model.DateDue, new { @class = "form-control js-switch col-xs-12" })
                        </div>
                    </div>
                </div>
                <div class="col-md-2 col-xs-6 otherDataContainer @(Model.SerialNo != "N" ? "" : "hidden")">
                    <div class="form-group">
                        <label class="control-label col-md-12">@Loc.NumberFilter</label>
                        <div class="col-md-4 m-r-n">
                            @Html.TextBoxFor(model => model.MonthDue, new { @class = "form-control border-bottom text-center", @placeholder = Loc.Nr })
                        </div>
                        <div class="col-md-7 m-l-n">
                            @Html.DropDownListFor(model => model.SerialnoDueType, new List<SelectListItem>
                            {
                               new SelectListItem{ Text=Loc.DaysCL, Value = "D" },
                               new SelectListItem{ Text=Loc.Weeks, Value = "W" },
                               new SelectListItem{ Text=Loc.MonthsFilter, Value = "M" },
                               new SelectListItem{ Text=Loc.YearsFilter, Value = "Y" }
                            }, new { @class = "form-control custom-select col-md-8 m-l-xs" })
                        </div>
                    </div>
                </div>
            </div>

            <div class="project-list">
                <div class="document-list">
                    <table id="grid-data" data-grid-id="productSerialNumbers" data-url="@Url.Action("SerialNumbersList", "Products")" class="list-table">
                        <thead>
                            <tr>
                                <th width="26%">@Loc.Warehouse</th>
                                <th width="20%">@Loc.SerialNumber</th>
                                <th width="6%" class="dt-head-center">@Loc.Free</th>
                                <th width="12%" class="dt-right">@Loc.Stock</th>
                                <th width="12%" class="dt-right">@Loc.StockReserved</th>
                                <th width="12%" class="dt-right">@Loc.StockFree</th>
                                <th width="12%">@Loc.StockDateDue</th>
                            </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<input id="CannotChangeSerialNumbersManagmentLoc" value="@Loc.CannotChangeSerialNumbersManagmentStockExists" type="hidden" />
<input id="SaveSerialNumbersDataUrl" value="@Url.Action("SaveSerialNumbersData", "Products")" hidden />
<input id="SetItemHasStockUrl" value="@Url.Action("SetItemHasStock", "Products")" hidden />
<input id="SerialNoStatusRecalcUrl" value="@Url.Action("SerialNoStatusRecalc", "Products")" hidden />
<input id="RecoveryCompleteLoc" value="@Loc.RecoveryComplete" hidden />

<script>
    $(document).ready(function () {
        initializeProductSerialNumbersList();
    });
</script>