@extends('layouts.app') @section('title', 'المحاسبة - DOTS HR Pro') @push('styles') @endpush @section('content') @php $entries = $entries ?? collect(); $stats = $stats ?? []; $payrollRuns = $payrollRuns ?? collect(); $statusLabels = ['draft'=>'مسودة','posted'=>'مرحّل','exported'=>'مصدّر']; $statusBadges = ['draft'=>'badge-warning','posted'=>'badge-success','exported'=>'badge-info']; $sourceLabels = ['payroll'=>'رواتب','loan'=>'سلف','expense'=>'مصروفات','eos'=>'نهاية خدمة','manual'=>'يدوي']; $draftEntries = $entries->where('status', 'draft'); $postedEntries = $entries->where('status', 'posted'); $exportedEntries = $entries->where('status', 'exported'); @endphp @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
{{ $stats['total'] ?? 0 }}
إجمالي القيود
{{ $stats['draft'] ?? 0 }}
مسودات
{{ $stats['posted'] ?? 0 }}
مرحّلة
{{ $stats['exported'] ?? 0 }}
مصدّرة
@if($entries->count() > 0)
@foreach($entries as $entry) @endforeach
# رقم المرجع الوصف المصدر مدين دائن التاريخ الحالة الإجراءات
{{ $entry->id }} {{ $entry->reference_number ?? '-' }} {{ $entry->description ?? '-' }} {{ $sourceLabels[$entry->source ?? ''] ?? ($entry->source ?? '-') }} {{ number_format($entry->total_debit ?? 0, 2) }} {{ number_format($entry->total_credit ?? 0, 2) }} {{ $entry->entry_date ?? '-' }} {{ $statusLabels[$entry->status ?? ''] ?? ($entry->status ?? '-') }}
@if($entry->status !== 'exported') @endif
@if(method_exists($entries, 'links'))
{{ $entries->links() }}
@endif @else

لا توجد قيود محاسبية

استخدم زر "توليد قيد من الرواتب" لإنشاء قيود تلقائياً من مسيرات الرواتب

@endif
{{-- Modal: Total Entries --}} {{-- Modal: Draft Entries --}} {{-- Modal: Posted Entries --}} {{-- Modal: Exported Entries --}} {{-- Modal: Generate Entry from Payroll --}}

توليد قيد من مسيّر الرواتب

@if($payrollRuns->count())
@csrf

اختر مسيّر الرواتب لتوليد القيد المحاسبي تلقائياً:

@else

لا توجد مسيّرات رواتب. قم بمعالجة الرواتب أولاً.

@endif
@endsection