Selaa lähdekoodia

变更令选择窗口,输入数量与可用数量,判断突然失效

MaiXinRong 7 vuotta sitten
vanhempi
commit
c776a9f9ab
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      Forms/BGLSelectFrm.pas

+ 2 - 2
Forms/BGLSelectFrm.pas

@@ -314,8 +314,8 @@ begin
     begin
       fCur := QuantityRoundTo(StrToFloatDef(zgBGL.Cells[5, zgBGL.CurRow].Text, 0));
       fValid := StrToFloatDef(zgBGL.Cells[4, zgBGL.CurRow].Text, 0);
-      if ((fValid >= 0) and (fCur <= fValid)) or
-         ((fValid < 0) and (fCur >= fValid)) then
+      if ((fValid >= 0) and (QuantityRoundTo(fValid - fCur) >= 0))) or
+         ((fValid < 0) and (QuantityRoundTo(fCur - fValid) >= 0))) then
         zgBGL.Cells[5, zgBGL.CurRow].Text := FloatToStr(fCur)
       else
       begin