@extends('master.app') @section('title', 'Supplier Payment Receipt') @section('body') @php // Helpers $currency = $data->currency->title_en ?? ''; $supplierName = $data->supplier->name ?? 'N/A'; $previousDue = (float) ($tbalance + $data->amount); // previous due before new payment $newPayment = (float) ($data->amount); $balance = (float) ($tbalance); $printDate = date('Y-m-d H:i'); $receiptUrl = route('msupplier_payment.receipt', $data->id); // WhatsApp message (short + clear) $waText = "Supplier Payment Receipt\n" . "Payment #: {$data->invoice_number}\n" . "Supplier: {$supplierName}\n" . "New Payment: " . number_format($newPayment,2) . " {$currency}\n" . "Balance: " . number_format($balance,2) . " {$currency}\n" . "Receipt: {$receiptUrl}"; $waLink = "https://wa.me/?text=" . urlencode($waText); @endphp
{{-- TOP BAR --}}
Payment Receipt
Supplier payment slip (print & share)
{{-- RECEIPT --}}
{{-- Letter head (shows in print too) --}}
@if(!empty($blogo)) Logo @endif
{{ $bname ?? 'Business Name' }}
Supplier Payment Slip
Print Date: {{ $printDate }}
Payment # {{ $data->invoice_number }}
Receipt Link: {{ $receiptUrl }}
{{-- Summary Cards --}}
Supplier
{{ $supplierName }}
New Payment
{{ number_format($newPayment, 2) }} {{ $currency }}
Balance
{{ number_format($balance, 2) }} {{ $currency }}
{{-- Details Table --}}
Details
Payment Number #{{ $data->invoice_number }}
Supplier Name {{ $supplierName }}
Date {{ $data->date ?? '-' }}
Previous Due {{ number_format($previousDue, 2) }} {{ $currency }}
New Payment Amount {{ number_format($newPayment, 2) }} {{ $currency }}
Remaining Balance {{ number_format($balance, 2) }} {{ $currency }}
Note: The above balance is only related to {{ $currency }}.
{{-- Signature / Footer --}}
Prepared By
Signature
Received By
Signature
@endsection @section('pageJs') {{-- Print styling --}} @endsection