Explorar el Código

1、新增重算报价限制无效物料

MY hace 6 días
padre
commit
3e47313a74
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      JLHHJSvr/Helper/MattressHelper.cs

+ 3 - 1
JLHHJSvr/Helper/MattressHelper.cs

@@ -533,7 +533,9 @@ namespace JLHHJSvr.Helper
                 DbSqlHelper.SelectOne(cmd, formula, "formulakind,formulatype,sortcode");
 
                 var mtrldef = new u_mtrl_price() { mtrlid = mx.mtrlid };
-                DbSqlHelper.SelectOne(cmd, mtrldef, "name,gram_weight,cloth_width,if_inputqty,priceunit,shrinkage,if_areaprice");
+                DbSqlHelper.SelectOne(cmd, mtrldef, "name,gram_weight,cloth_width,if_inputqty,priceunit,shrinkage,if_areaprice,isuse");
+
+                if (mtrldef.isuse == 0) throw new LJCommonException($"物料{mtrldef.name}无效,无法进行重算,请检查!");
 
                 mx.costamt = 0;
                 mx.useqty = 0;