|
@@ -352,22 +352,28 @@ procedure TBillsMeasureData.sdvBillsMeasureSetText(var Text: String;
|
|
|
var
|
|
|
vNode: TBillsIDTreeNode;
|
|
|
begin
|
|
|
- // ±ä¸üӦѡÔñ±ä¸üÁî
|
|
|
- if SameText(AField , 'Qc') or SameText(AField , 'Pc') then
|
|
|
- Allow := SelectAndUpdateBGL(GetBillsID, AValue.Owner, StrToFloatDef(Text, 0), AField);
|
|
|
- if not Allow then Exit;
|
|
|
-
|
|
|
if CheckStringNull(Text) or CheckNumeric(Text) then
|
|
|
begin
|
|
|
+ Text := FloatToStr(QuantityRoundTo(StrToFloatDef(Text, 0)));
|
|
|
+
|
|
|
+ // ±ä¸üӦѡÔñ±ä¸üÁî
|
|
|
+ if SameText(AField , 'Qc') or SameText(AField , 'Pc') then
|
|
|
+ Allow := SelectAndUpdateBGL(GetBillsID, AValue.Owner, StrToFloatDef(Text, 0), AField);
|
|
|
+ if not Allow then Exit;
|
|
|
+
|
|
|
AValue.Owner.ValueByName(AField + 'Flag').AsInteger := 0;
|
|
|
AValue.Owner.ValueByName(AField + 'Formula').AsString := '';
|
|
|
- Text := FloatToStr(QuantityRoundTo(StrToFloatDef(Text, 0)));
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
+ Text := FloatToStr(QuantityRoundTo(EvaluateExprs(Text)));
|
|
|
+ // ±ä¸üӦѡÔñ±ä¸üÁî
|
|
|
+ if SameText(AField , 'Qc') or SameText(AField , 'Pc') then
|
|
|
+ Allow := SelectAndUpdateBGL(GetBillsID, AValue.Owner, StrToFloatDef(Text, 0), AField);
|
|
|
+ if not Allow then Exit;
|
|
|
+
|
|
|
AValue.Owner.ValueByName(AField + 'Flag').AsInteger := 1;
|
|
|
AValue.Owner.ValueByName(AField + 'Formula').AsString := Text;
|
|
|
- Text := FloatToStr(QuantityRoundTo(EvaluateExprs(Text)));
|
|
|
end;
|
|
|
|
|
|
ANode.Rec.SetIntValue(ANode.Rec.CalcType, 0);
|