@extends('backEnd.master') @section('title') @lang('accounts.chart_of_account') @endsection @section('mainContent')
@if(isset($chart_of_account)) @if(userPermission("chart-of-account-store")) @endif @endif
@if(isset($chart_of_account)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => array('chart-of-account-update',@$chart_of_account->id), 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }} @else @if(userPermission("chart-of-account-store")) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'chart-of-account-store', 'method' => 'POST', 'enctype' => 'multipart/form-data']) }} @endif @endif

@if(isset($chart_of_account)) @lang('accounts.edit_chart_of_account') @else @lang('accounts.add_chart_of_account') @endif

@if ($errors->has('head')) {{ @$errors->first('head') }} @endif
@if ($errors->has('type')) {{ @$errors->first('type') }} @endif
@php $tooltip = ""; if(userPermission("chart-of-account-store") || userPermission('chart-of-account-edit')){ $tooltip = ""; }else{ $tooltip = "You have no permission to add"; } @endphp
{{ Form::close() }}

@lang('accounts.chart_of_account_list')

@foreach($chart_of_accounts as $chart_of_account) @endforeach
@lang('common.name') @lang('common.type') @lang('common.action')
{{@$chart_of_account->head}} @if($chart_of_account->type=="A")@lang('accounts.asset') @endif @if($chart_of_account->type=="E")@lang('accounts.expense') @endif @if($chart_of_account->type=="I")@lang('accounts.income') @endif @if($chart_of_account->type=="L")@lang('accounts.liability') @endif {{-- {{@$chart_of_account->type == "I"? 'Income':'Expense'}} --}} @if(userPermission('chart-of-account-edit')) @lang('common.edit') @endif @if(userPermission("chart-of-account-delete")) @lang('common.delete') @endif
@endsection @include('backEnd.partials.data_table_js')