select
c.Full_Name,
c.cand_code,
f.Para_Description Department,
g.Para_Description Designation,
a.salary_Month,
c.Full_Name,
c.cand_code,
f.Para_Description Department,
g.Para_Description Designation,
a.salary_Month,
a.salary_year,
b.Basic,
b.current_basic,
e.Earning,
b.GrossSalary,
d.Deduction,
b.PT_Cal,
b.Net_salary
from Salary_DeptGen_Mst a
inner join Salary_DeptGen_Det b on a.co_Code = b.co_Code and a.urn_no = b.urn_no
left outer join HR_EMPLOYEEDETAIL_MASTER c on b.co_Code = c.co_Code and b.Emp_ID=c.URN_No
left outer join (
select round(sum(isnull(amount_e,0)),2) Earning,Employee_CodeE,URN_No,CO_CODE from Salary_Generation_Earning where co_code = @Prm_Co_Code group by Employee_CodeE,URN_No,co_Code) as E
on b.co_Code = e.co_code and b.urn_no = e.urn_no and b.Emp_ID = e.Employee_CodeE
left outer join (select round(sum(isnull(amount_d,0)),2) Deduction,Employee_Coded,URN_No,CO_CODE from Salary_Generation_Deduction where co_code = @Prm_Co_Code group by Employee_Coded,URN_No,co_Code) as d
on b.co_Code = d.co_code and b.urn_no = d.urn_no and b.Emp_ID = d.Employee_Coded
left outer join Parameter_Department f on c.co_Code = f.co_code and f.urn_no = c.dept_code
left outer join parameter_designation g on c.co_code = g.co_code and c.desi_code=g.URN_No
where a.co_Code = @Prm_Co_Code and a.salary_status = 'Approved'
No comments:
Post a Comment