DBUtility/ÒµÎñµ¥¾Ý/ClsXt_BaseBill.cs
@@ -218,7 +218,7 @@
        //反审核
        public bool AbandonCheck(Int64 lngBillKey, ref string sReturn)
        {
            string sql = "";
            if (isUse(lngBillKey, ref sReturn))
            {
                return false;
@@ -238,7 +238,21 @@
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
                }
                //反审核后 æ›´æ–°åŠæ—¶åº“存表 å‡å°‘库存
                sql = "select * from  " + MvarItemKey + " where HInterID=" + lngBillKey.ToString();
                ds = oCn.RunProcReturn(sql, MvarItemKey);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    string HBillType = ds.Tables[0].Rows[0]["HBillType"].ToString();
                    if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1204")
                    {
                        //反审核更新 åŠæ—¶åº“存表 å¢žåŠ åº“å­˜ 1201 1202 1203 1247 1244 1251 1210
                        //反审核更新 åŠæ—¶åº“存表 å‡å°‘库存 1204 1202 1203 1247 1244 1251 1210
                        ds = oCn.RunProcReturn("exec h_KF_UPDateICinventory  '" + lngBillKey.ToString() + "','" + HBillType + "','2'", "h_KF_UPDateICinventory");
                    }
                }
                sReturn = "";
                return true;
            }
@@ -292,6 +306,19 @@
                    oCn.RollBack();
                    return false;
                }
                //反审核后 æ›´æ–°åŠæ—¶åº“存表 å‡å°‘库存
                sql = "select * from  " + MvarItemKey + " where HInterID=" + lngBillKey.ToString();
                ds = oCn.RunProcReturn(sql, MvarItemKey);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    string HBillType = ds.Tables[0].Rows[0]["HBillType"].ToString();
                    if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1205" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239")
                    {
                        //反审核更新 åŠæ—¶åº“存表 å¢žåŠ åº“å­˜ 1201 1202 1203 1247 1244 1251 1210
                        //反审核更新 åŠæ—¶åº“存表 å‡å°‘库存 1205 1250 1206 1245 1239
                        ds = oCn.RunProcReturn("exec h_KF_UPDateICinventory  '" + lngBillKey.ToString() + "','" + HBillType + "','2'", "h_KF_UPDateICinventory");
                    }
                }
                //写入日志
                string WorkList = "反审核单据,单据号:" + HBillNo;
                string SystemName = "LMES-" + MvarReportTitle + "模块";
@@ -314,12 +341,26 @@
        //审核
        public bool CheckBill(Int64 lngBillKey, ref string sReturn)
        {
            string sql = "";
            DataSet ds;
            try
            {
                string  HChecker = ClsPub.CurUserName ;
                string  HCheckDate =ClsPub.GetServerDate(-1);
                oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
                //审核后 æ›´æ–°åŠæ—¶åº“存表 å¢žåŠ åº“å­˜
                sql = "select * from  " + MvarItemKey + " where HInterID=" + lngBillKey.ToString();
                ds = oCn.RunProcReturn(sql, MvarItemKey);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    string HBillType = ds.Tables[0].Rows[0]["HBillType"].ToString();
                    if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1204")
                    {
                        //审核更新 åŠæ—¶åº“存表 å¢žåŠ åº“å­˜ 1201 1202 1203 1247 1244 1251 1210
                        //审核更新 åŠæ—¶åº“存表 å‡å°‘库存 1204
                        ds = oCn.RunProcReturn("exec h_KF_UPDateICinventory  '" + lngBillKey.ToString() + "','" + HBillType + "','1'", "h_KF_UPDateICinventory");
                    }
                }
                sReturn = "";
                return true;
            }
@@ -356,7 +397,7 @@
            {
                string HChecker = sUser;
                string HCheckDate = ClsPub.GetServerDate(-1);
                //开启事务
                oCn.BeginTran();
@@ -378,6 +419,19 @@
                    oCn.RollBack();
                    return false;
                }
                //审核后 æ›´æ–°åŠæ—¶åº“存表 å¢žåŠ åº“å­˜
                sql = "select * from  " + MvarItemKey + " where HInterID=" + lngBillKey.ToString();
                ds = oCn.RunProcReturn(sql, MvarItemKey);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    string HBillType = ds.Tables[0].Rows[0]["HBillType"].ToString();
                    if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239")
                    {
                        //审核更新 åŠæ—¶åº“存表 å¢žåŠ åº“å­˜ 1201 1202 1203 1247 1244 1251 1210
                        //审核更新 åŠæ—¶åº“存表 å‡å°‘库存 1204 1250 1206 1245 1239
                        ds = oCn.RunProcReturn("exec h_KF_UPDateICinventory  '" + lngBillKey.ToString() + "','" + HBillType + "','1'", "h_KF_UPDateICinventory");
                    }
                }
                //写入日志
                string WorkList = "审核单据,单据号:" + HBillNo;
                string SystemName = "LMES-" + MvarReportTitle + "模块";