File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/Sales/Model/Order/Creditmemo/Total Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,11 @@ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo)
75
75
}
76
76
77
77
$ isPartialShippingRefunded = false ;
78
+ $ baseOrderShippingAmount = (float )$ order ->getBaseShippingAmount ();
78
79
if ($ invoice = $ creditmemo ->getInvoice ()) {
79
80
//recalculate tax amounts in case if refund shipping value was changed
80
- if ($ order -> getBaseShippingAmount () && $ creditmemo ->getBaseShippingAmount () !== null ) {
81
- $ taxFactor = $ creditmemo ->getBaseShippingAmount () / $ order -> getBaseShippingAmount () ;
81
+ if ($ baseOrderShippingAmount && $ creditmemo ->getBaseShippingAmount () !== null ) {
82
+ $ taxFactor = $ creditmemo ->getBaseShippingAmount () / $ baseOrderShippingAmount ;
82
83
$ shippingTaxAmount = $ invoice ->getShippingTaxAmount () * $ taxFactor ;
83
84
$ baseShippingTaxAmount = $ invoice ->getBaseShippingTaxAmount () * $ taxFactor ;
84
85
$ totalDiscountTaxCompensation += $ invoice ->getShippingDiscountTaxCompensationAmount () * $ taxFactor ;
@@ -104,7 +105,6 @@ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo)
104
105
}
105
106
} else {
106
107
$ orderShippingAmount = $ order ->getShippingAmount ();
107
- $ baseOrderShippingAmount = $ order ->getBaseShippingAmount ();
108
108
109
109
$ baseOrderShippingRefundedAmount = $ order ->getBaseShippingRefunded ();
110
110
You can’t perform that action at this time.
0 commit comments