生产入库(源单:生产订单)单源单、多源单模式保存前进行倒冲仓负库存控制
1个文件已修改
35 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -17345,6 +17345,23 @@
                return false;
            }
            //
            //产品入库单保存前进行倒冲仓负库存控制
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet ds2 = oCn.RunProcReturn("exec h_p_IFCLD_CheckDaochong_Handian " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "'", "h_p_IFCLD_CheckDaochong_Handian");
            if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "产品入库单保存前进行倒冲仓负库存控制发生错误!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) == 2)
                {
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
            }
            if (oSystemParameter.omodel.Kf_ProductInBill_ERPMode.ToUpper() == "CLOUD")  //判断同步模式是金蝶CLOUD
            {
                if (SaveProductInBill_MulSource_CLD(oMain, oSystemParameter.omodel, ref sHBillNo, ref sErrMsg))
@@ -18504,13 +18521,29 @@
            {
                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            if (sHSourceType == "3710")   //生产订单
            {
                //产品入库单保存前进行倒冲仓负库存控制
                DataSet ds2 = oCn.RunProcReturn("exec h_p_IFCLD_CheckDaochong_Handian " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "'", "h_p_IFCLD_CheckDaochong_Handian");
                if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
                {
                    sErrMsg = "产品入库单保存前进行倒冲仓负库存控制发生错误!";
                    return false;
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) == 2)
                    {
                        sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                        return false;
                    }
                }
                if (SaveProductInBill_ICMO_CLD(oMain, sHSourceType, oSystemParameterMain, ref sErrMsg))
                {
                    //"保存成功!";