@extends('master.app') @section('title', 'Received Details') @section('pageCSS') @endsection @section('body')
@include('general.valert') {{-- HEADER --}}

Received Voucher

Details • Audit friendly • Print A4 / Small Printer
#{{ $data->recieved_number }} {{ $data->date }} Back Edit {{-- Print (open print page) --}} Print A4 Small Printer (80mm)
{{-- LEFT: SUMMARY --}}
Summary
@php $payMap = [1=>'Cash',2=>'Bank',3=>'Sarafi',4=>'Token']; $pay = $payMap[$data->transaction_id] ?? '—'; $ctarget = $data->c_target == 1 ? 'Yes' : 'No'; $currency = optional($data->currency)->title_en ?? ''; @endphp {{ $pay }}
Customer
{{ optional($data->customer)->name }}
Phone
{{ optional($data->customer)->phone ?? '-' }}
Address
{{ optional($data->customer)->address ?? '-' }}
Title
{{ $data->title }}
Cash Target
{{ $ctarget }}
Currency
{{ $currency }}
@if($data->currency_id != 1)
Ex. Rate
{{ $data->ex_rate ?? '-' }}
@endif
Details
{{ $data->details ?? '-' }}
{{-- RIGHT: BALANCE --}}
@php // Before amount = current balance + received amount $previous_balance = $tbalance + ($data->amount ?? 0); $new_balance = $tbalance; // after this received @endphp
Customer Ledger Snapshot
Auto calculated
Previous Balance
{{ $previous_balance }} {{ $currency }}
Received Amount
{{ $data->amount }} {{ $currency }}
New Balance
{{ $new_balance }} {{ $currency }}

“Previous Balance” is calculated as (New Balance + Received Amount).
@endsection @section('pageJs') @endsection