@extends('layouts.app') @section('content')

@lang('global.income.title')

{!! Form::open(['method' => 'POST', 'route' => ['admin.incomes.store'], 'files' => true,'class'=>'formvalidation']) !!}
@lang('global.app_create')
{!! Form::label('account_id', trans('global.income.fields.account').'*', ['class' => 'control-label']) !!} @if ( Gate::allows('account_create')) @if( 'button' === $addnew_type )   @else   @endif @endif {!! Form::select('account_id', $accounts, old('account_id'), ['class' => 'form-control select2', 'required' => '']) !!}

@if($errors->has('account_id'))

{{ $errors->first('account_id') }}

@endif
{!! Form::label('income_category_id', trans('global.income.fields.income-category').'*', ['class' => 'control-label']) !!} @if ( Gate::allows('income_create')) @if( 'button' === $addnew_type )   @else   @endif @endif {!! Form::select('income_category_id', $income_categories, old('income_category_id'), ['class' => 'form-control select2', 'required' => '']) !!}

@if($errors->has('income_category_id'))

{{ $errors->first('income_category_id') }}

@endif
{!! Form::label('entry_date', trans('global.income.fields.entry-date').'*', ['class' => 'control-label form-label']) !!}
{!! Form::text('entry_date', old('entry_date'), ['class' => 'form-control date', 'placeholder' => 'Entry date', 'required' => '']) !!}

@if($errors->has('entry_date'))

{{ $errors->first('entry_date') }}

@endif
{!! Form::label('amount', trans('global.income.fields.amount').'*', ['class' => 'control-label form-label']) !!}
{!! Form::number('amount', old('amount'), ['class' => 'form-control amount','min'=>'0','step'=>'.01', 'placeholder' => 'Amount', 'required' => '']) !!}

@if($errors->has('amount'))

{{ $errors->first('amount') }}

@endif
{!! Form::label('description', trans('global.income.fields.description').'', ['class' => 'control-label']) !!} {!! Form::textarea('description', old('description'), ['class' => 'form-control editor', 'placeholder' => 'Description']) !!}

@if($errors->has('description'))

{{ $errors->first('description') }}

@endif
{!! Form::label('payer_id', trans('global.income.fields.payer').'*', ['class' => 'control-label']) !!} @if ( Gate::allows('contact_create')) @if( 'button' === $addnew_type )   @else   @endif @endif {!! Form::select('payer_id', $payers, old('payer_id'), ['class' => 'form-control select2', 'required' => '']) !!}

@if($errors->has('payer_id'))

{{ $errors->first('payer_id') }}

@endif
{!! Form::label('pay_method_id', trans('global.income.fields.pay-method').'*', ['class' => 'control-label']) !!} {!! Form::select('pay_method_id', $pay_methods, old('pay_method_id'), ['class' => 'form-control select2', 'required' => '']) !!}

@if($errors->has('pay_method_id'))

{{ $errors->first('pay_method_id') }}

@endif
{!! Form::label('ref_no', trans('global.income.fields.ref-no').'', ['class' => 'control-label form-label']) !!}
{!! Form::text('ref_no', old('ref_no'), ['class' => 'form-control', 'placeholder' => 'Reference no / Transaction id']) !!}

@if($errors->has('ref_no'))

{{ $errors->first('ref_no') }}

@endif
{!! Form::label('description_file', trans('global.income.fields.description-file').'', ['class' => 'control-label']) !!} {!! Form::file('description_file[]', [ 'multiple', 'class' => 'form-control file-upload', 'data-url' => route('admin.media.upload'), 'data-bucket' => 'description_file', 'data-filekey' => 'description_file', 'data-accept' => FILE_TYPES_GENERAL, ]) !!}

{{trans('others.global_file_types_general')}}

 
@if($errors->has('description_file'))

{{ $errors->first('description_file') }}

@endif
{!! Form::submit(trans('global.app_save'), ['class' => 'btn btn-danger wave-effect']) !!} {!! Form::close() !!} @include('admin.common.modal-loading-submit') @stop @section('javascript') @parent @include('admin.common.standard-ckeditor') @include('admin.common.modal-scripts') @stop