Skip to content

Commit efbeb8f

Browse files
author
Anna Bukatar
committed
ACP2E-2583: base_discount_canceled column is not updating properly
1 parent f6d4542 commit efbeb8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Sales/Model/Order.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,9 +1378,11 @@ public function registerCancellation($comment = '', $graceful = true)
13781378
$this->setShippingCanceled($this->getShippingAmount() - $this->getShippingInvoiced());
13791379
$this->setBaseShippingCanceled($this->getBaseShippingAmount() - $this->getBaseShippingInvoiced());
13801380

1381-
$this->setDiscountCanceled(abs((float) $this->getDiscountAmount()) - $this->getDiscountInvoiced());
1381+
$this->setDiscountCanceled(
1382+
abs((float) $this->getDiscountAmount()) - abs((float) $this->getDiscountInvoiced()))
1383+
;
13821384
$this->setBaseDiscountCanceled(
1383-
abs((float) $this->getBaseDiscountAmount()) - $this->getBaseDiscountInvoiced()
1385+
abs((float) $this->getBaseDiscountAmount()) - abs((float) $this->getBaseDiscountInvoiced())
13841386
);
13851387

13861388
$this->setTotalCanceled($this->getGrandTotal() - $this->getTotalPaid());

0 commit comments

Comments
 (0)