From 4fb572f2c1267a6252827737a7eabda8b4b8a4e5 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 21 五月 2024 16:19:09 +0800
Subject: [PATCH] 流转卡生成条码 进站单增加配件条码
---
DAL/仓库管理/ClsKf_SellOutBillForLayUI.cs | 89 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 86 insertions(+), 3 deletions(-)
diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
index 38e38ca..88dae58 100644
--- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
+++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
@@ -51,6 +51,10 @@
{
oCn.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + lngBillKey.ToString());
}
+ else if (DetailColl[0].HSourceBillType == "1402") //鍙戣揣閫氱煡鍗�
+ {
+ oCn.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Delete " + lngBillKey.ToString());
+ }
else
{
@@ -80,6 +84,10 @@
{
oCn.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Add " + lngBillKey.ToString());
}
+ else if(DetailColl[0].HSourceBillType == "1402") //鍙戣揣閫氱煡鍗�
+ {
+ oCn.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Add " + lngBillKey.ToString());
+ }
else
{
@@ -96,6 +104,22 @@
{
try
{
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_SellOutBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_SellOutBill_BeforeSaveCtrl");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
+
+
//
oCn.BeginTran();
@@ -171,6 +195,9 @@
",HInnerBillNo = '" + omodel.HInnerBillNo + "'" +
",HCarriage = " + omodel.HCarriage + "" +
",HCheckStatusMan = '" + omodel.HCheckStatusMan + "'" +
+ ",HProjectID = '" + omodel.HProjectID.ToString() + "'" +
+ ",HGroupID = '" + omodel.HGroupID.ToString() + "'" +
+ ",HPriceType = '" + omodel.HPriceType + "'" +
" where HInterID = " + lngBillKey;
//鏇存柊涓昏〃
oCn.RunProc(mainSql);
@@ -187,7 +214,7 @@
" (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
- ",HMaterID,HUnitID,HQtyMust,HQty,HPrice,HMoney,HTaxPrice,HTaxRate,HTaxMoney,HWHID" +
+ ",HMaterID,HUnitID,HQtyMust,HQty,HPieceQty,HPrice,HMoney,HTaxPrice,HTaxRate,HTaxMoney,HWHID" +
",HSPID,HSCWHID,HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
",HQty_Full,HQty_Empty,HQty_Back,HCostPrice,HCostMoney,HSalePrice" +
@@ -216,6 +243,7 @@
"," + oSub.HUnitID.ToString() + "" +
"," + oSub.HQtyMust.ToString() + "" +
"," + oSub.HQty.ToString() + "" +
+ "," + oSub.HPieceQty.ToString() + "" +
"," + oSub.HPrice.ToString() + "" +
"," + oSub.HMoney.ToString() + "" +
"," + oSub.HTaxPrice.ToString() + "" +
@@ -276,6 +304,23 @@
AddNewRelation(ref sReturn, omodel.HInterID);
//鎺у埗鍏宠仈鏁伴噺
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("h_p_Kf_SellOutBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_SellOutBill_AfterSaveCtrl");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
+ //============================
+
+
//
sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
oCn.Commit();
@@ -305,6 +350,22 @@
{
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
}
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_SellOutBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_SellOutBill_BeforeSaveCtrl");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
+
//
oCn.BeginTran();
//涓昏〃
@@ -314,7 +375,7 @@
",HDeptID,HManagerID,HEmpID,HSupID,HSecManagerID,HKeeperID,HWHID,HSCWHID,HCurID,HExRate,HSellSID,HLinkMan,HLinkPhone" +
",HSeOrderBillNo" +
",HConveyCompID,HConveyTypeID,HConveyMoney" +
- ",HExplanation,HInnerBillNo,HRedBlueFlag,HCarriage,HCheckStatusMan" +
+ ",HExplanation,HInnerBillNo,HRedBlueFlag,HCarriage,HCheckStatusMan,HProjectID,HGroupID,HPriceType" +
") " +
"values(" +
"" + omodel.HInterID.ToString() + "" +
@@ -364,6 +425,9 @@
"," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + "" +
"," + omodel.HCarriage + "" +
",'" + omodel.HCheckStatusMan + "'" +
+ ",'" + omodel.HProjectID.ToString() + "'" +
+ ",'" + omodel.HGroupID.ToString() + "'" +
+ ",'" + omodel.HPriceType + "'" +
") ";
oCn.RunProc(mainSql);
@@ -395,7 +459,7 @@
" (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
- ",HMaterID,HUnitID,HQtyMust,HQty,HPrice,HMoney,HTaxPrice,HTaxRate,HTaxMoney,HWHID" +
+ ",HMaterID,HUnitID,HQtyMust,HQty,HPieceQty,HPrice,HMoney,HTaxPrice,HTaxRate,HTaxMoney,HWHID" +
",HSPID,HSCWHID,HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
",HQty_Full,HQty_Empty,HQty_Back,HCostPrice,HCostMoney,HSalePrice" +
@@ -424,6 +488,7 @@
"," + oSub.HUnitID.ToString() + "" +
"," + oSub.HQtyMust.ToString() + "" +
"," + oSub.HQty.ToString() + "" +
+ "," + oSub.HPieceQty.ToString() + "" +
"," + oSub.HPrice.ToString() + "" +
"," + oSub.HMoney.ToString() + "" +
"," + oSub.HTaxPrice.ToString() + "" +
@@ -484,6 +549,23 @@
//鎺у埗鍏宠仈鏁伴噺
//
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("h_p_Kf_SellOutBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_SellOutBill_AfterSaveCtrl");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
+ //============================
+
+
sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
@@ -588,6 +670,7 @@
oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]);
oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
+ oSub.HPieceQty = DBUtility.ClsPub.isInt(DsSub.Tables[0].Rows[i]["HPieceQty"]);
oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]);
oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]);
oSub.HSalePrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HSalePrice"]);
--
Gitblit v1.9.1