Skip to content

Commit

Permalink
Merge pull request #75 from danielmarschall/patch-5
Browse files Browse the repository at this point in the history
Fixed problem with ZugferdSettings special decimal places. Fixes #73
  • Loading branch information
horstoeko authored May 30, 2024
2 parents f0c6840 + 04a4d79 commit cb23bc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ZugferdSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ public static function getSpecialDecimalPlacesMaps(): array
*/
public static function getSpecialDecimalPlacesMap(string $nodePath, int $defaultDecimalPlaces): int
{
$nodePath = preg_replace('@\[\d+\]@', '', $nodePath);
return static::$specialDecimalPlacesMaps[$nodePath] ?? $defaultDecimalPlaces;
}

Expand All @@ -268,6 +269,7 @@ public static function setSpecialDecimalPlacesMaps(array $specialDecimalPlacesMa
*/
public static function addSpecialDecimalPlacesMap(string $nodePath, int $defaultDecimalPlaces): void
{
$nodePath = preg_replace('@\[\d+\]@', '', $nodePath);
static::$specialDecimalPlacesMaps[$nodePath] = $defaultDecimalPlaces;
}

Expand Down

0 comments on commit cb23bc1

Please sign in to comment.