@extends('layouts.app') @section('title') General Ledger Detail @stop @section('breadcrumb') @stop @section('css') @stop @section('content')

@foreach($project_names as $key => $project_name) {{ $project_name }} @if($key < count($project_names) - 1) , @endif @endforeach

General Ledger

{{date(('d/m/Y'),strtotime($from))}} - {{date(('d/m/Y'),strtotime($to))}}
User ID:  {{Auth::user()->name}}
@foreach($ledger as $account) @if($account['info']->account_type_id != $currentTypeId) @endif @if(!$account['leafAccount']) @else @foreach($account['transactions'] as $t) @endforeach @endif @endforeach
Voucher No. Date Name Narration Debit Credit Balance
{{$account['info']->number}} - {{$account['info']->name}} {{number_format($account['sum'])}}
{{$account['info']->number}} - {{$account['info']->name}} Opening Balance {{number_format(abs($balance))}}
@if($t->voucher_type == \App\GeneralJournalEntry::CRV) CRV-{{$t->voucher_no}} @elseif($t->voucher_type == \App\GeneralJournalEntry::BRV) BRV-{{$t->voucher_no}} @elseif($t->voucher_type == \App\GeneralJournalEntry::CPV) CPV-{{$t->voucher_no}} @elseif($t->voucher_type == \App\GeneralJournalEntry::BPV) BPV-{{$t->voucher_no}} @elseif($t->voucher_type == \App\GeneralJournalEntry::JV) JV-{{$t->voucher_no}} @else @endif {{date('d/m/Y',strtotime($t->date))}} {{$t->controlAccount ? $t->controlAccount->name : ''}} {{$t->memo}} {{$t->amount > 0 ? number_format(abs($t->amount)) : ''}} {{$t->amount < 0 ? number_format(abs($t->amount)) : ''}} {{number_format($balance)}}
{{number_format($debit)}} {{number_format($credit)}} {{number_format($balance)}}
@stop @section('js') @stop