Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
srivastava-jyoti committed Jul 22, 2024
1 parent 4510b83 commit 660ddf9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Modules/Salary/Http/Controllers/SalaryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function generateAppraisalLetter(Request $request, Employee $employee)
$pdf = $salaryService->getIncrementLetterPdf($request->all());

return $pdf->inline($employee->user->name . '_Increment Letter_' . Carbon::parse($request->commencementDate)->format('jS F Y') . '.pdf');
} else if ($employee->payroll_type === 'contractor') {
} elseif ($employee->payroll_type === 'contractor') {
$pdf = $salaryService->getContractorOnboardingLetterPdf($request->all());

return $pdf->inline($employee->user->name . '_Onboarding Letter_' . Carbon::parse($request->commencementDate)->format('jS F Y') . '.pdf');
Expand Down
2 changes: 0 additions & 2 deletions Modules/Salary/Services/SalaryCalculationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,4 @@ public function getContractorOnboardingLetterPdf($data)

return $pdf;
}


}
2 changes: 1 addition & 1 deletion Modules/Salary/Services/SalaryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function storeOrUpdateContractorSalary($request, $employee)
$pdf = $salaryService->getIncrementLetterPdf($appraisalData);
Mail::to($data['employeeEmail'])->send(new SendContractorIncrementLetterMail($data, $pdf->inline($data['employeeName'] . '_Increment Letter_' . $formattedCommencementDate . '.pdf'), $formattedCommencementDate));
}

EmployeeSalary::create([
'employee_id' => $employee->id,
'monthly_fee' => $request->contractorFee,
Expand Down

0 comments on commit 660ddf9

Please sign in to comment.