@extends('layouts.app') @section('title', __('accounting-reports::lang.edit_cheque_book')) @section('content') @lang('accounting-reports::lang.edit_cheque_book') {!! Form::open(['url' => route('accounting-reports.cheque-books.update', $chequeBook->id), 'method' => 'PUT', 'id' => 'edit_cheque_book_form']) !!} @lang('accounting-reports::lang.cheque_book_details') {!! Form::label('account_id', __('accounting-reports::lang.bank_account') . ':*') !!} {!! Form::select('account_id', $accounts, $chequeBook->account_id, ['class' => 'form-control select2', 'required', 'placeholder' => __('messages.please_select'), 'style' => 'width:100%']) !!} {!! Form::label('book_name', __('accounting-reports::lang.book_name') . ':*') !!} {!! Form::text('book_name', $chequeBook->book_name, ['class' => 'form-control', 'required', 'placeholder' => __('accounting-reports::lang.book_name')]) !!} {!! Form::label('book_number', __('accounting-reports::lang.book_number') . ':') !!} {!! Form::text('book_number', $chequeBook->book_number, ['class' => 'form-control', 'placeholder' => __('accounting-reports::lang.book_number')]) !!} {!! Form::label('location_id', __('purchase.business_location') . ':') !!} {!! Form::select('location_id', $locations, $chequeBook->location_id, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'style' => 'width:100%']) !!} {!! Form::label('start_cheque_no', __('accounting-reports::lang.start_cheque_no') . ':*') !!} {!! Form::text('start_cheque_no', $chequeBook->start_cheque_no, ['class' => 'form-control', 'required', 'readonly' => $chequeBook->chequeEntries()->count() > 0, 'id' => 'start_cheque_no']) !!} @if($chequeBook->chequeEntries()->count() > 0) @lang('accounting-reports::lang.cannot_change_cheque_range_if_entries_exist') @endif {!! Form::label('end_cheque_no', __('accounting-reports::lang.end_cheque_no') . ':*') !!} {!! Form::text('end_cheque_no', $chequeBook->end_cheque_no, ['class' => 'form-control', 'required', 'readonly' => $chequeBook->chequeEntries()->count() > 0, 'id' => 'end_cheque_no']) !!} {!! Form::label('status', __('accounting-reports::lang.status') . ':*') !!} {!! Form::select('status', ['active' => __('accounting-reports::lang.active'), 'completed' => 'Completed', 'cancelled' => __('accounting-reports::lang.cancelled')], $chequeBook->status, ['class' => 'form-control select2', 'required', 'style' => 'width:100%']) !!} {!! Form::label('issue_date', __('accounting-reports::lang.issue_date') . ':') !!} {!! Form::text('issue_date', $chequeBook->issue_date ? @format_date($chequeBook->issue_date) : null, ['class' => 'form-control date-picker', 'readonly']) !!} {!! Form::label('expiry_date', __('accounting-reports::lang.expiry_date') . ':') !!} {!! Form::text('expiry_date', $chequeBook->expiry_date ? @format_date($chequeBook->expiry_date) : null, ['class' => 'form-control date-picker', 'readonly']) !!} {!! Form::label('notes', __('accounting-reports::lang.description') . ':') !!} {!! Form::textarea('notes', $chequeBook->notes, ['class' => 'form-control', 'rows' => '3', 'placeholder' => __('accounting-reports::lang.description')]) !!} {!! Form::close() !!} @endsection @section('javascript') @endsection
@lang('accounting-reports::lang.cannot_change_cheque_range_if_entries_exist')