Browse Source

Bug #825 金额计算模式下,删除本期合同计量金额(或输入公式)报错。

MaiXinRong 9 years ago
parent
commit
16d3435432
1 changed files with 2 additions and 2 deletions
  1. 2 2
      DataModules/BillsMeasureDm.pas

+ 2 - 2
DataModules/BillsMeasureDm.pas

@@ -371,12 +371,12 @@ procedure TBillsMeasureData.sdvBillsMeasureSetText(var Text: String;
     AValue.Owner.ValueByName(AField + 'Quantity').AsString := '';
     if CheckStringNull(Text) or CheckNumeric(Text) then
     begin
-      AValue.Owner.ValueByName('Formula').AsString := '';
+      AValue.Owner.ValueByName(AField + 'Formula').AsString := '';
       Text := FloatToStr(TotalPriceRoundTo(StrToFloatDef(Text, 0)));
     end
     else
     begin
-      AValue.Owner.ValueByName('Formula').AsString := Text;
+      AValue.Owner.ValueByName(AField + 'Formula').AsString := Text;
       Text := FloatToStr(TotalPriceRoundTo(EvaluateExprs(Text)));
     end;
   end;