Bug #942
[HR-TIME DATA] Report Time Sheet Recap salah membaca nilai keterlambatan dan data2 lain nya
Description
dear tim developer mohon support nya untuk perbaikan pada report timesheet recap karena pada kolom2 tersebut masih ada yang perlu diperbaiki:
contoh employee 00000058 di filter pada tanggal 01 feb 2022 sampai 28 feb 2022 untuk karyawan Head office
- kolom attendance type harus diisi dengan attendance description.
- jumlah nilai attendance type tidak sesuai seharusnya ada 28 hari, dan attendance type di bulan februari tersebut hanya attendance type 1000 tetapi muncul juga attendance 3000 yang seharusnya tidak ada.
- frekuensi keterlambatan hari seharusnya ada 18 hari tetapi terbaca 19 hari.
- frekuensi keterlambatan menit seharus nya tidak segitu nilai nya.
- absence type seharusnya tidak ada di bulan februari ini.
Files
Updated by M Azid Wahyudi almost 3 years ago
- Status changed from New to QA Test
- Assignee changed from M Azid Wahyudi to Muhammad Bintar
dear mas bintar , udah bisa di test ya
untuk perubahannya hanya di sp saja berikut ini spnya :
[Rpt_Rohto_HR_TM_TimeSheetRecap]
makasih mas bintar
Updated by Muhammad Bintar almost 3 years ago
update:
ada tambahan di functions,scalar valueable,
nama function nya fn_diffTime
isi query sebagai berikut :
USE [MinovaES_Rohto_Prod]
GO
/****** Object: UserDefinedFunction [dbo].[fn_diffTime] Script Date: 08/03/2022 15:39:05 **/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[fn_diffTime]
(
-- Add the parameters for the function here
@firstDateStr varchar(8),
@secondDateStr varchar(8),
@firstTime AS varchar(8),
@secondTime AS varchar(8)
)
RETURNS decimal(18,2)
AS
BEGIN
--DECLARE @firstDateStr AS varchar(8) = '20141001'
--DECLARE @secondDateStr AS varchar(8) = '20141001'
--DECLARE @firstTime AS varchar(8) = '1830'
--DECLARE @secondTime AS varchar(8) = ''
--DECLARE @type AS nvarchar(50) = hour
-- Declare the return variable here
DECLARE @firstDate AS datetime
DECLARE @secondDate AS datetime
DECLARE @diffDate AS decimal(18,2)
if (@secondTime = '')
SET @secondTime =
(select @firstTime)
if (@firstDate = '')
SET @firstDate =
(select @secondTime)
SET @firstDate = CAST((SUBSTRING(@firstDateStr, 1, 4) + '-' + SUBSTRING(@firstDateStr, 5, 2) + '-' + SUBSTRING(@firstDateStr, 7, 2) +
' ' + SUBSTRING(@firstTime, 1, 2) + ':' + SUBSTRING(@firstTime, 3, 2)) AS datetime)
SET @secondDate = CAST((SUBSTRING(@secondDateStr, 1, 4) + '-' + SUBSTRING(@secondDateStr, 5, 2) + '-' + SUBSTRING(@secondDateStr, 7, 2) +
' ' + SUBSTRING(@secondTime, 1, 2) + ':' + SUBSTRING(@secondTime, 3, 2)) AS datetime)
-- Add the T-SQL statements to compute the return value here
SELECT @diffDate = Datediff(minute, @firstDate, @secondDate)
if (@diffDate < 0)
begin
SET @diffDate = 0
end
else
begin
--SET @secondDate =
--(select dateadd(dd,1,@secondDate))
SET @diffDate =
(select Datediff(minute, @firstDate, @secondDate))
-- Return the result of the function
SET @diffDate =
(select @diffDate/60)
end
--SET @diffDate =
--(select round(@diffDate,2))
RETURN @diffDate
END
Updated by Muhammad Bintar almost 3 years ago
- Status changed from QA Test to Closed
- Assignee changed from Muhammad Bintar to M Azid Wahyudi