Versions:
- Firebird 3.0 with PDO
- Laravel 7
I'm using the Eloquent and I'm using package for connection with database https://packagist.org/packages/harrygulliford/laravel-firebird.
OBS: In Windows Serve work very well, but in Linux don't (In CentOS 7 and Ubuntu Server 20.04LTS).
I'm using Laravel with Firebird and I've problems with fields of type NUMERIC that return wrong values.
Example: A query that should turn back 190,65, returns 0.0001.
This is the SQL DDL:
Item::selectRaw("CODIGO,DESCRICAO,PRECOVAREJO,PRECOATACADO,PRECOESPECIAL")->get();
This is return in json:
{ "data": [ { "CODIGO": "123456", "DESCRICAO": "DESCRIPTION EXAMPLE", "PRECOVAREJO": "0.0001", "PRECOATACADO": "0.0001", "PRECOESPECIAL": "0.0001" } ] }
Create Table:
CREATE TABLE ITENS ( PRECOVAREJO NUMERIC(15,3), PRECOATACADO NUMERIC(15,3), PRECOESPECIAL NUMERIC(15,3), CODIGO VARCHAR(8) NOT NULL, DESCRICAO VARCHAR(80) );


@Mark Rotteveel This is the query builded by Eloquent Laravel:
array:2 [ 0 => array:3 [ "query" => "select count(*) as "aggregate" from "ITENS" where "ITENS"."DATACANCELAMENTO" is null" "bindings" => [] "time" => 33.17 ] 1 => array:3 [ "query" => """select CODIGO, DESCRICAO, PRECOVAREJO, PRECOATACADO, PRECOESPECIAL from "ITENS" where "ITENS"."DATACANCELAMENTO" is null order by "CODIGO" asc fetch first 10 rows only """ "bindings" => [] "time" => 8.39 ] ]
This is return expected Image return expected