{{ ucfirst($vendor->vendor_name) }}
@if ($vendorType == 'internal')
@if (isset($vendorRecords) && $vendorRecords->count() > 0)
Transaction History
@php
$totalAmountSum = 0;
$paidAmountSum = 0;
@endphp
Date |
Expense Head Name |
Narration |
Total Salary Paid |
|
@forelse($vendorRecords as $record)
@php
$totalAmountSum += $record->total_amount;
$paidAmountSum += $record->paid_amount;
$balance = $record->total_amount - $record->paid_amount;
@endphp
{{ \Carbon\Carbon::parse($record->created_at)->format('d-m-Y') }}
|
{{ $record->expense_head_name ?? '-' }} |
{{ $record->transaction_narration ?? '-' }} |
₹
{{ number_format($record->paid_amount, 2) }} |
{{--
@if ($balance > 0)
Due: ₹ {{ number_format($balance, 2) }}
@elseif($balance < 0)
Advance: ₹ {{ number_format(abs($balance), 2) }}
@else
Cleared
@endif
| --}}
@empty
No records
found
|
@endforelse
@php $grandBalance = $totalAmountSum - $paidAmountSum; @endphp
|
Grand Total |
₹ {{ number_format($totalAmountSum, 2) }} |
₹ {{ number_format($paidAmountSum, 2) }} |
{{--
@if ($grandBalance > 0)
Outstanding Balance : ₹ {{ number_format($grandBalance, 2) }}
@elseif($grandBalance < 0)
Advance: ₹ {{ number_format(abs($grandBalance), 2) }}
@else
Cleared
@endif
| --}}
@else
@endif
@else
@if (isset($vendorRecords) && $vendorRecords->count() > 0)
Transaction History
@php
$totalAmountSum = 0;
$paidAmountSum = 0;
@endphp
Date |
Expense Head Name |
Narration |
Total Payment Amount |
Total Paid Amount |
|
@forelse($vendorRecords as $record)
@php
$totalAmountSum += $record->total_amount;
$paidAmountSum += $record->paid_amount;
$balance = $record->total_amount - $record->paid_amount;
@endphp
{{ \Carbon\Carbon::parse($record->created_at)->format('d-m-Y') }}
|
{{ $record->expense_head_name ?? '-' }} |
{{ $record->transaction_narration ?? '-' }} |
₹
{{ number_format($record->total_amount, 2) }} |
₹
{{ number_format($record->paid_amount, 2) }} |
@if ($balance > 0)
Due: ₹ {{ number_format($balance, 2) }}
@elseif($balance < 0)
Extra: ₹ {{ number_format(abs($balance), 2) }}
@else
Cleared
@endif
|
@empty
No records
found
|
@endforelse
@php $grandBalance = $totalAmountSum - $paidAmountSum; @endphp
|
Grand Total |
₹ {{ number_format($totalAmountSum, 2) }} |
₹ {{ number_format($paidAmountSum, 2) }} |
@if ($grandBalance > 0)
Outstanding Balance : ₹ {{ number_format($grandBalance, 2) }}
@elseif($grandBalance < 0)
Extra: ₹ {{ number_format(abs($grandBalance), 2) }}
@else
Cleared
@endif
|
@else
@endif
@endif