mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-09 22:37:47 +02:00
* Fix currency treatment
This commit is contained in:
parent
827b95af79
commit
e06f74d512
@ -1334,8 +1334,9 @@ end;
|
|||||||
|
|
||||||
function TValue.AsCurrency: Currency;
|
function TValue.AsCurrency: Currency;
|
||||||
begin
|
begin
|
||||||
|
// The actual data is not multiplied by 10000. The
|
||||||
if {$IFDEF FPC_DOTTEDUNITS}JSApi.{$ENDIF}JS.isNumber(GetData) then
|
if {$IFDEF FPC_DOTTEDUNITS}JSApi.{$ENDIF}JS.isNumber(GetData) then
|
||||||
Result:=Currency(GetData)
|
Result:=Currency(GetData)/10000
|
||||||
else
|
else
|
||||||
raise EInvalidCast.Create(SErrInvalidTypecast);
|
raise EInvalidCast.Create(SErrInvalidTypecast);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user