Skip to content

Commit b6f9b6e

Browse files
jayankaghoshShikha Mishra
authored and
Shikha Mishra
committed
thousand separator removed from number format
1 parent 785a38a commit b6f9b6e

File tree

1 file changed

+4
-3
lines changed
  • app/code/Magento/Quote/Model/Quote/Address

1 file changed

+4
-3
lines changed

app/code/Magento/Quote/Model/Quote/Address/Total.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(
5656
public function setTotalAmount($code, $amount)
5757
{
5858
/* (Fixes issue #18027) Round the total amount to 4 decimal places, to avoid floating point overflows */
59-
$amount = is_float($amount) ? (float)number_format($amount, 4) : $amount;
59+
$amount = is_float($amount) ? (float)number_format($amount, 4, ".", "") : $amount;
6060

6161
$this->totalAmounts[$code] = $amount;
6262
if ($code != 'subtotal') {
@@ -77,7 +77,7 @@ public function setTotalAmount($code, $amount)
7777
public function setBaseTotalAmount($code, $amount)
7878
{
7979
/* (Fixes issue #18027) Round the total amount to 4 decimal places, to avoid floating point overflows */
80-
$amount = is_float($amount) ? (float)number_format($amount, 4) : $amount;
80+
$amount = is_float($amount) ? (float)number_format($amount, 4, ".", "") : $amount;
8181

8282
$this->baseTotalAmounts[$code] = $amount;
8383
if ($code != 'subtotal') {
@@ -173,7 +173,8 @@ public function getAllBaseTotalAmounts()
173173
//@codeCoverageIgnoreEnd
174174

175175
/**
176-
* Set the full info, which is used to capture tax related information. If a string is used, it is assumed to be serialized.
176+
* Set the full info, which is used to capture tax related information.
177+
* If a string is used, it is assumed to be serialized.
177178
*
178179
* @param array|string $info
179180
* @return $this

0 commit comments

Comments
 (0)