Skip to content

Commit

Permalink
Fix decimal count in floating point type (majkel89#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzyc committed Jul 12, 2021
1 parent d8c4b5e commit 023d853
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 023d853

Please sign in to comment.