File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
app/code/Magento/Sales/Model/Order/Invoice/Total Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,9 @@ public function collect(Invoice $invoice)
7171 $ invoice ->setDiscountAmount (-$ totalDiscountAmount );
7272 $ invoice ->setBaseDiscountAmount (-$ baseTotalDiscountAmount );
7373
74- $ grandTotalWithoutDiscount = $ invoice ->getGrandTotal () - $ totalDiscountAmount ;
75- $ grandTotal = $ grandTotalWithoutDiscount > 0 && $ grandTotalWithoutDiscount < 0.0001
74+ $ grandTotal = abs ($ invoice ->getGrandTotal () - $ totalDiscountAmount ) < 0.0001
7675 ? 0 : $ invoice ->getGrandTotal () - $ totalDiscountAmount ;
77- $ baseGrandTotalWithoutDiscount = $ invoice ->getBaseGrandTotal () - $ baseTotalDiscountAmount ;
78- $ baseGrandTotal = $ baseGrandTotalWithoutDiscount > 0 && $ baseGrandTotalWithoutDiscount < 0.0001
76+ $ baseGrandTotal = abs ($ invoice ->getBaseGrandTotal () - $ baseTotalDiscountAmount ) < 0.0001
7977 ? 0 : $ invoice ->getBaseGrandTotal () - $ baseTotalDiscountAmount ;
8078 $ invoice ->setGrandTotal ($ grandTotal );
8179 $ invoice ->setBaseGrandTotal ($ baseGrandTotal );
You can’t perform that action at this time.
0 commit comments