@extends('layouts.dashboard') @section('pagehead', $userDetails->company_name . ' Details') @section('bredcrumb-item-link',url('/home/ledger')) @section('bredcrumb-item','Ledger') @section('content')
@include('layouts.notification')
@foreach($allItems as $key => $data) @if($data->type == 'credit') @elseif($data->type == 'debit') @else @endif @endforeach @php $calValue = ($userDetails->opening_balance + $paymentsDebitTotal + $totalSum) - $paymentsTotal @endphp
Date Particulars Debit Credit
{{ __('01-04-' . $userDetails->created_at->format('Y')) }} {{__('To Opening Balance')}} {{ __('Rs. ') . number_format((float)$userDetails->opening_balance , 2, '.', '') }} {{ __('-') }}
{{ $data->created_at->format('d-m-Y')}} {{__('By ') . $data->modes->name}}

{{$data->narration ? $data->narration : '-'}}

{{__('-')}} {{ __('Rs. ') . number_format((float)$data->amount , 2, '.', '') }} {{__('By ') . $data->modes->name}}

{{$data->narration ? $data->narration : '-'}}

{{ __('Rs. ') . number_format((float)$data->amount , 2, '.', '') }} {{__('-')}} {{__('To (As Per Details) ')}}

{{ __('BY BILL NO. ' . str_pad($data->id, 3, '0', STR_PAD_LEFT) . ' ' . strtoupper(str_replace('_','-',$data->issueNumber->name)) . ' ' . $data->issueNumber->year) }}

{{ __('Rs. ') . number_format((float)$data->gtotal , 2, '.', '') }} {{__('-')}}
Total Cr. {{ __('Rs. ') . number_format((float)$paymentsTotal , 2, '.', '') }}
Total Db. {{ __('Rs. ') . number_format((float)$userDetails->opening_balance + $paymentsDebitTotal + $totalSum, 2, '.', '') }}
Balance {{ $calValue <= 0 ? 'Cr.' : 'Db.'}} {{ __('Rs. ') . number_format((float)$calValue , 2, '.', '') }}
@endsection