@extends('backend.layouts.app') @section('title', 'Income') @section('content')

@if (@$data['edit']) {{ _trans('common.Edit') }} @else {{ _trans('common.Create') }} @endif {{ _trans('common.Income') }}

@if (@$data['edit']) {{ Form::open(['route' => ['income.update', @$data['edit']->id], 'class' => 'card', 'id' => 'portfolio-form', 'files' => 'true', 'method' => 'PUT']) }} @else {!! Form::open([ 'route' => 'income.store', 'enctype' => 'multipart/form-data', 'method' => 'post', 'languages' => true, 'id' => 'portfolio-form', ]) !!} @endif
{{ Form::label('income_head', 'Income Head', ['class' => 'form-label required']) }} {{ Form::select('income_head', $data['head'], @$data['edit'] ? @$data['edit']->income_head_id : null, ['class' => 'form-control select']) }} @error('income_head') {{ $message }} @enderror
{{ Form::label('status', 'Status', ['class' => 'form-label required']) }} {{ Form::select('status', [1 => 'Active', 0 => 'Disable'], @$data['edit'] ? @$data['edit']->status : null, ['class' => 'form-control select2']) }} @error('status') {{ $message }} @enderror
{{ Form::label('amount', 'Amount', ['class' => 'form-label required']) }} {{ Form::number('amount', @$data['edit'] ? @$data['edit']->amount : 0.0, ['class' => 'form-control']) }} @error('amount') {{ $message }} @enderror
{{ Form::label('date', 'Date', ['class' => 'form-label required']) }}
@error('date') {{ $message }} @enderror
{{ Form::label('note', 'Note', ['class' => 'form-label required']) }} {{ Form::textarea('note', @$data['edit'] ? @$data['edit']->note : null, ['id' => 'summernote', 'class' => 'form-control']) }}
{{ Form::close() }}
@php $date = @$data['edit']->date ? @$data['edit']->date : date('Y-m-d'); @endphp @endsection @push('js') @include('backend.partials.datatable') @endpush @section('scripts') @endsection