Payable Informaton:

@php if(isset($historyData->payable_N_deduction->payable->total_value)) { $totalPayableAmount = $historyData->payable_N_deduction->payable->total_value; } else if($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['payable']->total_value)) { $totalPayableAmount = $data['getLatestAmountValue']['payable']->total_value; } else { $totalPayableAmount = $data['org_facilities_info']->grandTotalAmount + (($data['emp_salary_info']['due_salary_info']->total_due != 0) ? $data['emp_salary_info']['due_salary_info']->total_due : $data['emp_salary_info']['due_salary_info']->total_salary) + $data['emp_earn_leave_amount']; } @endphp
Employee Deposit ownTotalAmount)) ? number_format($data['org_facilities_info']->ownTotalAmount, 2) : '0.00' }}' /> Termination Amount payable_N_deduction->payable->termination_amount)) value='{{ $historyData->payable_N_deduction->payable->termination_amount }}' @elseif($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['payable']->termination_amount)) value='{{ $data['getLatestAmountValue']['payable']->termination_amount }}' @else value='' @endif />
Organization Contribution orgTotalAmount + $data['org_facilities_info']->interestTotalAmount), 2) }}' /> Bill/Voucher payable_N_deduction->payable->bill_voucher)) value='{{ $historyData->payable_N_deduction->payable->bill_voucher }}' @elseif($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['payable']->bill_voucher)) value='{{ $data['getLatestAmountValue']['payable']->bill_voucher }}' @else value='' @endif />
Earned Leave Other Payable payable_N_deduction->payable->payable_other)) value='{{ $historyData->payable_N_deduction->payable->payable_other }}' @elseif($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['payable']->payable_other)) value='{{ $data['getLatestAmountValue']['payable']->payable_other }}' @else value='' @endif />
Due Salary total_due != 0) ? number_format($data['emp_salary_info']['due_salary_info']->total_due, 2) : number_format($data['emp_salary_info']['due_salary_info']->total_salary, 2) }}' /> total_due != 0) ? $data['emp_salary_info']['due_salary_info']->total_due : $data['emp_salary_info']['due_salary_info']->total_salary }}' /> Total

@php $totalLoanAmountDeduction = $data['emp_loan_info']['salary_advanced_loan_amount'] + $data['emp_loan_info']['vehicle_loan_amount'] + $data['emp_loan_info']['pf_loan_amount'] + $data['emp_loan_info']['other_advanced'] + $data['emp_loan_info']['wf_loan']; // For other loan if($historyData != null && isset($historyData->payable_N_loan->loan->other_loan)) { $totalLoanAmountDeduction = $totalLoanAmountDeduction + $historyData->payable_N_loan->loan->other_loan; } else if($historyData != null && isset($historyData->loan_N_equipment_N_financial_claim->other_loan)) { $totalLoanAmountDeduction = $totalLoanAmountDeduction + $historyData->loan_N_equipment_N_financial_claim->other_loan; } else if($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['other_loan'])) { $totalLoanAmountDeduction = $totalLoanAmountDeduction + $data['getLatestAmountValue']['other_loan']; } // For fine loan if($historyData != null && isset($historyData->payable_N_loan->loan->fine_loan)) { $totalLoanAmountDeduction = $totalLoanAmountDeduction + $historyData->payable_N_loan->loan->fine_loan; } else if($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['fine_loan'])) { $totalLoanAmountDeduction = $totalLoanAmountDeduction + $data['getLatestAmountValue']['fine_loan']; } // For bm ro amount $totalBmRoAmount = 0; if($historyData != null && isset($historyData->loan_N_equipment_N_financial_claim->equipment->total_value) && isset($historyData->loan_N_equipment_N_financial_claim->financial_claim->total_value)) { $totalBmRoAmount = $historyData->loan_N_equipment_N_financial_claim->equipment->total_value + $historyData->loan_N_equipment_N_financial_claim->financial_claim->total_value; } else if($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['equipment']->total_value) && isset($data['getLatestAmountValue']['financial_claim']->total_value)) { $totalBmRoAmount = $data['getLatestAmountValue']['equipment']->total_value + $data['getLatestAmountValue']['financial_claim']->total_value; } // Total amount $totalDeductionAmount = 0; if($historyData != null && isset($historyData->payable_N_deduction->deduction->total_value)) { $totalDeductionAmount = $historyData->payable_N_deduction->deduction->total_value; } else if($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['deduction']->total_value)) { $totalDeductionAmount = $data['getLatestAmountValue']['deduction']->total_value; } else { $totalDeductionAmount = $totalLoanAmountDeduction + $data['emp_deduction_info']->salary_deduction_receive + $data['emp_deduction_info']->pf + $totalBmRoAmount; } $netPayableTotal = $totalPayableAmount - $totalDeductionAmount; $noticePayAmount = 0; if($historyData == null && !isset($data['getLatestAmountValue']['deduction']) && $data['emp_info']->emp_notice_type == 'Without Notice' && $data['emp_salary_info']['active_salary_structure']->total_salary > 0 && $netPayableTotal > 0) { $noticePayAmount = ($netPayableTotal < $data['emp_salary_info']['active_salary_structure']->total_salary) ? $netPayableTotal : $data['emp_salary_info']['active_salary_structure']->total_salary; $noticePayAmount = round($noticePayAmount, 2); $totalDeductionAmount = $totalDeductionAmount + $noticePayAmount; $netPayableTotal = $totalPayableAmount - $totalDeductionAmount; } else if($historyData == null && !isset($data['getLatestAmountValue']['deduction']) && $data['emp_info']->emp_notice_type == 'Without Notice' && $data['emp_salary_info']['active_salary_structure']->total_salary == 0 && $netPayableTotal > 0) { $noticePayAmount = $netPayableTotal; $noticePayAmount = round($noticePayAmount, 2); $totalDeductionAmount = $totalDeductionAmount + $noticePayAmount; $netPayableTotal = $totalPayableAmount - $totalDeductionAmount; } @endphp

Deduction:

@php $noticeType = null; if(isset($bossHistory->file_type) && $bossHistory->file_type != null) { $noticeType = $bossHistory->file_type; } else if($data['latest_notice_type'] != null) { $noticeType = $data['latest_notice_type']->file_type; } else { $noticeType = $data['emp_info']->emp_notice_type; } @endphp
Salary Advanced Information From BM of RO
Vehicle Loan PFC & Interest pf, 2) }}' type='text' style='text-align: right' readonly/> pf }}' />
PF Loan Notice Pay total_salary != 0) ? $data['emp_salary_info']['active_salary_structure']->total_salary : 0.00 }}' /> payable_N_deduction->deduction->notice_pay)) value='{{ $historyData->payable_N_deduction->deduction->notice_pay }}' @elseif($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['deduction']->notice_pay)) value='{{ $data['getLatestAmountValue']['deduction']->notice_pay }}' @else value='{{ ($data['emp_info']->emp_notice_type == 'Without Notice') ? $noticePayAmount : 0.00 }}' @endif readonly />
Other Loan Excess Consumed Leave payable_N_deduction->deduction->excess_consumed_leave)) value='{{ $historyData->payable_N_deduction->deduction->excess_consumed_leave }}' @elseif($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['deduction']->excess_consumed_leave)) value='{{ $data['getLatestAmountValue']['deduction']->excess_consumed_leave }}' @else value='' @endif />
Other Advance Salary Deduction salary_deduction_receive, 2) }}' type='text' style='text-align: right' readonly/> salary_deduction_receive }}' />
Fine Dismissal Deduction payable_N_deduction->deduction->dismissal_deduction)) value='{{ $historyData->payable_N_deduction->deduction->dismissal_deduction }}' @elseif($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['deduction']->dismissal_deduction)) value='{{ $data['getLatestAmountValue']['deduction']->dismissal_deduction }}' @else value='' @endif />
Notice Type Maternity Leave Salary Return payable_N_deduction->deduction->ml_salary_return)) value='{{ $historyData->payable_N_deduction->deduction->ml_salary_return }}' @elseif($data['getLatestAmountValue'] != null && isset($data['getLatestAmountValue']['deduction']->ml_salary_return)) value='{{ $data['getLatestAmountValue']['deduction']->ml_salary_return }}' @else value='' @endif />
Wf Contri. Total

Total Payable {{ (isset($totalPayableAmount)) ? number_format($totalPayableAmount, 2) : '0.00' }} Total Deduction {{ (isset($totalDeductionAmount)) ? number_format($totalDeductionAmount, 2) : '0.00' }} Net Payable {{ number_format($netPayableTotal, 2) }}