ultimatepos/Modules/Accounting/Resources/views/layouts/nav.blade.php

80 lines
6.4 KiB
PHP

<section class="no-print">
@include('accounting::layouts.date_helpers')
<nav class="navbar navbar-default bg-white m-4">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{action([\Modules\Accounting\Http\Controllers\AccountingController::class, 'dashboard'])}}"><i class="fas fa fa-broadcast-tower"></i> {{__('accounting::lang.accounting')}}</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
@if(auth()->user()->can('accounting.manage_accounts'))
<li @if(request()->segment(2) == 'chart-of-accounts') class="active" @endif><a href="{{action([\Modules\Accounting\Http\Controllers\CoaController::class, 'index'])}}">@lang('accounting::lang.chart_of_accounts')</a></li>
@endif
@if(auth()->user()->can('accounting.view_journal'))
<li @if(request()->segment(2) == 'journal-entry') class="active" @endif><a href="{{action([\Modules\Accounting\Http\Controllers\JournalEntryController::class, 'index'])}}">@lang('accounting::lang.journal_entry')</a></li>
@endif
@if(auth()->user()->can('accounting.view_transfer'))
<li @if(request()->segment(2) == 'transfer') class="active" @endif>
<a href="{{action([\Modules\Accounting\Http\Controllers\TransferController::class, 'index'])}}">
@lang('accounting::lang.transfer')
</a>
</li>
@endif
<li @if(request()->segment(2) == 'transactions') class="active" @endif><a href="{{action([\Modules\Accounting\Http\Controllers\TransactionController::class, 'index'])}}">@lang('accounting::lang.transactions')</a></li>
@if(auth()->user()->can('accounting.manage_budget'))
<li @if(request()->segment(2) == 'budget') class="active" @endif>
<a href="{{action([\Modules\Accounting\Http\Controllers\BudgetController::class, 'index'])}}">
@lang('accounting::lang.budget')
</a>
</li>
@endif
@if(auth()->user()->can('accounting.view_reports'))
<li @if(request()->segment(2) == 'reports') class="active" @endif><a href="{{action([\Modules\Accounting\Http\Controllers\ReportController::class, 'index'])}}">
@lang('accounting::lang.reports')
</a></li>
<li @if(request()->segment(3) == 'cheques') class="active" @endif><a href="{{ route('accounting.chequeReport') }}">@lang('accounting::lang.cheque_report')</a></li>
@endif
@if(auth()->user()->can('accounting.manage_accounts'))
<li class="dropdown @if(in_array(request()->segment(2), ['fiscal-periods','cheques','installments','depreciation','reconciliations','consolidation','health','bank-loans','insurance','payroll-tax-table','exchange-rates'])) active @endif">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">@lang('accounting::lang.holding_tools') <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ route('accounting.health') }}">@lang('accounting::lang.accounting_health')</a></li>
<li><a href="{{ route('accounting.fiscalPeriods') }}">@lang('accounting::lang.fiscal_periods')</a></li>
<li><a href="{{ route('accounting.openingBalance') }}">@lang('accounting::lang.opening_balance')</a></li>
<li><a href="{{ route('accounting.cheques') }}">@lang('accounting::lang.cheques')</a></li>
<li><a href="{{ route('accounting.installments') }}">@lang('accounting::lang.installments')</a></li>
<li><a href="{{ route('accounting.bankLoans') }}">@lang('accounting::lang.bank_loans')</a></li>
<li><a href="{{ route('accounting.insurance') }}">@lang('accounting::lang.insurance_premiums')</a></li>
<li><a href="{{ route('accounting.payrollTaxTable') }}">@lang('accounting::lang.payroll_tax_table')</a></li>
<li><a href="{{ route('accounting.depreciation') }}">@lang('accounting::lang.depreciation')</a></li>
<li><a href="{{ route('accounting.reconciliations') }}">@lang('accounting::lang.bank_reconciliation')</a></li>
<li><a href="{{ route('accounting.deferredDocuments') }}">@lang('accounting::lang.deferred_documents')</a></li>
<li><a href="{{ route('accounting.consolidation') }}">@lang('accounting::lang.consolidation')</a></li>
<li><a href="{{ route('accounting.exchangeRates') }}">@lang('accounting::lang.exchange_rates')</a></li>
<li><a href="{{ route('accounting.analyticalDimensions') }}">@lang('accounting::lang.analytical_dimensions')</a></li>
<li><a href="{{ route('accounting.journalApprovals') }}">@lang('accounting::lang.journal_approvals')</a></li>
</ul>
</li>
@endif
<li @if(request()->segment(2) == 'settings') class="active" @endif><a href="{{action([\Modules\Accounting\Http\Controllers\SettingsController::class, 'index'])}}">@lang('messages.settings')</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</section>