From 2609bffee3a8de0d1e08b1b2c3fa3cfe13064f4e Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 24 三月 2025 11:40:14 +0800
Subject: [PATCH] 1

---
 DAL/应收管理/ClsYS_ReceiveOtherBill.cs |   97 +++++++++++++++++++++++++++---------------------
 1 files changed, 54 insertions(+), 43 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 85e60be..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"
@@ -54,7 +54,11 @@
                 ",HExRate=" + omodel.HExRate.ToString() +
                 ",HDeptID=" + omodel.HDeptID.ToString() +
                 ",HEmpID=" + omodel.HEmpID.ToString() +
-                ",HSumMoney=" + omodel.HSumMoney.ToString() +
+                ",HProjectMoneyID =" + omodel.HProjectMoneyID.ToString() +
+                ",HType='" + omodel.HType.ToString() + "'" +
+                ",HMoney='" + omodel.HMoney + "'" +
+                ",HTaxRate='" + omodel.HTaxRate + "'" +
+                ",HSumMoney='" + omodel.HSumMoney + "'" +
                 ",HExplanation='" + omodel.HExplanation + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                 " where HInterID=" + lngBillKey.ToString());
@@ -66,26 +70,30 @@
                 omodel.HInterID = lngBillKey;
                 foreach (Model.ClsYS_ReceiveOtherBillSub oSub in DetailColl)
                 {
-                    //oCn.RunProc("Insert into YS_ReceiveOtherBillSub " +
-                    //  " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
-                    //  ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                    //  ") values("
-                    //  + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
-                    //  "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
-                    //  ") ");
+                    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);
                 }
-                //
-                //foreach (Model.ClsYS_ReceiveOtherBillSub oSub in DetailColl)
-                //{
-                //    Ds = oCn.RunProcReturn("exec h_p_YS_ReceiveOtherBill_Qty " + oSub.HICMOInterID, "");
-                //    if (Ds.Tables[0].Rows.Count == 0)
-                //        return;
-                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
-                //    {
-                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
-                //        return false;
-                //    }
-                //}
                 sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;
@@ -103,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();
                 //涓昏〃
@@ -111,37 +119,40 @@
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                 ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                 ",HAccDate,HCusID,HCurID,HExRate" +
-                ",HDeptID,HEmpID,HSumMoney,HExplanation,HInnerBillNo" +
+                ",HDeptID,HEmpID,HProjectMoneyID,HType,HMoney,HTaxRate,HSumMoney,HExplanation,HInnerBillNo,HOrgID" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                 ",'" + omodel.HAccDate.ToShortDateString() + "'," + omodel.HCusID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() +
-                ", " + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HSumMoney.ToString() + ",'"  + omodel.HExplanation +"','"+ omodel.HInnerBillNo + "'" +
+                ", '" + 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)
                 {
-                    //oCn.RunProc("Insert into YS_ReceiveOtherBillSub " +
-                    //  " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
-                    //  ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                    //  ") values("
-                    //  + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
-                    //  "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
-                    //  ") ");
+                    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);
                 }
-                //
-                //foreach (Model.ClsYS_ReceiveOtherBillSub oSub in DetailColl)
-                //{
-                //    Ds = oCn.RunProcReturn("exec h_p_YS_ReceiveOtherBill_Qty " + oSub.HICMOInterID, "");
-                //    if (Ds.Tables[0].Rows.Count == 0)
-                //        return;
-                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
-                //    {
-                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
-                //        return false;
-                //    }
-                //}
-                //
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;

--
Gitblit v1.9.1