Browse Source

update

Branch_PaiNaWeiSJob
shiqian.wang 2 months ago
parent
commit
98bbd460b3
  1. 6
      ICSSoft.FromERP/SK/YERP_010_BOH.cs
  2. 6
      ICSSoft.FromERP/SK/YERP_010_EOH.cs

6
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

6
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

Loading…
Cancel
Save