|
@@ -556,7 +556,10 @@ procedure TBillsCompileData.sdvBillsCompileSetText(var Text: String;
|
|
begin
|
|
begin
|
|
sPre := StringReplace(AFieldName, 'Quantity', '', [rfIgnoreCase, rfReplaceAll]);
|
|
sPre := StringReplace(AFieldName, 'Quantity', '', [rfIgnoreCase, rfReplaceAll]);
|
|
if CheckStringNull(Text) or CheckNumeric(Text) then
|
|
if CheckStringNull(Text) or CheckNumeric(Text) then
|
|
- Text := FloatToStr(QuantityRoundTo(StrToFloatDef(Text, 0)))
|
|
|
|
|
|
+ begin
|
|
|
|
+ ARecord.ValueByName(sPre + 'Formula').AsString := '';
|
|
|
|
+ Text := FloatToStr(QuantityRoundTo(StrToFloatDef(Text, 0)));
|
|
|
|
+ end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
ARecord.ValueByName(sPre + 'Formula').AsString := Text;
|
|
ARecord.ValueByName(sPre + 'Formula').AsString := Text;
|
|
@@ -571,7 +574,10 @@ procedure TBillsCompileData.sdvBillsCompileSetText(var Text: String;
|
|
begin
|
|
begin
|
|
sPre := StringReplace(AFieldName, 'TotalPrice', '', [rfIgnoreCase, rfReplaceAll]);
|
|
sPre := StringReplace(AFieldName, 'TotalPrice', '', [rfIgnoreCase, rfReplaceAll]);
|
|
if CheckStringNull(Text) or CheckNumeric(Text) then
|
|
if CheckStringNull(Text) or CheckNumeric(Text) then
|
|
- Text := FloatToStr(TotalPriceRoundTo(StrToFloatDef(Text, 0)))
|
|
|
|
|
|
+ begin
|
|
|
|
+ ARecord.ValueByName(sPre + 'Formula').AsString := '';
|
|
|
|
+ Text := FloatToStr(TotalPriceRoundTo(StrToFloatDef(Text, 0)));
|
|
|
|
+ end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
ARecord.ValueByName(sPre + 'Formula').AsString := Text;
|
|
ARecord.ValueByName(sPre + 'Formula').AsString := Text;
|