@extends('layouts.app') @section('title', __('accounting-reports::lang.add_cheque_entry')) @section('content')

@lang('accounting-reports::lang.add_cheque_entry')

{!! Form::open(['url' => route('accounting-reports.cheque-book.store'), 'method' => 'post', 'id' => 'add_cheque_entry_form']) !!}

@lang('accounting-reports::lang.cheque_entry_details')

{!! Form::label('account_id', __('accounting-reports::lang.bank_account') . ':*') !!} {!! Form::select('account_id', $accounts ?? ['' => __('messages.please_select')], $selectedAccountId ?? null, ['class' => 'form-control select2', 'required', 'placeholder' => __('messages.please_select'), 'style' => 'width:100%', 'id' => 'account_id']) !!}
{!! Form::label('cheque_no', __('accounting-reports::lang.cheque_no') . ':*') !!} @php $preSelectedChequeNo = $selectedChequeNo ?? null; @endphp @if($preSelectedChequeNo) {!! Form::text('cheque_no', $preSelectedChequeNo, [ 'class' => 'form-control', 'required', 'id' => 'cheque_no', 'readonly' => true ]) !!} @lang('accounting-reports::lang.cheque_number_pre_filled') @else {!! Form::select('cheque_no', [], null, [ 'class' => 'form-control select2', 'required', 'id' => 'cheque_no', 'placeholder' => __('accounting-reports::lang.select_pending_cheque'), 'style' => 'width:100%' ]) !!} @lang('accounting-reports::lang.only_pending_cheques_shown') @endif {!! Form::hidden('source_cheque_id', null, ['id' => 'source_cheque_id']) !!}
{!! Form::label('cheque_date', __('accounting-reports::lang.cheque_date') . ':*') !!}
{!! Form::text('cheque_date', @format_date('now'), ['class' => 'form-control date-picker', 'required', 'readonly', 'id' => 'cheque_date']) !!}
{!! Form::label('amount', __('accounting-reports::lang.amount') . ':*') !!}
{!! Form::text('amount', null, ['class' => 'form-control input_number', 'required', 'id' => 'amount']) !!}
{!! Form::label('type', __('accounting-reports::lang.cheque_type') . ':*') !!} {!! Form::select('type', ['issued' => __('accounting-reports::lang.issued'), 'received' => __('accounting-reports::lang.received')], 'issued', ['class' => 'form-control select2', 'required', 'style' => 'width:100%', 'id' => 'type']) !!}
{!! Form::label('status', __('accounting-reports::lang.cheque_status') . ':*') !!} {!! Form::select('status', ['pending' => __('accounting-reports::lang.pending'), 'cleared' => __('accounting-reports::lang.cleared'), 'bounced' => __('accounting-reports::lang.bounced'), 'cancelled' => __('accounting-reports::lang.cancelled'), 'deposited' => __('accounting-reports::lang.deposited')], 'pending', ['class' => 'form-control select2', 'required', 'style' => 'width:100%', 'id' => 'status']) !!}
{!! Form::label('payee_name', __('accounting-reports::lang.payee_name') . ':') !!} {!! Form::text('payee_name', null, ['class' => 'form-control', 'placeholder' => __('accounting-reports::lang.payee_name'), 'id' => 'payee_name']) !!}
{!! Form::label('location_id', __('purchase.business_location') . ':') !!} {!! Form::select('location_id', $locations ?? ['' => __('messages.please_select')], null, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'style' => 'width:100%', 'id' => 'location_id']) !!}
{!! Form::label('reference_no', __('accounting-reports::lang.reference_no') . ':') !!} {!! Form::text('reference_no', null, ['class' => 'form-control', 'placeholder' => __('accounting-reports::lang.reference_no'), 'id' => 'reference_no']) !!}
{!! Form::label('bank_statement_ref', __('accounting-reports::lang.bank_statement_ref') . ':') !!} {!! Form::text('bank_statement_ref', null, ['class' => 'form-control', 'placeholder' => __('accounting-reports::lang.bank_statement_ref'), 'id' => 'bank_statement_ref']) !!}
{!! Form::label('narration', __('daybook::lang.narration') . ':') !!} {!! Form::textarea('narration', null, ['class' => 'form-control', 'rows' => '3', 'placeholder' => __('daybook::lang.narration'), 'id' => 'narration']) !!}
{!! Form::close() !!}
@endsection @section('javascript') @endsection