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)
71
71
$ invoice ->setDiscountAmount (-$ totalDiscountAmount );
72
72
$ invoice ->setBaseDiscountAmount (-$ baseTotalDiscountAmount );
73
73
74
- $ grandTotal = $ invoice ->getGrandTotal () - $ totalDiscountAmount < 0.0001
74
+ $ grandTotalWithoutDiscount = $ invoice ->getGrandTotal () - $ totalDiscountAmount ;
75
+ $ grandTotal = $ grandTotalWithoutDiscount > 0 && $ grandTotalWithoutDiscount < 0.0001
75
76
? 0 : $ invoice ->getGrandTotal () - $ totalDiscountAmount ;
76
- $ baseGrandTotal = $ invoice ->getBaseGrandTotal () - $ baseTotalDiscountAmount < 0.0001
77
+ $ baseGrandTotalWithoutDiscount = $ invoice ->getBaseGrandTotal () - $ baseTotalDiscountAmount ;
78
+ $ baseGrandTotal = $ baseGrandTotalWithoutDiscount > 0 && $ baseGrandTotalWithoutDiscount < 0.0001
77
79
? 0 : $ invoice ->getBaseGrandTotal () - $ baseTotalDiscountAmount ;
78
80
$ invoice ->setGrandTotal ($ grandTotal );
79
81
$ invoice ->setBaseGrandTotal ($ baseGrandTotal );
You can’t perform that action at this time.
0 commit comments