@extends('admin.layouts.master') @section('css') @endsection @section('title') تعديل خزنة @endsection @section('content') @php $statusChecked = (bool) old('status', (bool)$treasury->status); $isMasterChecked = (bool) old('is_master', (bool)$treasury->is_master); $defaultDate = old('date', optional($treasury->date)->format('Y-m-d') ?? now()->timezone('Africa/Cairo')->toDateString()); $updatedAt = $treasury->updated_at?->copy()->timezone('Africa/Cairo'); $period = $updatedAt ? ($updatedAt->format('H') < 12 ? 'صباحًا' : 'مساءً') : null; @endphp
@include('admin.Alerts')
{{-- Header --}}

تعديل خزنة

تخص هذه الخزنة حساب: {{ auth()->user()->name }}
@if(!empty($treasury->updated_by))
آخر تعديل بواسطة: {{ $treasury->updated_by }}
@endif
{{ $treasury->name }}
{{-- Body --}}
@csrf @method('PUT')
{{-- Name --}}
@error('name')
{{ $message }}
@enderror
{{-- Date --}}
@error('date')
{{ $message }}
@enderror
{{-- Is Master --}}
{{ $isMasterChecked ? 'رئيسية' : 'فرعية' }}
اجعلها “رئيسية” لو دي الخزنة الأساسية للنظام.
{{-- Status --}}
{{ $statusChecked ? 'مفعل' : 'غير مفعل' }}
{{-- Receipts (readonly) --}}
{{-- Linked Account (readonly) --}}
@if($treasury->account_id && $treasury->account)
الحساب المحاسبي المرتبط بالخزنة: {{ $treasury->account->name }} @if($treasury->account->account_number) ({{ $treasury->account->account_number }}) @endif
مرتبط تلقائيًا
@else
هذه الخزنة غير مربوطة بحساب محاسبي.
سيتم إنشاء الحساب وربطه تلقائيًا بمجرد حفظ التعديلات.
@endif
{{-- Meta --}}
آخر تحديث: {{ $updatedAt ? $updatedAt->translatedFormat('d F Y - h:i') . ' ' . $period : '—' }}
@if(!empty($treasury->updated_by) && $updatedAt)
تم التعديل بواسطة: {{ $treasury->updated_by }}
@endif
{{-- Actions --}}
رجوع
@endsection @section('js') @endsection