@extends('layouts.master_backend') @section('content') @php $flag=0; $heading=lang_trans('btn_add'); if(isset($data_row) && !empty($data_row)){ $flag=1; $heading=lang_trans('btn_update'); } @endphp

{{$heading}} {{lang_trans('heading_expense')}}


@if($flag==1) {{ Form::model($data_row,array('url'=>route('save-expense'),'id'=>"expense-form", 'class'=>"form-horizontal form-label-left", "files"=>true)) }} {{Form::hidden('id',null)}} @else {{ Form::open(array('url'=>route('save-expense'),'id'=>"expense-form", 'class'=>"form-horizontal form-label-left", "files"=>true)) }} @endif
{{ Form::select('category_id',$category_list,null,['class'=>'form-control','placeholder'=>lang_trans('ph_select')]) }}
{{Form::text('title',null,['class'=>"form-control col-md-7 col-xs-12", "id"=>"title", "required"=>"required"])}}
{{Form::text('amount',null,['class'=>"form-control col-md-7 col-xs-12", "id"=>"amount", "required"=>"required"])}}
{{Form::text('datetime',date('Y-m-d'),['class'=>"form-control col-md-6 col-xs-12 datepicker", "id"=>"expense_date", "placeholder"=>lang_trans('ph_date'), "autocomplete"=>"off"])}}
{{Form::textarea('remark',null,['class'=>"form-control col-md-7 col-xs-12", "id"=>"remark", "rows"=>1])}}
{{Form::file('attachments[]',['class'=>"form-control",'id'=>'attachments','multiple'=>true])}}
@if( $flag==1 && $data_row->attachments->count())
@if($data_row->attachments) @foreach($data_row->attachments as $k=>$val) @if($val->file!='') @endif @endforeach @else @endif
{{lang_trans('txt_sno')}}. {{lang_trans('txt_name')}}. {{lang_trans('txt_action')}}
{{$k+1}} {{$val->file}}
{{lang_trans('txt_no_file')}}
 
@endif
@endsection