Project

General

Profile

Bug #942

[HR-TIME DATA] Report Time Sheet Recap salah membaca nilai keterlambatan dan data2 lain nya

Added by Muhammad Bintar over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Start date:
03/07/2022
Due date:
03/10/2022
% Done:

0%

Estimated time:
Spent time:

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

clipboard-202203071405-cj0mi.png (57.2 KB) clipboard-202203071405-cj0mi.png Muhammad Bintar, 03/07/2022 02:05 PM
clipboard-202203071409-uvi0a.png (75.1 KB) clipboard-202203071409-uvi0a.png Muhammad Bintar, 03/07/2022 02:09 PM
#1

Updated by M Azid Wahyudi over 2 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

#2

Updated by Muhammad Bintar over 2 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

#3

Updated by Muhammad Bintar over 2 years ago

  • Status changed from QA Test to Closed
  • Assignee changed from Muhammad Bintar to M Azid Wahyudi

Also available in: Atom PDF