File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
app/code/Magento/Sales/Model/Order/Creditmemo/Total Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,9 @@ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo)
59
59
$ allowedTaxAmount = $ order ->getShippingTaxAmount () - $ order ->getShippingTaxRefunded ();
60
60
$ allowedAmountInclTax = $ allowedAmount + $ allowedTaxAmount ;
61
61
$ baseAllowedAmountInclTaxDiff = $ orderBaseShippingInclTax
62
- - $ order ->getBaseShippingRefunded ();
63
- if ($ baseAllowedAmountInclTaxDiff < $ order ->getBaseShippingTaxRefunded ()) {
64
- $ baseAllowedAmountInclTax = $ order ->getBaseShippingTaxRefunded ()
65
- - $ baseAllowedAmountInclTaxDiff ;
66
- } else {
67
- $ baseAllowedAmountInclTax = $ baseAllowedAmountInclTaxDiff
68
- - $ order ->getBaseShippingTaxRefunded ();
69
- }
70
-
62
+ - $ order ->getBaseShippingRefunded ()
63
+ - $ order ->getBaseShippingTaxRefunded ();
64
+ $ baseAllowedAmountInclTax = ($ baseAllowedAmountInclTaxDiff > 0 ) ? $ baseAllowedAmountInclTaxDiff : 0 ;
71
65
// Check if the desired shipping amount to refund was specified (from invoice or another source).
72
66
if ($ creditmemo ->hasBaseShippingAmount ()) {
73
67
// For the conditional logic, we will either use amounts that always include tax -OR- never include tax.
You can’t perform that action at this time.
0 commit comments