@php $journalStatus = isset($data->status) ? $data->status : 'DRAFT'; $isEditable = $journalStatus == 'DRAFT'; $detailJson = []; foreach ($details as $row) { $detailJson[] = [ 'account_id' => $row->account_id, 'description' => $row->description, 'debit' => number_format((float) $row->debit, 2, '.', ''), 'credit' => number_format((float) $row->credit, 2, '.', ''), ]; } @endphp