From c819dddabba9767bd6f732ce09833b37ce7ffd5f Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 22 八月 2024 09:49:05 +0800
Subject: [PATCH] 1

---
 DAL/应收管理/ClsYS_ReceiveOtherBill.cs |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 56 insertions(+), 3 deletions(-)

diff --git "a/DAL/\345\272\224\346\224\266\347\256\241\347\220\206/ClsYS_ReceiveOtherBill.cs" "b/DAL/\345\272\224\346\224\266\347\256\241\347\220\206/ClsYS_ReceiveOtherBill.cs"
index 36e0d22..7ff0121 100644
--- "a/DAL/\345\272\224\346\224\266\347\256\241\347\220\206/ClsYS_ReceiveOtherBill.cs"
+++ "b/DAL/\345\272\224\346\224\266\347\256\241\347\220\206/ClsYS_ReceiveOtherBill.cs"
@@ -66,7 +66,34 @@
                 DeleteRelation(ref sReturn, lngBillKey);
                 //鍒犻櫎瀛愯〃
                 DeleteBillSub(lngBillKey);
-               
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Model.ClsYS_ReceiveOtherBillSub oSub in DetailColl)
+                {
+                    string subSql = "insert into YS_ReceiveOtherBillSub" +
+                        "" +
+                        "" +
+                        "" +
+                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+                        ",HProjectMoneyID,HTypeSub,HMoney,HTaxRate,HSumMoney,HQty,HPrice,HRemark) " +
+                        " values(" +
+                        "" + omodel.HInterID.ToString() +
+                        "," + oSub.HEntryID.ToString() +
+                        "," + oSub.HSourceInterID +
+                        "," + oSub.HSourceEntryID +
+                        ",'" + oSub.HSourceBillNo +
+                        "','" + oSub.HSourceBillType +
+                        "','" + oSub.HProjectMoneyID +
+                        "','" + oSub.HTypeSub +
+                        "','" + oSub.HMoney +
+                        "','" + oSub.HTaxRate +
+                        "','" + oSub.HSumMoney +
+                        "','" + oSub.HQty +
+                        "','" + oSub.HPrice +
+                        "','" + oSub.HRemark +
+                        "')";
+                    oCn.RunProc(subSql);
+                }
                 sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;
@@ -84,7 +111,7 @@
             try
             {
                 //寰楀埌mainid
-                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCn.BeginTran();
                 //涓昏〃
@@ -99,7 +126,33 @@
                 ",'" + omodel.HAccDate.ToShortDateString() + "'," + omodel.HCusID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() +
                 ", '" + omodel.HDeptID.ToString() + "','" + omodel.HEmpID.ToString() + "','" + omodel.HProjectMoneyID.ToString() + "','"  + omodel.HType+ "','"+ omodel.HMoney+ "','" + omodel.HTaxRate + "','" + omodel.HSumMoney + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HOrgID + "'" +
                 ") ");
-              
+                //鎻掑叆瀛愯〃
+                foreach (Model.ClsYS_ReceiveOtherBillSub oSub in DetailColl)
+                {
+                    string subSql = "insert into YS_ReceiveOtherBillSub" +
+                         "" +
+                         "" +
+                         "" +
+                         "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+                         ",HProjectMoneyID,HTypeSub,HMoney,HTaxRate,HSumMoney,HQty,HPrice,HRemark) " +
+                         " values(" +
+                         "" + omodel.HInterID.ToString() +
+                         "," + oSub.HEntryID.ToString() +
+                         "," + oSub.HSourceInterID +
+                         "," + oSub.HSourceEntryID +
+                         ",'" + oSub.HSourceBillNo +
+                         "','" + oSub.HSourceBillType +
+                         "','" + oSub.HProjectMoneyID +
+                         "','" + oSub.HTypeSub +
+                         "','" + oSub.HMoney +
+                         "','" + oSub.HTaxRate +
+                         "','" + oSub.HSumMoney +
+                         "','" + oSub.HQty +
+                         "','" + oSub.HPrice +
+                         "','" + oSub.HRemark +
+                         "')";
+                    oCn.RunProc(subSql);
+                }
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;

--
Gitblit v1.9.1