@using PAW.Contracts.Enums
@if (!PantheonRA.BackOffice.CurrentUser.HasGranules() && PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.REPORTS))
{
    <li data-list-item-id="Reports"
        class="dropdown @Html.IsSelected("IssuedBills", "Reports") @Html.IsSelected("ReceivedCashDocuments", "Reports")
            @Html.IsSelected("Packaging", "Reports") @Html.IsSelected("Stock", "Reports") @Html.IsSelected("IssuedInvoicesBilling", "Reports")
            @Html.IsSelected("IssuedInvoicesBillingDiffInPrice", "Reports") @Html.IsSelected("IssuedInvoicesBillingKEP", "Reports") @Html.IsSelected("TradeRecords", "Reports")
            @Html.IsSelected("Index", "AccountCard") @Html.IsSelected("Index", "DebtStructures") @Html.IsSelected("Index", "OutstandingItems") @Html.IsSelected("Balances", "Reports")">
        <a href="@Url.Action("Stock", "Reports")">
            <i class="fas fa-cabinet-filing"></i> <span class="nav-label">@Loc.ReportsNavMenu</span>
        </a>
        <ul class="dropdown-menu dropdown-menu-right dropdown-menu-top">
            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.REPORTS))
            {
                <li><a href="@Url.Action("Stock", "Reports")">@Loc.Stock.SetMenuNameLength()</a></li>
            }
            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.REPORTS))
            {
                <li><a href="@Url.Action("IssuedInvoicesBilling", "Reports")">@Loc.RetailReceivedBillsBilling.SetMenuNameLength()</a></li>
            }
            @*@if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.WHOLESALE_REPORTS))
            {
                <li><a href="@Url.Action("ReceivedCashDocuments", "Reports")">@Loc.CashRegisterJournals</a></li>
            }*@
            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.REPORTS_PACKAGING)
                && PantheonRA.BackOffice.CurrentUser.Localization == Localization.Code.SI)
            {
                <li><a href="@Url.Action("Packaging", "Reports")">@Loc.Packaging.SetMenuNameLength()</a></li>
            }

            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.OUTSTANDING_ITEMS))
            {
                <li><a href="@Url.Action("Index","OutstandingItems")">@Loc.OpenItems.SetMenuNameLength()</a></li>
            }

            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.OUTSTANDING_ITEMS))
            {
                <li><a href="@Url.Action("Index","DebtStructures")">@Loc.DebtStructures.SetMenuNameLength()</a></li>
            }
            <li><a href="@Url.Action("Index","AccountCard")">@Loc.AccountCard.SetMenuNameLength()</a></li>
            <li><a href="@Url.Action("Balances","Reports")">@Loc.Balances.SetMenuNameLength()</a></li>
        </ul>
    </li>
}