@php use Carbon\Carbon; @endphp @extends('layouts.master') @section('title', __('accounting.eduself_manage_salary_invoice_title')) @section('content_title', __('accounting.pay_salary')) @section('content_summary', 'accounting summary') @section('content_taskbar') @endsection @section('main_content')
{{ __('accounting.pay_salary') }}
@php $paid_amounts = 0; $bonus_paid = 0; if ($salary_invoice->salary_transaction && count($salary_invoice->salary_transaction) > 0) { foreach ($salary_invoice->salary_transaction as $key => $value) { $paid_amounts += $value->amount + $value->bonus_amount; $bonus_paid += $value->bonus_amount; } } @endphp
@php $salary = 0; if (floatval($salary_invoice->amount) > $paid_amounts) { $salary -= $paid_amounts; } @endphp
@if (count($salary_invoice->salary_invoice_details) > 0) @foreach ($salary_invoice->salary_invoice_details as $key => $value) @php $max_bonus_due = 0; if ($value->bonus->bonus_type == 2) { $max_bonus_due = $salary_invoice->amount * ($value->bonus->bonus_amount / 100) + $value->extra_bonus - $value->paid; } else { $max_bonus_due = $value->bonus->bonus_amount + $value->extra_bonus - $value->paid; } @endphp @endforeach @else @endif {{-- --}}
{{ __('accounting.bonus') }} {{ __('accounting.extra_bonus') }} {{ __('accounting.bonus_due') }} {{ __('accounting.bonus_pay') }}
No bonus added
Total Total Bonus Total Due Total Paid
@endsection @push('script') @endpush