@extends('layouts.horizontal', ['title' => 'Staff Payment Calculator', 'topbarTitle' => 'Staff Payment Calculator']) @section('css') @vite(['node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css', 'node_modules/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css', 'node_modules/datatables.net-fixedcolumns-bs5/css/fixedColumns.bootstrap5.min.css', 'node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css', 'node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css', 'node_modules/datatables.net-select-bs5/css/select.bootstrap5.min.css', 'node_modules/dropzone/dist/dropzone.css', 'node_modules/select2/dist/css/select2.min.css', 'node_modules/flatpickr/dist/flatpickr.min.css']) @endsection @section('content')
| ID | Name | Branch | Basic Salary | Total Overtime | Salary (Excl. OT) | Salary Type | Commission Mode | Income Generated | Service Commission | Retail Commission | @php $allowance_list=0; @endphp @foreach($allowances as $allowance){{ $allowance->allowance_name }} @php $allowance_list++; @endphp | @endforeachMiscellaneous | Reimbursements | Provident Fund 'Employer' | Deduction Absents | Deduction Late | Provident Fund 'Employee' | Tax Deduction | Other Deduction | Loan Deduction | Total Payable (Excl. OT) | Total Deductions | Final Payable (Incl. OT) | Decimal Adjustment | Actions |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $rowId }} | {{ $payable['staff_fullname'] ?? 'N/A' }} | {{ $payable['business_name'] ?? ($business->business_name ?? 'N/A') }} | {{ number_format($basicSalary, 2) }} | {{ number_format($totalOTAmount, 2) }} | {{ number_format($salaryWithoutOT, 2) }} | {{ ucfirst($salaryType) }} | {{ $payable['commission_mode'] ?? 'N/A' }} | {{ number_format($payable['service_income'] + $payable['retail_income'] ?? 0, 2) }} | {{ number_format($serviceCommission, 2) }} | {{ number_format($retailCommission, 2) }} | @foreach($allowances as $a) @php $allowance_amount = $allowance_amounts[$a->entity_name] ?? 0; @endphp{{ number_format($allowance_amount, 2) }} | @endforeach0.00 | 0.00 | {{ number_format($employerPF, 2) }} | {{ number_format($absentDeduction, 2) }} | {{ number_format($lateDeduction, 2) }} | {{ number_format($employeePF, 2) }} | {{ number_format($taxDeduction, 2) }} | 0.00 | {{ number_format($loanDeduction, 2) }} | {{ number_format($tr_payable_without_ot, 2) }} | {{ number_format($tr_deductions, 2) }} | {{ floor($tr_final_payable_with_ot) }} | {{ number_format($tr_final_payable_with_ot - floor($tr_final_payable_with_ot), 2) }} | |
| Grand Totals: | {{ number_format($grandTotalBasicSalary, 2) }} | {{ number_format($grandTotalOTAmount, 2) }} | {{ number_format($grandTotalSalaryWithoutOT, 2) }} | {{ number_format(($payable['service_income'] + $payable['retail_income'] ?? 0) * ($x-1), 2) }} | {{ number_format($serviceCommission * ($x-1), 2) }} | {{ number_format($retailCommission * ($x-1), 2) }} | @foreach($allowances as $allowance) @php $allowanceTotal = 0; if(isset($allowance_amounts[$allowance->entity_name])) { $allowanceTotal = $allowance_amounts[$allowance->entity_name] * ($x-1); } @endphp{{ number_format($allowanceTotal, 2) }} | @endforeach0.00 | 0.00 | {{ number_format($employerPF * ($x-1), 2) }} | {{ number_format($absentDeduction * ($x-1), 2) }} | {{ number_format($lateDeduction * ($x-1), 2) }} | {{ number_format($employeePF * ($x-1), 2) }} | {{ number_format($taxDeduction * ($x-1), 2) }} | 0.00 | {{ number_format($loanDeduction * ($x-1), 2) }} | {{ number_format($grandTotalPayableWithoutOT, 2) }} | {{ number_format($grandTotalDeductions, 2) }} | {{ number_format($grandTotalFinal, 2) }} | {{ number_format($grandTotalAdjustment, 2) }} | |||||
Please select staff, month, and year filters and click "Calculate" to generate payment data.
@if($staffId > 0)