@extends('layouts.app') @php($isReceipt = $action === 'receive') @php($dueAmount = $isReceipt ? max((float) $balance, 0) : max((float) -$balance, 0)) @php($partyTypeLabel = ['agent' => 'Agent', 'passport_holder' => 'Passport Holder', 'vendor' => 'Vendor'][$type] ?? 'Party') @php($partyName = $type === 'passport_holder' ? $party->full_name : $party->name) @section('title', ($isReceipt ? 'Receive from ' : 'Pay ') . $partyTypeLabel) @section('content') {{-- ✅ Header Section --}}
{{ $partyName }} · Current balance: {{ number_format($balance, 2) }}