From db25c944428a0f857097aa05b7be1716e7a3751b Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期五, 31 五月 2024 17:32:06 +0800
Subject: [PATCH] 1.采购入库单,生产入库单,委外加工入库单,其他入库单,分步式调入单,生产退料单,销售退货单 审核时 增加库存, 反审核时 减少库存; 2.销售出库单,生产领料单,分步式调出单,委外加工出库单,其他出库单,采购退料单,生产退库单 审核时 减少库存, 反审核时 增加 库存; (写在通用的方法中了,只有符合条件的才会进行更新,对原有审核/反审核无影响)

---
 WebAPI/Controllers/XSGL/YS_ContactBalController.cs |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/YS_ContactBalController.cs b/WebAPI/Controllers/XSGL/YS_ContactBalController.cs
index 2885c1c..6e96437 100644
--- a/WebAPI/Controllers/XSGL/YS_ContactBalController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ContactBalController.cs
@@ -427,9 +427,11 @@
                         ds = oCN.RunProcReturn(sql, "YSYF_ContactBal");
                         if (ds.Tables[0].Rows.Count == 0)
                         {
-                            sql = "insert into YSYF_ContactBal(HRP,HCusID,HCurID,HBeginBalance) " +
+                            sql = "insert into YSYF_ContactBal(HYear,HPeriod,HRP,HCusID,HCurID,HBeginBalance) " +
                                 "values(" +
-                                "" + HFRP + "" +
+                                "YEAR(getdate())" +
+                                ",Month(getdate())" +
+                                "," + HFRP + "" +
                                 "," + HCusID + "" +
                                 "," + HCurID + "" +
                                 "," + HBeginBalance + "" +
@@ -475,9 +477,11 @@
                         ds = oCN.RunProcReturn(sql, "YSYF_ContactBal");
                         if (ds.Tables[0].Rows.Count == 0)
                         {
-                            sql = "insert into YSYF_ContactBal(HRP,HCusID,HCurID,HBeginBalance) " +
+                            sql = "insert into YSYF_ContactBal(HYear,HPeriod,HRP,HCusID,HCurID,HBeginBalance) " +
                                 "values(" +
-                                "" + HFRP + "" +
+                                "YEAR(getdate())" +
+                                ",Month(getdate())" +
+                                "," + HFRP + "" +
                                 "," + HCusID + "" +
                                 "," + HCurID + "" +
                                 "," + HBeginBalance + "" +

--
Gitblit v1.9.1