@extends('hr_main') @section('title', '| Advance Details' ) @section('content')
{{ $advTypeName }} Details
{{-- @if(count($data['receive']) > 0) --}} {{--

Advanced Salary Loan Receive

--}} @php $sl = 1; $balance = 0; $paymentTotal = 0; $receiveTotal = 0; @endphp @foreach ($data as $key => $item) @php $balance += $item['payment'] - $item['receive']; @endphp @php $paymentTotal += $item['payment']; $receiveTotal += $item['receive']; @endphp @endforeach
Sl Date Payment Receive Balance
{{ $sl++ }} {{ $item['date'] }} {{ number_format($item['payment'], 2) }} {{ number_format($item['receive'], 2) }} {{ number_format($balance, 2) }}
Total: {{ number_format($paymentTotal, 2) }} {{ number_format($receiveTotal, 2) }} {{ number_format($paymentTotal - $receiveTotal, 2) }}
{{-- @endif --}}
@endsection