@extends('layouts.app') @section('content')
| Particulars | Debit | Credit |
|---|---|---|
| Purchase | ||
| {{ $purchase->supplier->supplier_name }} | {{ number_format($purchase->total_grand_total,2) }} @php $totalCredit+=$purchase->total_grand_total; @endphp | |
| Sales | ||
| {{ $invoice->customer->customer_name }} | {{ number_format($invoice->total_grand_total,2) }} @php $totalDebit+=$invoice->total_grand_total; @endphp | |
| Payments | ||
| @if($payment->party_type == 'customer') {{ $payment->customer->customer_name }} @elseif($payment->party_type == 'supplier') {{ $payment->supplier->supplier_name }} @endif | @if($payment->party_type == 'supplier') {{ number_format($payment->total_grand_total,2) }} @php $totalDebit+=$payment->total_grand_total; @endphp @endif | @if($payment->party_type == 'customer') {{ number_format($payment->total_grand_total,2) }} @php $totalCredit+=$payment->total_grand_total; @endphp @endif |
| Receipts | ||
| @if($receipt->party_type == 'customer') {{ $receipt->customer->customer_name }} @elseif($receipt->party_type == 'supplier') {{ $receipt->supplier->supplier_name }} @endif | @if($receipt->party_type == 'supplier') {{ number_format($receipt->total_grand_total,2) }} @php $totalDebit+=$receipt->total_grand_total; @endphp @endif | @if($receipt->party_type == 'customer') {{ number_format($receipt->total_grand_total,2) }} @php $totalDebit+=$receipt->total_grand_total; @endphp @endif |
| Total | {{ number_format($totalDebit,2) }} | {{ number_format($totalCredit,2) }} |
| Closing Balance | @if($cloBalance > 0) {{ number_format($cloBalance,2) }} @endif | @if($cloBalance < 0) {{ number_format(abs($cloBalance),2) }} @endif |