@model PantheonRA.BackOffice.Models.Reports.IssuedBillsListViewModel<PantheonRA.BackOffice.Models.Reports.ReceivedDocumentsFilter>

<div class="row buttons-ribbon floating-buttons">
    <div class="col-xs-12">
        <a id="downloadIssuedBills" class="btn btn-primary pull-right">
            <i class="attachment-icon" title="@Loc.ExportToExcel"></i><span class="bold visible-lg-inline visible-md-inline m-l-xs">@Loc.Export</span>
        </a>
    </div>
</div>

<div>
    <div class="row">
        <div class="col-md-12">
            <div class="ibox search-box form-box">
                <div class="ibox-content">
                    <div class="row form-horizontal">
                        <div class="col-lg-9 col-md-12">
                            <div class="row">
                                <div class="col-md-3">
                                    <div class="m-b">
                                        @Html.LabelFor(model => model.Filter.DateFrom, Loc.From, new { @class = "control-label" })
                                        @Html.TextBoxFor(m => m.Filter.DateFrom, "{0:dd.MM.yyyy}", new { @class = "form-control datepicker input-horizontal-small-label pull-right" })
                                    </div>
                                    <div class="m-b">
                                        @Html.LabelFor(model => model.Filter.DateTo, Loc.To, new { @class = "control-label" })
                                        @Html.TextBoxFor(m => m.Filter.DateTo, "{0:dd.MM.yyyy}", new { @class = "form-control datepicker input-horizontal-small-label pull-right" })
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="m-b-xs">
                                        <input type="hidden" id="documentTypePlaceholder" value="@Loc.DocType" />
                                        <select id="@Html.IdFor(m => m.Filter.DocType)" class="form-control">
                                            <option></option>
                                            @foreach (var option in Model.AcDocTypes)
                                            {
                                                <option value="@option.Value">@option.Text</option>
                                            }
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="m-b-xs">
                                        <input type="hidden" id="userPlaceholder" value="@Loc.User" />
                                        <select id="@Html.IdFor(m => m.Filter.UserId)" class="form-control" data-url="@Url.Action("UsersPicker", "Reports")">
                                            <option></option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-lg-2 col-md-3 hidden-sm hidden-xs"></div>
                                <div class="col-md-6">
                                    <div class="m-b-xs">
                                        <input type="hidden" id="partnerPlaceholder" value="@Loc.Partner" />
                                        <select id="@Html.IdFor(m=>m.Filter.PartnerId)" class="form-control" data-url="@Url.Action("SubjectsPicker", "Reports")">
                                            <option></option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title"></div>
                <div class="ibox-content">
                    <div class="project-list">
                        <div class="document-list">
                            <table id="grid-data" data-grid-id="received-documents" data-url="@Url.Action("ReceivedDocumentsData", "Reports")" class="list-table">
                                <thead>
                                    <tr>
                                        <th data-column-id="InvoiceRef" data-formatter="InvoiceRef" data-sortable="false">@Loc.InvoiceRef</th>
                                        <th data-column-id="DocType" data-sortable="false">@Loc.DocType</th>
                                        <th data-column-id="IssuedDate" data-sortable="false" data-width="12%">@Loc.Date</th>
                                        <th data-column-id="PartnerName" data-sortable="false" data-width="30%">@Loc.Partner</th>
                                        <th data-column-id="User" data-sortable="false" data-width="20%">@Loc.User</th>
                                        <th data-column-id="TotalAmount" data-sortable="false" data-type="numeric" data-headeralign="right" data-align="right">@Loc.Total</th>
                                        <th data-column-id="TotalTax" data-sortable="false" data-type="numeric" data-headeralign="right" data-align="right" data-converter="decimalComma">@Loc.TotalTax</th>
                                        <th data-column-id="TotalAmountWithTax" data-sortable="false" data-type="numeric" data-headeralign="right" data-align="right" data-converter="decimalComma" data-width="7%">@Loc.TotalWithTax</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<input id="ExportUrl" type="hidden" value="@Url.Action("ReceivedDocumentsExport", "Reports")" />