소스 검색

精度处理

callm 8 년 전
부모
커밋
89e84ebdc9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

+ 1 - 1
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -310,7 +310,7 @@ namespace UAS_LabelMachine
             //计算当前采集数量
             string collectqty = (LabelInfDataTable.Compute("sum(pib_qty)", "pib_prodcode='" + CurrentPrCode + "' and pib_pdno='" + CurrentPDNO + "'").ToString());
             double CollectQty = (collectqty == "" ? 0 : double.Parse(collectqty));
-            if (CollectQty + CollectNum > double.Parse(CurrentPrCount))
+            if (Convert.ToDouble((CollectQty + CollectNum).ToString("0.00")) > double.Parse(CurrentPrCount))
             {
                 MessageBox.Show("物料" + Data["PRCODE"] + "采集后数量为" + (CollectQty + CollectNum) + ",【超出】本行出货数量" + CurrentPrCount, "提示");
                 Input.SelectAll();