@if (!PantheonRA.BackOffice.CurrentUser.HasGranules() && PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.WHOLESALE))
{
    <li data-list-item-id="Wholesale"
        class="dropdown @Html.IsSelected("Index", "Wholesale") @Html.IsSelected("Edit", "Wholesale") @Html.IsSelected("Create", "Wholesale")
                    @Html.IsSelected("OpenItems", "Wholesale") @Html.IsSelected("IssuedBillsBilling", "Wholesale") @Html.IsSelected("CreateReceivingAdvancePayment", "AdvancePayment")
                    @Html.IsSelected("ReceivedAdvancePayments", "Wholesale") @Html.IsSelected("EditReceivingAdvancePayment", "AdvancePayment") @Html.IsSelected("Index", "Move")">
        <a href="@Url.Action("Create", "Wholesale")">
            <i class="fas fa-truck-container"></i> <span class="nav-label">@Loc.WholesaleNavMenu</span>
        </a>
        <ul class="dropdown-menu dropdown-menu-right">
            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.WHOLESALE))
            {
                <li><a href="@Url.Action("Create", "Wholesale")">@Loc.NewWholesaleInvoice.SetMenuNameLength()</a></li>
            }
            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.WHOLESALE))
            {
                <li><a href="@Url.Action("Index", "Wholesale")">@Loc.InvoiceList.SetMenuNameLength()</a></li>
            }
            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.RECEIVED_ADVANCE_PAYMENTS))
            {
                <li><a href="@Url.Action("CreateReceivingAdvancePayment", "AdvancePayment")">@Loc.NewReceivingAdvancePayment.SetMenuNameLength()</a></li>
            }
            @if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.RECEIVED_ADVANCE_PAYMENTS))
            {
                <li><a href="@Url.Action("ReceivedAdvancePayments", "Wholesale")">@Loc.AdvancePaymentsList.SetMenuNameLength()</a></li>
            }
            @*@if (PantheonRA.BackOffice.CurrentUser.CanAccess(PantheonRA.WebApi.Contracts.Enums.Permissions.WHOLESALE_REPORTS))
        {
            <li><a href="@Url.Action("OpenItems", "Wholesale")">@Loc.OpenItems</a></li>
        }*@
        </ul>
    </li>
}