From 7bf3d3a373b61def534d6110d393c1b9db3422d6 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 21 五月 2024 16:28:24 +0800
Subject: [PATCH] 销售订单关闭和行关闭 增加 关闭后控制的 存储过程 :h_p_Xs_SeOrderBill_AfterCloseCtrl 增加 行关闭后控制的 存储过程:h_p_Xs_SeOrderBill_AfterEntryCloseCtrl 参数 @HInterID int, --单据ID @HBillNo varchar(50), --单据号 @HUser varchar(100) --用户 存储过程里 增加 控制, 当 这个销售订单 出库数量为0, 但是 下推的 工序流转卡 已经 染厂(工序可以写死)进站或出站记录后。 进行报错,不允许关闭;(行关闭,只考虑本行; 整单关闭则 需要 全部行都考虑)
---
WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
index 128b977..abc342f 100644
--- a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
@@ -363,24 +363,20 @@
oCN.BeginTran();
- //ds = oCN.RunProcReturn("select * from h_v_Xs_ReceivableBillList_Query where hmainid=" + HInterID, "h_v_Xs_ReceivableBillList_Query");
- //foreach (DataRow row in ds.Tables[0].Rows)
- //{
- // // 鑾峰彇褰撳墠琛岀殑 HSourceBillType 鍊�
- // string hSourceBillType = row["HSourceBillType"].ToString();
+ ds = oCN.RunProcReturn("select * from h_v_Xs_ReceivableBillList_Query where hmainid=" + HInterID, "h_v_Xs_ReceivableBillList_Query");
+ string hSourceBillType = ds.Tables[0].Rows[0]["HSourceBillType"].ToString();
+ if (hSourceBillType == "1401")
+ {
+ //搴旀敹鍗� 鍒犻櫎鍥炲~ 閿�鍞鍗� 鍏宠仈鏁伴噺
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToPOStockIn_Del " + HInterID);
+ }
+ else if (hSourceBillType == "1205")
+ {
+ //搴旀敹鍗� 鍒犻櫎鍥炲~ 閿�鍞嚭搴撳崟 鍏宠仈鏁伴噺
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_ICStockoPOStockIn_Del " + HInterID);
+ }
- // if (hSourceBillType == "1401")
- // {
- // //搴旀敹鍗� 鍒犻櫎鍥炲~ 閿�鍞鍗� 鍏宠仈鏁伴噺
- // oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToPOStockIn_Del " + HInterID);
- // }
- // else if (hSourceBillType == "1205")
- // {
- // //搴旀敹鍗� 鍒犻櫎鍥炲~ 閿�鍞嚭搴撳崟 鍏宠仈鏁伴噺
- // oCN.RunProc("exec h_p_Xs_UpDateRelation_ICStockoPOStockIn_Del " + HInterID);
- // }
- //}
-
+
oCN.RunProc("delete from Xs_ReceivableBillMain where HInterID = " + HInterID);
oCN.RunProc("delete from Xs_ReceivableBillSub where HInterID= " + HInterID);
--
Gitblit v1.9.1