@extends(niche_shell_layout()) @section('title', 'تعديل قيد - '.config('app.name')) @section('breadcrumb') الرئيسية › لوحة المحاسبة › القيود اليومية › تعديل قيد {{ $entry->id }} @endsection @section('content') @php $entryData = [ 'date' => $entry->date?->format('Y-m-d'), 'reference' => $entry->reference ?? '', 'description' => $entry->description ?? '', 'lines' => $entry->items->map(fn($i) => [ 'account_id' => (string) $i->account_id, 'description' => $i->description ?? '', 'cost_center' => $i->cost_center ?? '', 'debit' => (float) $i->debit, 'credit' => (float) $i->credit, ])->values()->all(), ]; $journalAccountSelectOptions = collect($accounts ?? [])->map(fn ($account) => [ 'v' => (string) $account->id, 'l' => trim((string) ($account->code ?? '').' - '.(string) ($account->name_ar ?? '')), ])->values()->all(); $journalAccountSelectOptions = array_merge([['v' => '', 'l' => 'اختر الحساب']], $journalAccountSelectOptions); $journalEditXDataConfig = [ 'initial' => $entryData, 'accountOptions' => $journalAccountSelectOptions, ]; @endphp
تحديث تفاصيل القيد وبنوده.