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