@extends('layouts.admin') @section('title', 'Trial Balance') @section('content') @php $currency = \App\Models\Hotel::query()->value('currency') ?? 'USD'; @endphp P&L
@php $totalDebit = 0; $totalCredit = 0; @endphp @foreach($rows as $row)@php $totalDebit += $row->total_debit; $totalCredit += $row->total_credit; @endphp @if($row->total_debit > 0 || $row->total_credit > 0)@endif @endforeach
CodeAccountTypeDebitCredit
{{ $row->code }}{{ $row->name }}{{ ucfirst($row->type) }} {{ number_format($row->total_debit, 2) }}{{ number_format($row->total_credit, 2) }}
Totals{{ $currency }} {{ number_format($totalDebit, 2) }}{{ $currency }} {{ number_format($totalCredit, 2) }}
@endsection