duhe
2023-11-15 cec6e468204b60d611baf9e985d38c43b6826ac3
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -978,6 +978,9 @@
        {
            try
            {
                DAL.ClsKf_SellOutBill BillOld = new DAL.ClsKf_SellOutBill();
                string s = "";
                //判断是否有删除权限
                if (!DBUtility.ClsPub.Security_Log("Kf_SellOutBill_Drop", 1, false, user))
                {
@@ -988,7 +991,28 @@
                    return objJsonResult;
                }
                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据有误!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //判断是否可编辑
                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据已经被审核,不允许删除!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                oCN.BeginTran();
                //销售出库删除回填销售订单关联数量
                oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
                oCN.Commit();