@extends('admin.master') @section('title', 'Supplier Ledger: ' . $supplier->name) @section('content')
| Total Purchases: | ৳ {{ number_format($total_purchases, 2) }} | Total Paid: | ৳ {{ number_format($total_paid, 2) }} |
| Total Sales: | ৳ {{ number_format($total_sales, 2) }} | Total Received: | ৳ {{ number_format($total_received, 2) }} |
| {{ $net_due >= 0 ? 'Total Payable (Company owes Supplier)' : 'Total Receivable (Supplier owes Company)' }} | ৳ {{ number_format(abs($net_due), 2) }} | ||
| Date | Ref No. / Invoice | Transaction Type | Payable (Dr) | Paid (Cr) | Balance |
|---|---|---|---|---|---|
| {{ date('d-M-Y', strtotime($txn->date)) }} | {{ $txn->ref_no }} | @if($txn->type == 'Purchase') Purchase @elseif($txn->type == 'Payment Given') Payment Given @elseif($txn->type == 'Sale') Sale (Customer) @elseif($txn->type == 'Payment Received') Payment Rcv @endif | {{ $payable > 0 ? '৳ '.number_format($payable, 2) : '-' }} | {{ $paid > 0 ? '৳ '.number_format($paid, 2) : '-' }} | ৳ {{ number_format(abs($running_balance), 2) }} ({{ $running_balance >= 0 ? 'Cr' : 'Dr' }}) |
| No transactions found for this supplier. | |||||
| Grand Total: | ৳ {{ number_format(($total_purchases + $total_received), 2) }} | ৳ {{ number_format(($total_paid + $total_sales), 2) }} | ৳ {{ number_format(abs($running_balance), 2) }} ({{ $running_balance >= 0 ? 'Cr' : 'Dr' }}) | ||