Support for fmtBCD

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8010 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
jujibo
2021-05-09 08:24:04 +00:00
parent d9914d4650
commit 92e097ff63

View File

@ -142,7 +142,7 @@ procedure Register;
implementation
uses
Math, jdbutils;
Math, FMTBcd, jdbutils;
procedure Register;
begin
@ -205,7 +205,13 @@ begin
Caption := FormatFloat(EditFormat, theValue)
else
Caption := FloatToStr(theValue);
FDataLink.Field.Value := theValue;
//writeln(FDataLink.Field.FieldDef.DataType);
case FDataLink.Field.FieldDef.DataType of
ftFMTBcd: FDataLink.Field.AsBCD := StrToBCD(FormatFloat('0.'+StringOfChar('0', Decimals), theValue));
else
FDataLink.Field.Value := theValue;
end;
end
else
begin