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

@{
    ViewBag.Title = Loc.IssuedBillsSummary;
    Layout = null;
}

<div id="fiscalizedFilterWrapper" class="m-b-xs">
    <select id="@Html.IdFor(m=>m.Filter.Fiscalized)" class="form-control">
        <option>@Loc.BothFiscalizedAndNotFiscalized</option>
        <option value="true">@Loc.FiscalizedOnly</option>
        <option value="false">@Loc.NotFiscalizedOnly</option>
    </select>
</div>

<div class="document-list">
    <table id="grid-data" data-grid-id="issued-bills-summary" data-url="@Url.Action("IssuedBillsSummaryData", "Reports")" class="list-table">
        <thead>
            <tr>
                <th class="dt-head-center"><input type="checkbox" onclick="selectAllSummary(this);"></th>
                <th>@Loc.Fiscalized</th>
                <th data-url="@Url.Action("PrintPreview", "CashRegister")?returnUrl=@(Url.Action("IssuedBills", "CashRegister"))&id="
                    data-url-1="@Url.Action("Edit", "Wholesale")?returnUrl=@(Url.Action("IssuedBillsBilling", "Wholesale"))&id=">
                    @Loc.InvoiceRef
                </th>
                <th>@Loc.DocTypeShort</th>
                <th>@Loc.IssuedDate</th>
                <th>@Loc.Partner</th>
                <th class="dt-head-right">@Loc.Total</th>
                <th class="dt-head-right">@Loc.TotalTax</th>
                <th class="dt-head-right">@Loc.TotalWithTax</th>
            </tr>
        </thead>
    </table>
</div>

<div class="flat well" style="padding-right:10px;">
    <div class="row text-left">
        <div class="col-md-4">
            <strong>@Loc.Selected <span class="grid-data-selected-items-count"></span> @Loc.From.ToLower() <span class="grid-data-total-items"></span> </strong>
        </div>
        <div class="col-md-8 text-right">
            <strong>@Loc.Total.ToUpper() (<span class="grid-data-start-items"></span> @Loc.To.ToLower() <span class="grid-data-total-items"></span>): </strong><span id="grid-data-total-sum"></span>&nbsp;
            <strong>@Loc.VAT (<span class="grid-data-start-items"></span> @Loc.To.ToLower() <span class="grid-data-total-items"></span>): </strong><span id="grid-data-vat-sum"></span>&nbsp;
            <strong>@Loc.TotalWithTax (<span class="grid-data-start-items"></span> @Loc.To.ToLower() <span class="grid-data-total-items"></span>): </strong><span id="grid-data-vat-total-sum"></span>
        </div>
    </div>
</div>

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