@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@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', __('lang_v1.additional_notes')) !!} {!! Form::textarea('note', $journal->note, ['class' => 'form-control', 'rows' => 3]); !!}
@for($i = 1; $i <= 10; $i++) @php $account_id = ''; $debit = ''; $credit = ''; $default_array = []; @endphp @if(isset($accounts_transactions[$i-1])) @php $account_id = $accounts_transactions[$i-1]['accounting_account_id']; $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']]; @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') @endsection