File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
app/code/Magento/Quote/Model/Quote/Address Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 6
6
namespace Magento \Quote \Model \Quote \Address ;
7
7
8
8
/**
9
+ * Class Total
9
10
* @method string getCode()
10
11
*
11
12
* @api
@@ -54,6 +55,8 @@ public function __construct(
54
55
*/
55
56
public function setTotalAmount ($ code , $ amount )
56
57
{
58
+ $ amount = is_float ($ amount ) ? round ($ amount , 4 ) : $ amount ;
59
+
57
60
$ this ->totalAmounts [$ code ] = $ amount ;
58
61
if ($ code != 'subtotal ' ) {
59
62
$ code = $ code . '_amount ' ;
@@ -72,6 +75,8 @@ public function setTotalAmount($code, $amount)
72
75
*/
73
76
public function setBaseTotalAmount ($ code , $ amount )
74
77
{
78
+ $ amount = is_float ($ amount ) ? round ($ amount , 4 ) : $ amount ;
79
+
75
80
$ this ->baseTotalAmounts [$ code ] = $ amount ;
76
81
if ($ code != 'subtotal ' ) {
77
82
$ code = $ code . '_amount ' ;
You can’t perform that action at this time.
0 commit comments