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

@{
    Layout = null;
    var isLocBG = (PantheonRA.BackOffice.CurrentUser.Localization == PAW.Contracts.Enums.Localization.Code.BG);
}

@Html.Hidden("OurCompIsName2", Model.Filter.OurCompIsName2)

<div class="document-list">
    <table id="issuedBillsChronologicallyByCopiesGrid" data-grid-id="issued-bills-fiscal" class="list-table" data-url="@Url.Action("IssuedBillsChronologicallyByCopiesWithFiscData", "Reports")">
        <thead>
            <tr>
                <th>@Loc.FiscNumber</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 data-visible="@(isLocBG ? true : false)" 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.Date</th>
                <th>@Loc.CopyNumber</th>
                <th>@Loc.DateOfIssue</th>
                <th data-url="@Url.Action("Edit", "Subjects")" data-visible="@(Model.Filter.OurCompIsName2 == false ? true : false)">@Loc.Buyer</th>
                <th data-url="@Url.Action("Edit", "Subjects")" data-visible="@(Model.Filter.OurCompIsName2 == true ? true : false)">@Loc.Buyer</th>
                <th class="dt-head-right">@Loc.Net</th>
                <th class="dt-head-right">@Loc.TotalTax</th>
                <th class="dt-head-right">@Loc.Value</th>
            </tr>
        </thead>
    </table>
</div>

<div class="row document-footer document-footer-sm">
    <div class="col-xs-9">
        <div class="form-group">
            <span class="pull-left"><span>@Loc.NumberOfInvoices:</span> <b class="grid-data-total-items"></b></span>
            <span class="pull-right"><span>@Loc.VAT:</span> <b id="grid-data-vat-sum"></b></span>
            <span class="pull-right m-r-md"><span>@Loc.Total:</span> <b id="grid-data-total-sum"></b></span>
        </div>
    </div>
    <div class="col-xs-3 document-head-highlight-input">
        <div class="form-group text-right">
            <span>@Loc.TotalWithTax:</span> <label id="grid-data-vat-total-sum"></label>
        </div>
    </div>
</div>

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