From 98bbd460b3709cef970786677cb17320ad7a873f Mon Sep 17 00:00:00 2001 From: "shiqian.wang" Date: Wed, 4 Sep 2024 13:14:15 +0800 Subject: [PATCH] update --- ICSSoft.FromERP/SK/YERP_010_BOH.cs | 6 +++--- ICSSoft.FromERP/SK/YERP_010_EOH.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ICSSoft.FromERP/SK/YERP_010_BOH.cs b/ICSSoft.FromERP/SK/YERP_010_BOH.cs index 72185b9..bce6564 100644 --- a/ICSSoft.FromERP/SK/YERP_010_BOH.cs +++ b/ICSSoft.FromERP/SK/YERP_010_BOH.cs @@ -132,9 +132,9 @@ namespace ICSSoft.FromERP 'BOH' STCK_TYPE_CD, CAST(a.iQuantity as decimal(10,3)) STCK_QTY, CAST(a.iQuantity * ABS(ISNULL(d.STCK_VALUE_CNW,0)) as decimal(10,3)) STCK_VALUE_CNY, - (case when cInvStd is null then null else (CASE WHEN ISNUMERIC(left(cinvstd,3)) = 1 THEN REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,3),'') ELSE (CASE WHEN ISNUMERIC(left(cinvstd,2)) = 1 - THEN REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,2),'') ELSE (CASE WHEN ISNUMERIC(left(cinvstd,1)) = 1 - THEN REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,1),'') ELSE '' END) END) END) end) STCK_UOM, + (case when cInvStd is null then null else (CASE WHEN ISNUMERIC(left(cinvstd,3)) = 1 THEN LOWER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,3),'')) ELSE (CASE WHEN ISNUMERIC(left(cinvstd,2)) = 1 + THEN LOWER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,2),'')) ELSE (CASE WHEN ISNUMERIC(left(cinvstd,1)) = 1 + THEN LOWER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,1),'')) ELSE '' END) END) END) end) STCK_UOM, cInvStd PACK_MIN_QTY, COUNT(*) OVER (PARTITION BY getdate()) GEN_ROW_CNT from CurrentStock a diff --git a/ICSSoft.FromERP/SK/YERP_010_EOH.cs b/ICSSoft.FromERP/SK/YERP_010_EOH.cs index 2a128f2..d07ed1c 100644 --- a/ICSSoft.FromERP/SK/YERP_010_EOH.cs +++ b/ICSSoft.FromERP/SK/YERP_010_EOH.cs @@ -94,9 +94,9 @@ namespace ICSSoft.FromERP 'EOH' STCK_TYPE_CD, CAST(SUM(ISNULL(a.iAInQuantity,0)) - SUM(ISNULL(a.iAOutQuantity,0)) as decimal(10,3)) STCK_QTY, CAST(SUM(ISNULL(iAInPrice,0)) - SUM(ISNULL(iAOutPrice,0)) as decimal(10,3)) STCK_VALUE_CNY, - (case when cInvStd is null then null else (CASE WHEN ISNUMERIC(left(cinvstd,3)) = 1 THEN UPPER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,3),'')) ELSE (CASE WHEN ISNUMERIC(left(cinvstd,2)) = 1 - THEN UPPER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,2),'')) ELSE (CASE WHEN ISNUMERIC(left(cinvstd,1)) = 1 - THEN UPPER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,1),'')) ELSE '' END) END) END) end) STCK_UOM, + (case when cInvStd is null then null else (CASE WHEN ISNUMERIC(left(cinvstd,3)) = 1 THEN LOWER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,3),'')) ELSE (CASE WHEN ISNUMERIC(left(cinvstd,2)) = 1 + THEN LOWER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,2),'')) ELSE (CASE WHEN ISNUMERIC(left(cinvstd,1)) = 1 + THEN LOWER(REPLACE(SUBSTRING(cinvstd, 1, CHARINDEX('/', cinvstd) - 1),left(cinvstd,1),'')) ELSE '' END) END) END) end) STCK_UOM, cInvStd PACK_MIN_QTY from IA_Subsidiary a left join dbo.Inventory c on a.cInvCode=c.cInvCode