Skip to content

Commit a4a4ebe

Browse files
committed
HP-2446: format number as string
1 parent 9f1c3f1 commit a4a4ebe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/price/ProgressivePrice.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ public function calculateSum(QuantityInterface $quantity): ?Money
105105
$price = $threshold->price();
106106

107107
$chargedAmount = $price->money()
108-
->multiply((string)$billedUsage->getQuantity())
109-
->divide((string)($price->multiplier()));
108+
->multiply((string)(sprintf('%.14F', $billedUsage->getQuantity())))
109+
->divide((string)(sprintf('%.14F', $price->multiplier())));
110110

111111
$this->calculationTraces[] = new ProgressivePriceCalculationTrace(
112112
$threshold, $billedUsage, $chargedAmount

0 commit comments

Comments
 (0)