From d76ab1855ec68432a1b362c5d922af7235658d10 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Tue, 11 Nov 2025 08:44:22 +0000 Subject: (임수민) 구매 피드백 수정사항들 PO 금액 표시, RFQ 품목 컬럼 추가, 스크롤 시 헤더 고정, 납기일과 SAP 한국시간, 히스토리 수정 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/soap/ecc/mapper/rfq-and-pr-mapper.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'lib/soap') diff --git a/lib/soap/ecc/mapper/rfq-and-pr-mapper.ts b/lib/soap/ecc/mapper/rfq-and-pr-mapper.ts index cc241aa6..85fbb918 100644 --- a/lib/soap/ecc/mapper/rfq-and-pr-mapper.ts +++ b/lib/soap/ecc/mapper/rfq-and-pr-mapper.ts @@ -240,9 +240,20 @@ export function mapECCRfqItemToRfqPrItem( // 날짜 파싱 let deliveryDate: Date | null = null; - if (eccItem.LFDAT) { - const dateStr = parseSAPDateTime(eccItem.LFDAT, '000000'); - deliveryDate = dateStr; + if (eccItem.LFDAT && eccItem.LFDAT.length === 8) { + try { + // YYYYMMDD 형식을 YYYY-MM-DD로 변환 후 한국 시간 기준으로 설정 + const year = eccItem.LFDAT.substring(0, 4); + const month = eccItem.LFDAT.substring(4, 6); + const day = eccItem.LFDAT.substring(6, 8); + // 한국 시간(KST, UTC+9) 기준으로 날짜 생성 + deliveryDate = new Date(`${year}-${month}-${day}T00:00:00+09:00`); + } catch (error) { + debugError('SAP 날짜 파싱 오류', { + lfdat: eccItem.LFDAT, + error, + }); + } } const mappedData: RfqPrItemData = { -- cgit v1.2.3