@extends('layouts.admin') @section('page-title') {{__('Manage Chart of Accounts')}} @endsection @section('breadcrumb') @endsection @push('script-page') @endpush @section('action-btn')
@can('create chart of account') @endcan
@endsection @section('content')
@foreach($chartAccounts as $type=>$accounts)
{{$type}}
@foreach ($accounts as $account) @endforeach
{{__('Code')}} {{__('Name')}} {{__('Type')}} {{__('Balance')}} {{__('Status')}} {{__('Action')}}
{{ $account->code }} {{ $account->name }} {{!empty($account->subType)?$account->subType->name:'-'}} @if(!empty($account->balance()) && $account->balance()['netAmount']<0) {{__('Dr').'. '.\Auth::user()->priceFormat(abs($account->balance()['netAmount']))}} @elseif(!empty($account->balance()) && $account->balance()['netAmount']>0) {{__('Cr').'. '.\Auth::user()->priceFormat($account->balance()['netAmount'])}} @else - @endif @if($account->is_enabled==1) {{__('Enabled')}} @else {{__('Disabled')}} @endif @can('edit chart of account') @endcan @can('delete chart of account')
{!! Form::open(['method' => 'DELETE', 'route' => ['chart-of-account.destroy', $account->id],'id'=>'delete-form-'.$account->id]) !!} {!! Form::close() !!}
@endcan
@endforeach
@endsection