@extends('admin.layout.master') @section('title','Cash Ledger Report') @section('custom_style') @endsection @section ('content') @section ('content')
| {{$type==0?'Receive':'Payment'}} | ||||||
|---|---|---|---|---|---|---|
| DATE | VCR NO | PARTICULERS | NOTE | Amount | ||
| {{ date('d-m-Y',strtotime(Request()->start_date)) }} | - | {{'Opening Balance'}} | @if($b_balance>=0) {{number_format($b_balance,2)}} @php $d_amount+=$b_balance; $amount+=$b_balance; @endphp @else @php $minusTrimedBalance=abs($b_balance); $c_amount+=$minusTrimedBalance; $amount-=$minusTrimedBalance; @endphp {{number_format($minusTrimedBalance,2)}} @endif | |||
| {{date('d-m-Y',strtotime($jr->date))}} | @if(checkAuthPermission('voucher.voucher_edit') && $jr->voucher->reff_voucher_id==null) @endif {{$jr->voucher->voucher_no}} |
@if($jr->type==0)
@php
$creditLedger=$jr->opposite_posting->where('type',1);
$drCounter=count($jr->opposite_posting->where('type',0));
$groupType=$creditLedger->where('group_type',$jr->group_type);
$str='';
if(count($groupType)>0){
// if($show_multiple==1){
if($show_multiple && $drCounter==1){
foreach($groupType as $opp){
$str.=$opp->globalLedger?$opp->globalLedger->name:'Ledger Missing';
if(count($groupType)>1){
$str.=' - '.$opp->amount.' '; } } }else{ $str.=$groupType->first()->globalLedger?$groupType->first()->globalLedger->name:'Ledger Missing'; } }elseif(count($creditLedger)>0){ // if($show_multiple==1){ if($show_multiple && $drCounter==1){ foreach($creditLedger as $ocl){ $str.=$ocl->globalLedger?$ocl->globalLedger->name:'Ledger Missing'; if(count($creditLedger)>1){ $str.=' - '.(number_format($ocl->amount,2)).' '; } } }else{ $str.=$creditLedger->first()->globalLedger?$creditLedger->first()->globalLedger->name:'Ledger Missing'; } } @endphp @else @php $debitLedger=$jr->opposite_posting->where('type',0); $crCounter=count($jr->opposite_posting->where('type',1)); $drGroupType=$debitLedger->where('group_type',$jr->group_type); $str=''; if(count($drGroupType)>0){ // if($show_multiple==1){ if($show_multiple && $crCounter==1){ foreach($drGroupType as $opp){ $str.=$opp->globalLedger?$opp->globalLedger->name:'Ledger Missing'; if(count($drGroupType)>1){ $str.=' - '.(number_format($opp->amount,2)).' '; } } }else{ $str.=$drGroupType->first()->globalLedger?$drGroupType->first()->globalLedger->name:'Ledger Missing'; } }elseif(count($debitLedger)>0){ // if($show_multiple==1){ if($show_multiple && $crCounter==1){ foreach($debitLedger as $ocl){ $str.=$ocl->globalLedger?$ocl->globalLedger->name:'Ledger Missing'; if(count($debitLedger)>1){ $str.=' - '.$ocl->amount.' '; } } }else{ $str.=$debitLedger->first()->globalLedger?$debitLedger->first()->globalLedger->name:'Ledger Missing'; } } @endphp @endif {!!$str!!} |
{{$jr->note??$jr->voucher->note}} | @if($jr->type==0) {{number_format($jr->amount,2)}} @php $d_amount+=$jr->amount; $amount+=$jr->amount; @endphp @elseif($jr->type==1) {{number_format($jr->amount,2)}} @php $c_amount+=$jr->amount; $amount-=$jr->amount; @endphp @endif | ||
| {{'TOTAL '}} | {{----}} | {{number_format(($type==0?$d_amount:$c_amount),2)}} | ||||
| {{'Closing Balance'}} | {{----}} @if($r_type==1) | {{ $amount=0 ? '': ($amount > 0?number_format($amount,2).' (dr)':(number_format(abs($amount),2)).' (cr)')}} | @else{{ $amount>=0?number_format($amount,2):'('.(number_format(abs($amount),2)).')'}} | @endif|||