From 023d8531c1fd0b4b88e6b3b50541666f63360d53 Mon Sep 17 00:00:00 2001 From: Krzysztof Pyrkosz Date: Mon, 12 Jul 2021 13:41:33 +0200 Subject: [PATCH] Fix decimal count in floating point type (#20) --- src/Format.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Format.php b/src/Format.php index 141fe69..f91e4d1 100644 --- a/src/Format.php +++ b/src/Format.php @@ -509,8 +509,8 @@ protected function createField($data) { $field = Field::create($data['t']); $field->setName(rtrim($data['n'])); $field->setLength($data['ll']); - if ($data['t'] == Field::TYPE_NUMERIC && isset($data['dd'])) { - $field->setDecimalCount(2); + if ($data['t'] === Field::TYPE_NUMERIC && isset($data['dd'])) { + $field->setDecimalCount($data['dd']); } return $field; }