@extends('layouts.app') @section('title', __('accounting::lang.journal_entry')) @section('content') @include('accounting::layouts.nav')

@lang( 'accounting::lang.journal_entry' ) - {{$journal->ref_no}}

{!! Form::open(['url' => action([\Modules\Accounting\Http\Controllers\JournalEntryController::class, 'update'], $journal->id), 'method' => 'PUT', 'id' => 'journal_add_form']) !!} @component('components.widget', ['class' => 'box-primary'])
{!! Form::label('journal_date', __('accounting::lang.journal_date') . ':*') !!}
{!! Form::text('journal_date', @format_datetime($journal->operation_date), ['class' => 'form-control datetimepicker', 'readonly', 'required']); !!}
{!! Form::label('note', __('purchase.payment_note')) !!} {!! Form::textarea('note', $journal->note, ['class' => 'form-control', 'rows' => 3]); !!}
@php $row_count = count($accounts_transactions); @endphp @for($i = 1; $i <= $row_count; $i++) @php $account_id = ''; $debit = ''; $credit = ''; $default_array = []; $default_array1 = []; $rec_note = ''; @endphp @if(isset($accounts_transactions[$i-1])) @php $account_id = $accounts_transactions[$i-1]['accounting_account_id']; $location_id = $accounts_transactions[$i-1]['location_id']; $rec_note = $accounts_transactions[$i-1]['note']; $debit = ($accounts_transactions[$i-1]['type'] == 'debit') ? $accounts_transactions[$i-1]['amount'] : ''; $credit = ($accounts_transactions[$i-1]['type'] == 'credit') ? $accounts_transactions[$i-1]['amount'] : ''; $default_array = [$account_id => $accounts_transactions[$i-1]['account']['name'] ?? ""]; $default_array1 = [$location_id => $accounts_transactions[$i-1]['location']['name'] ?? ""]; @endphp {!! Form::hidden('accounts_transactions_id[' . $i . ']', $accounts_transactions[$i-1]['id']); !!} @endif @endfor
@endcomponent {!! Form::close() !!}
@stop @section('javascript') @include('accounting::accounting.common_js') @section('javascript') @include('accounting::accounting.common_js') @endsection