@extends('backend.layouts.master') @section('title') Invoice Details @endsection @section('admin-content')

{{ $invoice->flat->project->name ?? 'N/A' }}

{{ $invoice->flat->project->address ?? 'N/A' }}

Invoice #{{ $invoice->id }}

Payment Transaction Details

@include('backend.layouts.partials.message')
Customer ID (Remark): {{ $invoice->flat->project->short_name }}-{{ $invoice->user->username ?? 'N/A' }}({{ $invoice->remark ?? 'N/A' }}) {{ $invoice->flat->category->name }} No: {{ $invoice->flat->project->short_name }}-{{ $invoice->flat->no ?? 'N/A' }}
Customer Name: {{ $invoice->user->name ?? 'N/A' }} {{ $invoice->flat->category->name }} Size: {{ $invoice->flat->size ?? 'N/A' }} Sft.
Mobile No.: {{ $invoice->user->phone ?? 'N/A' }} Refer ID: {{ $invoice->refer->custom_id ?? 'N/A' }}
Purchase Date: {{ $invoice->purchase_date }}

Transactions

{{-- --}} @php $runningDue = 0; @endphp @forelse ($invoice->transactions as $tran) @php $runningDue += $tran->price - $tran->paid; @endphp @empty @endforelse
Date Description Price (Tk) Received (Tk) Dues Amount (Tk)Dues Amount (Tk)Remarks
{{ $tran->date }} {{ $tran->description }} {{ number_format($tran->price, 2) }} TK {{ number_format($tran->paid, 2) }} TK {{ number_format($runningDue, 2) }} TK {{ $tran->remarks }}
No transactions found.
@php $totalPrice = $invoice->transactions->sum('price'); $totalPaid = $invoice->transactions->sum('paid'); $totalDue = $totalPrice - $totalPaid; @endphp

Total Price: {{ number_format($totalPrice, 2) }} TK

Total Paid: {{ number_format($totalPaid, 2) }} TK

Remaining Due: {{ number_format($totalDue, 2) }} TK

Record more


@csrf
@include('backend.layouts.partials.footer')
@endsection