@extends(niche_shell_layout()) @section('title', niche_label('finance.expense', 'المصروفات').' - '.config('app.name')) @push('styles') @endpush @section('breadcrumb') الرئيسية › المحاسبة › المصروفات @endsection @section('content') @php $expenseIdxSupplierOpts = collect($suppliers ?? [])->map(fn ($s) => [ 'value' => $s->id, 'label' => (string) ($s->localized_display_name ?? $s->name_ar ?? $s->name ?? ''), ])->values()->all(); $expenseIdxAccountOpts = collect($filterExpenseAccounts ?? [])->map(fn ($a) => [ 'value' => $a->id, 'label' => trim((string) ($a->code ?? '').' — '.(string) ($a->name_ar ?? $a->name_en ?? '')), ])->values()->all(); $expenseIdxCcOpts = collect($filterCostCenters ?? [])->map(fn ($c) => [ 'value' => $c->id, 'label' => trim((string) ($c->code ?? '').' — '.(string) ($c->name_ar ?? $c->name ?? '')), ])->values()->all(); @endphp
إدارة طلبات المصروفات والتعويضات
{{ number_format($expenseSummary['count'] ?? 0) }}
مجموع المبلغ (قبل الضريبة)
{{ number_format($expenseSummary['sum_amount'] ?? 0, 2) }}
{{ number_format($expenseSummary['sum_tax'] ?? 0, 2) }}
{{ number_format($expenseSummary['sum_grand'] ?? 0, 2) }}
| رقم المصروف | التاريخ | التصنيف | المبلغ |
|
||||||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $expense->expense_number ?? ('EXP-'.str_pad((string) $expense->id, 5, '0', STR_PAD_LEFT)) }} | {{ $expense->date?->format('Y-m-d') ?? '-' }} | {{ $expense->supplier?->localized_display_name ?? '—' }} | {{ $expense->expenseCategory?->name_ar ?? ($expense->expenseAccount?->name_ar ?? '—') }} | {{ $expense->reference !== null && $expense->reference !== '' ? $expense->reference : '—' }} |
@php $notesText = $expense->notes !== null && $expense->notes !== '' ? $expense->notes : '—'; @endphp
{{ $notesText }} |
{{ number_format((float) $expense->amount, 2) }} | {{ number_format($tax, 2) }} | {{ number_format($lineTotal, 2) }} | @if($posted) معتمد @else مسودة @endif |
@php
$expenseMenuId = 'expense-actions-'.$expense->id;
$showPdf = $posted;
$showApprove = ! $posted && $isManagerOrAdmin;
$showEditDraft = ! $posted;
$showDeleteDraft = ! $posted && \App\Support\ErpRoles::canDeleteExpenseDraft($u);
$showBackToDraftApproved = $posted && \App\Support\ErpRoles::canRevertApprovedExpenseToDraft($u);
$showHardDeleteApproved = $posted && \App\Support\ErpRoles::canHardDeleteApprovedExpense($u);
$showAnyDelete = $showDeleteDraft || $showHardDeleteApproved;
@endphp
|
| لا توجد بيانات | ||||||||||