Bug #1951
script job untuk membaca overtime 1 bulan sebelum payroll berjalan tidak dapat mengambil data overtime di desember
0%
Description
dear tim developer mohon support nya untuk perbaikan pada data overtime dimana data overtime dari tampungan tidak dapat diambil karena datanya itu lintas tahun.
remote.minovais.com, 1445\MSSQLSERVER2019
Files
Updated by Kezia Pawitra Yulianti about 2 years ago
- Status changed from New to Assigned
- Priority changed from Normal to Immediate
Updated by Saswanto Tampan about 2 years ago
- Status changed from Assigned to Revise
- Assignee changed from Saswanto Tampan to Muhammad Bintar
mana contoh datanya buat test query
Updated by Saswanto Tampan about 2 years ago
- Status changed from Revise to Assigned
- Assignee changed from Muhammad Bintar to Mohammad Daud
SCRIPT JOB DI GANTI SAMA YANG BARU :
USE MinovaES_HINO_Prod
select distinct pt16.StartDate,pt16.EndDate,pt16.EmployeeID,pt16.OvertimeType,pt16.StartTime,pt16.EndTime,pt16.DayType,pt16.Duration
,pt16.DayBeforeFlag,pt16.PlanDuration,pt16.StartPlan,pt16.EndPlan,pt16.Notes,pt16.CreateBy,pt16.CreateDate,pt16.ChangeBy,pt16.ChangeDate
into #PHRPA0016 from PHRPAT016 pt16 left outer join
PHRPA0002 pa2 on pa2.EmployeeID = pt16.EmployeeID and (pt16.StartDate between pa2.StartDate and pa2.EndDate) left outer join
PHRPYPGCTRL ctrl on ctrl.PayrollGroup = pa2.PayrollGroup
where left(pt16.EndDate,6) <=
CASE
WHEN RIGHT='00' THEN convert(varchar, left(ctrl.PayrollPeriod,4)-1) + convert(varchar, RIGHT)
else ctrl.PayrollPeriod-1
END
and left(ctrl.PayrollPeriod,4) = left(pt16.StartDate,4) and ctrl.PayrollControlStatus='C'
insert into PHRPA0016 select * from #PHRPA0016
update PHRPA0015 set RetroDate= case
when PHRPA0015.RetroDate ='' then a.StartDate
when PHRPA0015.RetroDate > a.StartDate then a.StartDate end,
CorrectStatus='1' from (SELECT TOP StartDate,EmployeeID from #PHRPA0016 ORDER BY StartDate asc)a
where PHRPA0015.EmployeeID=a.EmployeeID
DELETE FROM PHRPAT016 WHERE EmployeeID+StartDate IN (select EmployeeID+StartDate from #PHRPA0016)
drop table #PHRPA0016
Updated by Kezia Pawitra Yulianti almost 2 years ago
task ini apa sudah solve dan di deploy ke client?