From d8579ea30c793dee7b9f3695ee64543ab21c4e2e Mon Sep 17 00:00:00 2001 From: Choins Date: Fri, 13 Mar 2026 11:48:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B5=9C=EB=82=A8=EC=8B=9D=20::=2020260225=20:?= =?UTF-8?q?:=20=EC=88=98=EB=8B=B9=20=EA=B2=B0=EC=9E=AC=20=EA=B8=B0?= =?UTF-8?q?=EA=B0=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inspection/Ajax_Money.asp | 58 ++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/inspection/Ajax_Money.asp b/inspection/Ajax_Money.asp index f65567f..c44839f 100644 --- a/inspection/Ajax_Money.asp +++ b/inspection/Ajax_Money.asp @@ -24,28 +24,30 @@ query = query &" LEFT OUTER JOIN project2.dbo.bank B WITH(NOLOCK) ON m.M_ban query = query &" LEFT OUTER JOIN project2.dbo.Document D WITH(NOLOCK) ON isnull(TMP.attribute05,'') = D.d_no"&VbCrlf query = query &" where D.d_order_cnt = '77' " if MoneyDate = "2022-04" Then - query = query &" and work_dt between '"&MoneyDate&"-01' and '"&MoneyDate&"-25' " + query = query &" and D.d_write_date between '"&MoneyDate&"-01' and '"&MoneyDate&"-25' " elseif MoneyDate > "2022-04" Then + '최남식 :: 20260310 :: 조회기준 변경 + if MoneyDate < "2026-02" Then + query = query &" and ( D.d_write_date between cast(DATEADD(m,-1,cast('"&MoneyDate&"-26' as date))as varchar) and '"&MoneyDate&"-25' " + query = query &" or ( '"&MoneyDate&"' = '2023-07' and TMP.attribute05 in ('KRC-2023-t-00507','KRC-2023-t-00506','KRC-2023-t-00505')))" + elseif MoneyDate > "2026-01" Then + if MoneyDate = "2026-02" Then + '26년 2월: 2/6일 ~ 3/10일(고정) + query = query & " and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar) " + Else + '26년3월 이후 : 지출결의일 기준 해당월11일~다음달10일 + query = query & " and D.d_write_date between '"&MoneyDate&"-11' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar) " + End If + End If '''''''''''''''''''20230807 박준성 하지윤 선임의 지결 누락으로 인한 하드코드로 특정 문서 2023-07월에 나올수 있도록 수정 '''''''''''''''''''query = query &" and work_dt between cast(DATEADD(m,-1,cast('"&MoneyDate&"-26' as date))as varchar) and '"&MoneyDate&"-25' " - '최남식 :: 20260225 :: 수당 결재 기간 변경 - If Right(MoneyDate, 2) = "02" Then - '2월: 전달 26일 ~ 2월 28일(고정) - query = query & " and (work_dt between cast(DATEADD(m,-1,cast('" & MoneyDate & "-26' as date)) as varchar(10)) and '" & MoneyDate & "-28' " - ElseIf CInt(Right(MoneyDate, 2)) < 3 Then - '2월 이전(1월 등): 전달 26일 ~ 해당달 25일 - query = query & " and (work_dt between cast(DATEADD(m,-1,cast('" & MoneyDate & "-26' as date)) as varchar(10)) and '" & MoneyDate & "-25' " - Else - '3월부터: 해당달 1일 ~ 말일 - query = query & " and (work_dt between '" & MoneyDate & "-01' and convert(varchar(10),EOMONTH(cast('" & MoneyDate & "-01' as date)),23) " - End If 'query = query &" and ( work_dt between cast(DATEADD(m,-1,cast('"&MoneyDate&"-26' as date))as varchar) and '"&MoneyDate&"-25' " - query = query &" or ( '"&MoneyDate&"' = '2023-07' and TMP.attribute05 in ('KRC-2023-t-00507','KRC-2023-t-00506','KRC-2023-t-00505')))" + 'query = query &" or ( '"&MoneyDate&"' = '2023-07' and TMP.attribute05 in ('KRC-2023-t-00507','KRC-2023-t-00506','KRC-2023-t-00505')))" '''''''''''''''''''20241205 이재은 조민아 책임의 내근직 수당 지결 누락으로 인한 하드코드로 특정 문서 수당관리(n) 2024-11월에 나올수 있도록 수정 but 반영 취소 ' query = query &" or ( '"&MoneyDate&"' = '2023-07' and TMP.attribute05 in ('KRC-2023-t-00507','KRC-2023-t-00506','KRC-2023-t-00505'))" ' query = query &" or ( '"&MoneyDate&"' = '2024-11' and TMP.attribute05 in ('KRC-2024-t-01104')))" else - query = query & " and LEFT(work_dt, 7) = '" & MoneyDate & "' " + query = query & " and LEFT(D.d_write_date, 7) = '" & MoneyDate & "' " end if query = query &" AND NW.in_time + NW.out_time + NW.p_sebu_code <> '000000004'"&VbCrlf query = query &" "&VbCrlf @@ -64,7 +66,19 @@ query = query &" where D.d_order_cnt = '77'"&VbCrlf if MoneyDate = "2022-04" Then query = query &" and D.d_write_date between '"&MoneyDate&"-16' and cast(DATEADD(m,1,cast('"&MoneyDate&"-05' as date)) as varchar)"&VbCrlf elseif MoneyDate > "2022-04" Then - query = query &" and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar)"&VbCrlf + '최남식 :: 20260310 :: 조회기준 변경 + if MoneyDate < "2026-02" Then + query = query &" and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar)"&VbCrlf + elseif MoneyDate > "2026-01" Then + if MoneyDate = "2026-02" Then + '26년 2월: 2/6일 ~ 3/10일(고정) + query = query & " and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar) " + Else + '26년3월 이후 : 지출결의일 기준 해당월11일~다음달10일 + query = query & " and D.d_write_date between '"&MoneyDate&"-11' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar) " + End If + End If + 'query = query &" and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar)"&VbCrlf else query = query &" and D.d_write_date between '"&MoneyDate&"-16' and cast(DATEADD(m,1,cast('"&MoneyDate&"-15' as date)) as varchar)"&VbCrlf end if @@ -84,7 +98,19 @@ query = query &" where TMP.confirm_yn = 'Y' and s_sum <> '0' and D.d_order_c if MoneyDate = "2022-04" Then query = query &" and D.d_write_date between '"&MoneyDate&"-16' and cast(DATEADD(m,1,cast('"&MoneyDate&"-05' as date)) as varchar)"&VbCrlf elseif MoneyDate > "2022-04" Then - query = query &" and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar)"&VbCrlf + '최남식 :: 20260310 :: 조회기준 변경 + if MoneyDate < "2026-02" Then + query = query &" and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar)"&VbCrlf + elseif MoneyDate > "2026-01" Then + if MoneyDate = "2026-02" Then + '26년 2월: 2/6일 ~ 3/10일(고정) + query = query & " and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar) " + Else + '26년3월 이후 : 지출결의일 기준 해당월11일~다음달10일 + query = query & " and D.d_write_date between '"&MoneyDate&"-11' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar) " + End If + End If + 'query = query &" and D.d_write_date between '"&MoneyDate&"-06' and cast(DATEADD(m,1,cast('"&MoneyDate&"-10' as date)) as varchar)"&VbCrlf else query = query &" and D.d_write_date between '"&MoneyDate&"-16' and cast(DATEADD(m,1,cast('"&MoneyDate&"-15' as date)) as varchar)"&VbCrlf end if