@extends('layouts.admin') @section('content')
Total Transactions
{{-- Un Posted Transactions --}} @if ($uncommited_payroll)
@lang('student.filter by')

Un Committed List

{{-- Export btn --}} @if (count($uncommited_payroll) > 0)
@endif
{{-- --}} @php $count=0 @endphp @foreach ($uncommited_payroll as $payroll) @php // Function to calculate percentage $calculatePercentage=function($amount, $totalAmountDue, $oldRefund) { if ($totalAmountDue == 0 && $oldRefund > 0) { return 0; } elseif ($totalAmountDue == 0) { return round(($amount / 1) * 100, 2); } elseif ($oldRefund > 0) { return round( $amount > 0 && ($totalAmountDue - $oldRefund) > 0 ? ($amount / ($totalAmountDue - $oldRefund)) * 100 : 0, 2 ); } else { return round(($amount / $totalAmountDue) * 100, 2); } } @endphp {{-- --}} @endforeach
IdCourse session teacher team Total amount Total discount Total amount due eshra7ly percentage eshra7ly amount teacher percentage teacher amount old refund from to
{{++$count}} view details {{$payroll->has_label ? ' ( '.$payroll->label.' ) ':''}}{{$payroll->cname . ' (' .$payroll->lshort_name .' )'}} {{$payroll->acyname}} {{$payroll->ttname}}

{{$payroll->sum_total_amount}} EGP

{{$payroll->sum_total_amount_aed ?? 0}} AED

{{$payroll->sum_total_discount_value}} EGP

{{$payroll->sum_total_discount_value_aed ?? 0}} AED

{{$payroll->sum_total_amount_due}} EGP

{{$payroll->sum_total_amount_due_aed ?? 0}} AED

{{ $calculatePercentage($payroll->sum_total_eshra7ly_amount, $payroll->sum_total_amount_due, $payroll->sum_old_refund) }} % (EGP)

{{ $calculatePercentage($payroll->sum_total_eshra7ly_amount_aed, $payroll->sum_total_amount_due_aed, $payroll->sum_old_refund_aed) }} % (AED)

{{$payroll->sum_total_eshra7ly_amount}} EGP

{{$payroll->sum_total_eshra7ly_amount_aed ?? 0}} AED

{{ $calculatePercentage($payroll->sum_total_teacher_amount, $payroll->sum_total_amount_due, $payroll->sum_old_refund) }} % (EGP)

{{ $calculatePercentage($payroll->sum_total_teacher_amount_aed, $payroll->sum_total_amount_due_aed, $payroll->sum_old_refund_aed) }} % (AED)

{{$payroll->sum_total_teacher_amount}} EGP

{{$payroll->sum_total_teacher_amount_aed ?? 0}} AED

{{$payroll->sum_old_refund}} EGP

{{$payroll->sum_old_refund_aed ?? 0}} AED
{{round(($payroll->sum_total_teacher_amount + $payroll->sum_total_eshra7ly_amount + $payroll->sum_old_refund) - $payroll->sum_total_amount_due,2)}} {{round(($payroll->sum_total_teacher_amount_aed + $payroll->sum_total_eshra7ly_amount_aed + $payroll->sum_old_refund_aed) - $payroll->sum_total_amount_due_aed,2)}} {{$payroll->from}} {{$payroll->to}}
@endif {{-- commited Transactions --}} @if ($commited_payroll)
@lang('student.filter by')

Committed List

@if (count($commited_payroll) > 0)
@endif
{{-- --}} @php $count=0 @endphp @foreach ($commited_payroll as $payroll) @php // Function to calculate percentage $calculatePercentage=function($amount, $totalAmountDue, $oldRefund) { if ($totalAmountDue == 0 && $oldRefund > 0) { return 0; } elseif ($totalAmountDue == 0) { return round(($amount / 1) * 100, 2); } elseif ($oldRefund > 0) { return round( $amount > 0 && ($totalAmountDue - $oldRefund) > 0 ? ($amount / ($totalAmountDue - $oldRefund)) * 100 : 0, 2 ); } else { return round(($amount / $totalAmountDue) * 100, 2); } } @endphp {{-- --}} @endforeach
IdCourse session teacher team Total amount Total discount Total amount due eshra7ly percentage eshra7ly amount teacher percentage teacher amount old refund from to
{{++$count}} view details {{$payroll->has_label ? ' ( '.$payroll->label.' ) ':''}}{{$payroll->cname . ' (' .$payroll->lshort_name .' )'}} {{$payroll->acyname}} {{$payroll->ttname}}

{{$payroll->sum_total_amount}} EGP

{{$payroll->sum_total_amount_aed ?? 0}} AED

{{$payroll->sum_total_discount_value}} EGP

{{$payroll->sum_total_discount_value_aed ?? 0}} AED

{{$payroll->sum_total_amount_due}} EGP

{{$payroll->sum_total_amount_due_aed ?? 0}} AED

{{ $calculatePercentage($payroll->sum_total_eshra7ly_amount, $payroll->sum_total_amount_due, $payroll->sum_old_refund) }} % (EGP)

{{ $calculatePercentage($payroll->sum_total_eshra7ly_amount_aed, $payroll->sum_total_amount_due_aed, $payroll->sum_old_refund_aed) }} % (AED)

{{$payroll->sum_total_eshra7ly_amount}} EGP

{{$payroll->sum_total_eshra7ly_amount_aed ?? 0}} AED

{{ $calculatePercentage($payroll->sum_total_teacher_amount, $payroll->sum_total_amount_due, $payroll->sum_old_refund) }} % (EGP)

{{ $calculatePercentage($payroll->sum_total_teacher_amount_aed, $payroll->sum_total_amount_due_aed, $payroll->sum_old_refund_aed) }} % (AED)

{{$payroll->sum_total_teacher_amount}} EGP

{{$payroll->sum_total_teacher_amount_aed ?? 0}} AED

{{$payroll->sum_old_refund}} EGP

{{$payroll->sum_old_refund_aed ?? 0}} AED
{{round(($payroll->sum_total_teacher_amount + $payroll->sum_total_eshra7ly_amount + $payroll->sum_old_refund) - $payroll->sum_total_amount_due,2)}} {{round(($payroll->sum_total_teacher_amount_aed + $payroll->sum_total_eshra7ly_amount_aed + $payroll->sum_old_refund_aed) - $payroll->sum_total_amount_due_aed,2)}} {{$payroll->from}} {{$payroll->to}}
@endif
@endsection