From 17e26be475979cba094860ffab1dfd443adaf1a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=B0=20=E6=9C=B1?= <501697962@qq.com>
Date: Mon, 6 Dec 2021 11:25:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E5=8F=91=E8=B4=A7=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=20=E4=BF=AE=E8=AE=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
NX.ERP.U8/Pmc/PmcQuery.cs | 20 +++++++++++++++++---
NX.ERP.Webapp/src/App.vue | 10 ++++++----
NX.ERP.Webapp/src/views/inventory-sale.vue | 11 ++++++++++-
3 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/NX.ERP.U8/Pmc/PmcQuery.cs b/NX.ERP.U8/Pmc/PmcQuery.cs
index b2bdc99..70f0fbd 100644
--- a/NX.ERP.U8/Pmc/PmcQuery.cs
+++ b/NX.ERP.U8/Pmc/PmcQuery.cs
@@ -860,7 +860,7 @@ select *from tempdb..tablepzck20210526
,
isnull(cs.qty,0) as xcl,
b.cVerifier
- ,
+ ,case when (
isnull(
(SELECT isnull(SUM(iquantity),0) qty
FROM currentstock WITH (nolock) where cInvCode=a.cInvCode
@@ -872,7 +872,19 @@ select *from tempdb..tablepzck20210526
GROUP BY ipesodid) dd on isnull(dd.ipesodid,'')=isnull(aa.iSOsID ,'')
where aa.cInvCode=a.cInvCode and bb.cVerifier is not null and isnull(CONVERT(varchar(100),aa.dPreDate, 23),'1900-01-01')<=isnull(CONVERT(varchar(100),a.dPreDate, 23),'1900-01-01') and (aa.iQuantity - isnull(dd.cqty,0))>0
group by aa.cInvCode
- ) as kcyl
+ ) )>0 then 0 else (
+ isnull(
+ (SELECT isnull(SUM(iquantity),0) qty
+ FROM currentstock WITH (nolock) where cInvCode=a.cInvCode
+ GROUP BY cInvCode
+ ),0)-( select sum(aa.iQuantity - isnull(dd.cqty,0)) as swfiQuantity from SO_SODetails aa WITH (nolock) LEFT JOIN
+ SO_SOMain bb WITH (nolock) on aa.ID=bb.id left join
+ (SELECT ipesodid, sum(iQuantity) AS cqty
+ FROM rdrecords32 WITH (nolock)
+ GROUP BY ipesodid) dd on isnull(dd.ipesodid,'')=isnull(aa.iSOsID ,'')
+ where aa.cInvCode=a.cInvCode and bb.cVerifier is not null and isnull(CONVERT(varchar(100),aa.dPreDate, 23),'1900-01-01')<=isnull(CONVERT(varchar(100),a.dPreDate, 23),'1900-01-01') and (aa.iQuantity - isnull(dd.cqty,0))>0
+ group by aa.cInvCode
+ ) ) end as kcyl
,
CONVERT(varchar(100),a.dPreDate, 23) as dPreDate , a.cMemo,
CASE
@@ -889,11 +901,13 @@ select *from tempdb..tablepzck20210526
GROUP BY ipesodid) d on d.ipesodid=a.iSOsID
left join
(SELECT cinvcode, SUM(iquantity) qty
- FROM currentstock WITH (nolock)
+ FROM currentstock WITH (nolock) where cWhCode not in (4,5)
GROUP BY cInvCode) cs ON a.cInvCode = cs.cInvCode
left join Customer f WITH (nolock) on b.cCusCode=f.cCusCode
left join Inventory g WITH (nolock) on g.cInvCode=a.cInvCode ) mm
+
+
diff --git a/NX.ERP.Webapp/src/App.vue b/NX.ERP.Webapp/src/App.vue
index 6702b64..c506fab 100644
--- a/NX.ERP.Webapp/src/App.vue
+++ b/NX.ERP.Webapp/src/App.vue
@@ -6,21 +6,22 @@