Bug #2687
[ESS-OVERTIME] pengajuan overtime di jadwal setelah jam kerja dan di anggap backdated, tetapi malah masuk ke requester confirmation padahal seharusnya tidak perlu.
Description
dear tim developer mohon supportnya untuk pengecekan pada ess overtime di regid 63031 dimana ada pengajuan di jam 11 siang untuk overtime di jam 00.01 sampai 07.00 dan kondisi nya dianggap backdated tetapi setelah di approve oleh atasan malah masuk ke requester confirmation. padahal seharusnya tidak perlu dan harus finish complete.
condition taskid nya cond_backdated
ini query nya
DECLARE @empid_requester VARCHAR = '00000320'
DECLARE @date_in VARCHAR = '20240403'
DECLARE @reg_id VARCHAR= '63031' DECLARE @time_now AS VARCHAR
= dbo.fn_formatdatetime(
GETDATE,
'hhnn'
);
DECLARE @today AS VARCHAR = dbo.fn_formatdatetime(GETDATE, 'yyyymmdd');
DECLARE @ws_endtime AS VARCHAR;
--DECLARE @date_in AS VARCHAR;
DECLARE @time_in AS VARCHAR;
DECLARE @time_created AS VARCHAR;
DECLARE @date_created AS VARCHAR;
SELECT @time_created = SUBSTRING
FROM dbo.PCMWFRUNMAIN
WHERE RegID = @reg_id;
SELECT @date_created = SUBSTRING
FROM dbo.PCMWFRUNMAIN
WHERE RegID = @reg_id;
SELECT @ws_endtime = end_time
FROM [dbo].[GetEmpWsType](@empid_requester, @date_in);
SELECT @date_in = dt.Value
FROM dbo.PCMWFRUNBIZDATA dt
WHERE dt.RegID = @reg_id
AND dt.FieldID = 'DateFrom'
AND dt.Sequence =
(
SELECT MAX
FROM dbo.PCMWFRUNBIZDATA dt2
WHERE dt.BizProcessID = dt2.BizProcessID
AND dt.RegID = dt2.RegID
AND dt.FieldID = dt2.FieldID
);
SELECT @time_in = dt.Value
FROM dbo.PCMWFRUNBIZDATA dt
WHERE dt.RegID = @reg_id
AND dt.FieldID = 'TimeStart'
AND dt.Sequence =
(
SELECT MAX
FROM dbo.PCMWFRUNBIZDATA dt2
WHERE dt.BizProcessID = dt2.BizProcessID
AND dt.RegID = dt2.RegID
AND dt.FieldID = dt2.FieldID
);
SELECT CASE
WHEN @date_created > @date_in THEN
1
ELSE
CASE
WHEN @date_created = @date_in
AND @time_created > @time_in
AND @time_in > @ws_endtime THEN
1
ELSE
0
END
END AS res;
====
hasil result nya bernilai 0.
remote.minovais.com:61123
database sql
remote.minovais.com, 1452
BBG Prod
Files