@extends('accounting.layout') @section('accounting_content') @php $reportColumns=[ 'Daily Cash Control'=>[ [['/accounting/cash-flow','Cash Flow Movement','accounting.treasury_view','accounting'],['/accounting/bank-deposits','Bank Deposits','accounting.treasury_view','accounting'],['/accounting/cash-transfers','Cash Transfers','accounting.treasury_view','accounting']], [['/till-collections','Till Collections','till_collections.view_all|till_collections.view_own','till-collections']], [['/reports?report=end_shift','Z Report','reports.sales','reports']], [['/z-reports','Z Reports','z_reports.view_all|z_reports.view_own|sales.end_day_report','z-reports']], [['/z-reports/combined','Combined Z Report','z_reports.view_all|sales.end_day_report','z-reports']], [['/shift-management','Shift Management','shifts.view','shift-management']], [['/reports?report=sales_by_payment','Sales by Payment Method','reports.sales','reports']], [['/expenses','Expenses Register','expenses.view','expenses']], ], 'Receivables'=>[ [['/reports?report=uncleared_bills','Unpaid Invoices Report','reports.sales','reports']], [['/sales?payment_status=pending','Pending Sales / Bills','sales.view_all|sales.view_own','sales']], [['/invoices','Outstanding Invoices','invoices.view_all|invoices.view_own','invoices']], ], 'Payables & Purchases'=>[ [['/purchases','Purchases Register','purchases.view_all|purchases.view_own','purchases']], [['/reports?report=purchases_by_supplier','Purchases by Supplier','reports.suppliers','reports']], [['/reports?report=purchases_by_payment','Supplier Payments by Method','reports.purchases','reports']], ], 'Management Reports'=>[ [['/reports?report=sales_summary','Sales Summary','reports.sales','reports']], [['/reports?report=sales_by_product','Sales by Product','reports.sales','reports'],['/reports?report=stock_movement','Stock Movement','reports.inventory','reports']], [['/reports?report=sales_by_person','Sales by Salesperson','reports.users','reports']], [['/inventory/stock-value','Stock Value Report','inventory.stock_value','inventory']], [['/inventory/opening-closing-stock','Opening and Closing Stock Report','inventory.opening_closing','inventory']], ], 'Ledger Reports'=>[ [['/accounts','Chart of Accounts','accounts.view','accounting']], [['/accounting/general-ledger','General Ledger','accounting.general_ledger','accounting']], [['/accounting/profit-loss','Profit & Loss / Income Statement','accounting.profit_loss','accounting']], [['/accounting/balance-sheet','Balance Sheet','accounting.balance_sheet','accounting']], [['/accounting/trial-balance','Trial Balance','accounting.trial_balance','accounting']], ], 'Audit & Compliance'=>[ [['/accounting/audit-trail','Activity Logs','accounting.audit_trail','accounting']], [['/accounting/audit-trail?module=sales','Void / Cancelled Items Audit','accounting.audit_trail','accounting']], [['/accounting/audit-trail?search=deleted','Deleted Transactions Audit','accounting.audit_trail','accounting']], [['/accounting/vat-report','VAT Report','accounting.vat_report','accounting']], ], ]; if(\App\Services\WithholdingService::enabled())$reportColumns['Audit & Compliance'][]=[['/accounting/withholding','Withholding Tax','accounting.withholding_view','accounting']]; @endphp

Accounting

@if(auth()->user()->hasPermission('accounts.view'))Chart of Accounts@endif @if(auth()->user()->hasPermission('payment_methods.view'))Payment Methods@endif @if(auth()->user()->hasPermission('tax_rates.view'))Tax / VAT Settings@endif
@foreach($reportColumns as $heading=>$rows) @php($visibleLinks=collect($rows)->flatten(1)->filter(fn($link)=>auth()->user()->canAccessModule($link[3])&&auth()->user()->hasAnyPermission(explode('|',$link[2])))) @if($visibleLinks->isNotEmpty())

{{ $heading }}

@foreach($visibleLinks as [$href,$label]){{ $label }}@endforeach
@endif @endforeach
@endsection