@extends('layouts.main') @section('page-title') {{__('Account Drilldown Report')}} @endsection @section('page-breadcrumb') {{__('Chart of Account')}}, {{__('Account Drilldown Report')}}, {{ucwords($account->code. ' - ' .$account->name)}} @endsection @section('content')
{{ Form::open(array('route' => array('chart-of-account.show',$account->id),'method' => 'GET','id'=>'report_drilldown')) }}
{{ Form::label('start_date', __('Start Date'),['class'=>'form-label']) }} {{ Form::date('start_date',$filter['startDateRange'], array('class' => 'month-btn form-control')) }}
{{ Form::label('end_date', __('End Date'),['class'=>'form-label']) }} {{ Form::date('end_date',$filter['endDateRange'], array('class' => 'month-btn form-control')) }}
{{ Form::label('account', __('Account'),['class'=>'form-label']) }} {{ Form::select('account',$accounts,isset($_GET['account'])?$_GET['account']:'', array('class' => 'form-control select')) }}
{{ Form::close() }}
{{__('Report')}} :
@if(!empty($account))
{{__('Account Name')}} :
{{__('Account Code')}} :
@endif
{{__('Duration')}} :
@php $balance = 0; $totalDebit = 0; $totalCredit = 0; $chartDatas = \Workdo\Account\Entities\AccountUtility::getAccountData($account->id,$filter['startDateRange'],$filter['endDateRange']); $accountName = \Workdo\Account\Entities\ChartOfAccount::find($account->id); @endphp @php $debitTotal = 0; $creditTotal = 0; @endphp @foreach ($chartDatas as $transaction) @php $account = \Workdo\Account\Entities\ChartOfAccount::find($transaction->account_id); $debit = -$transaction->debit; $credit = $transaction->credit; $debitTotal += $debit; $creditTotal += $credit; $balance = $debitTotal + $creditTotal; @endphp @endforeach
{{__('Account Name')}} {{__('Name')}} {{__('Transaction Type')}} {{__('Transaction Date')}} {{__('Debit')}} {{__('Credit')}} {{__('Balance')}}
{{$accountName->name}} {{ !empty($transaction->user_name) ? $transaction->user_name : '-'}} {{$transaction->reference}} {{$transaction->date}} {{!empty($transaction->debit) ? $transaction->debit :'-'}} {{!empty($transaction->credit) ? $transaction->credit :'-'}} {{$balance}}
@endsection