@extends('layouts.main') @section('main-container')
@if (Session::has('success')) @endif @if($errors->any()) @endif
Trail Balance
@csrf
Print Excel
Millennium Computers And Networking1
Trail Balance
From {{ $start_date}} - {{ $end_date}}
@php $count = 1; @endphp @php $ONet_dr=0; $ONet_cr=0; $Net_dr=0; $Net_cr=0; @endphp @foreach ($onamounts as $onamount) @php $ONDrAmount = $onamount->ONDrAmount; $ONCrAmount = $onamount->ONCrAmount; if($ONDrAmount>$ONCrAmount){ $ONet_dr=$ONDrAmount-$ONCrAmount; $ONet_cr=0; }else{ $ONet_cr=$ONCrAmount-$ONDrAmount; $ONet_dr=0; } @endphp @endforeach @foreach ($namounts as $namount) @php $NDrAmount = $namount->NDrAmount; $NCrAmount = $namount->NCrAmount; if($NDrAmount>$NCrAmount){ $Net_dr=$NDrAmount-$NCrAmount; $Net_cr=0; }else{ $Net_cr=$NCrAmount-$NDrAmount; $Net_dr=0; } @endphp @endforeach @php $eDrAmount=0; $eCrAmount=0; $i=1; $ie=""; @endphp @foreach ($incomeexpens as $incomeexpen) @php $DrAmount = $incomeexpen->DrAmount; $CrAmount = $incomeexpen->CrAmount; $eDrAmount=$eDrAmount+$DrAmount; $eCrAmount=$eCrAmount+$CrAmount; $glcode = $incomeexpen->gl_code; $descriptions = $incomeexpen->description; if($DrAmount==0 && $CrAmount==0 ){ }else{ $ie.=""; } $i++; @endphp @endforeach @php if($eDrAmount==0 && $eCrAmount==0 ){ }else{ $ie.=""; } @endphp @php $i=0; $Total_dr=0; $Total_cr=0; $i=1; @endphp @foreach ($oamounts as $oamount) @php $BDrAmount=0; $BCrAmount=0; $OTotal_dr=0; $OTotal_cr=0; $BTotal_cr=0; $BTotal_dr=0; $ODrAmount = $oamount->ODrAmount; $OCrAmount = $oamount->OCrAmount; $DrAmount1 = $oamount->DrAmount; $CrAmount1 = $oamount->CrAmount; $glcode1 = $oamount->gl_code; $descriptions1 = $oamount->description; $Total_dr=$Total_dr+$DrAmount1; $Total_cr=$Total_cr+$CrAmount1; if($ODrAmount>$OCrAmount){ $ODrAmount=$ODrAmount-$OCrAmount; $OCrAmount=0; $OTotal_dr=$OTotal_dr+$ODrAmount; }else{ $OCrAmount=$OCrAmount-$ODrAmount; $ODrAmount=0; $OTotal_cr=$OTotal_cr+$OCrAmount; } $BDrAmount=$DrAmount1+$ODrAmount; $BCrAmount=$CrAmount1+$OCrAmount; if($BDrAmount>=$BCrAmount){ $BDrAmount=$BDrAmount-$BCrAmount; $BCrAmount=0; }else{ $BCrAmount=$BCrAmount-$BDrAmount; $BDrAmount=0; } $BTotal_cr=$BTotal_cr+$BCrAmount; $BTotal_dr=$BTotal_dr+$BDrAmount; $rcdetailgl="
"; if($ODrAmount==0 && $OCrAmount==0 && $DrAmount1==0 && $CrAmount1==0 && $BDrAmount==0 && $BCrAmount==0){ }else{ echo ""; $i++; } @endphp @endforeach @php if($ONet_dr==0 && $ONet_cr==0 && $Net_dr==0 && $Net_cr==0 ){ }else{ echo " "; } $Total_dr=$Total_dr+$Net_dr; $Total_cr= $Total_cr+$Net_cr; $BTotal_dr=$BTotal_dr+$Net_dr+$ONet_dr; $BTotal_cr=$BTotal_cr+$Net_cr+$ONet_cr; $OTotal_dr=$OTotal_dr+$ONet_dr; $OTotal_cr=$OTotal_cr+$ONet_cr; echo " "; echo "$ie"; @endphp
Sl GlCode Account Head Opeining Balance Period Transaction Balance
Debit Credit Debit Credit Debit Credit
".$i." ".$glcode." ".$descriptions." ".number_format($DrAmount,2,'.',',')." ".number_format($CrAmount,2,'.',',')."
Total Income & Expense ".number_format($eDrAmount,2,'.',',')." ".number_format($eCrAmount,2,'.',',')."
".$i." ".$glcode1." ".$descriptions1." ".number_format($ODrAmount,2,'.',',')." ".number_format($OCrAmount,2,'.',',')." ".number_format($DrAmount1,2,'.',',')." ".number_format($CrAmount1,2,'.',',')." ".number_format($BDrAmount,2,'.',',')." ".number_format($BCrAmount,2,'.',',')."
Net Income ".number_format($ONet_dr,2,'.',',')." ".number_format($ONet_cr,2,'.',',')." ".number_format($Net_dr,2,'.',',')." ".number_format($Net_cr,2,'.',',')." ".number_format($Net_dr,2,'.',',')." ".number_format($Net_cr,2,'.',',')."
Total ".number_format($OTotal_dr,2,'.',',')." ".number_format($OTotal_cr,2,'.',',')." ".number_format($Total_dr,2,'.',',')." ".number_format($Total_cr,2,'.',',')." ".number_format($BTotal_dr,2,'.',',')." ".number_format($BTotal_cr,2,'.',',')."



@endsection