@using PantheonRA.BackOffice.Enums
@using PAW.Contracts.Enums;
@using PantheonRA.BackOffice.Models;
@model string

<div class="form-group">
    <label class="control-label">@Loc.TypeOfView</label>
    <select id="issuedBillsBillingTabList" class="form-control custom-select" onchange="onChangeIssuedBillingTab()">
        <option @(Model == IssuedBillsType.IssuedInvoicesBilling ? "selected" : string.Empty) data-url="@Url.Action("IssuedInvoicesBilling", "Reports")">@Loc.RetailReceivedBillsBilling</option>
        <option @(Model == IssuedBillsType.IssuedInvoicesBillingDiffInPrice ? "selected" : string.Empty) data-url="@Url.Action("IssuedInvoicesBillingDiffInPrice", "Reports")">@Loc.PriceDifferenceCalculation</option>
        <option @(Model == IssuedBillsType.TradeRecords ? "selected" : string.Empty) data-url="@Url.Action("TradeRecords", "Reports")">@Loc.TradeRecords</option>
        @if (PantheonRA.BackOffice.CurrentUser.Localization == Localization.Code.RS)
        {
            <option @(Model == IssuedBillsType.IssuedInvoicesBillingKEP ? "selected" : string.Empty) data-url="@Url.Action("IssuedInvoicesBillingKEP", "Reports")">@Loc.KEP</option>
        }
    </select>
</div>


<script>
    function onChangeIssuedBillingTab() {
        window.location = $("#issuedBillsBillingTabList option:selected").attr("data-url");
    }
</script>
