File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/code/Magento/Sales/Model Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1378,9 +1378,11 @@ public function registerCancellation($comment = '', $graceful = true)
1378
1378
$ this ->setShippingCanceled ($ this ->getShippingAmount () - $ this ->getShippingInvoiced ());
1379
1379
$ this ->setBaseShippingCanceled ($ this ->getBaseShippingAmount () - $ this ->getBaseShippingInvoiced ());
1380
1380
1381
- $ this ->setDiscountCanceled (abs ((float ) $ this ->getDiscountAmount ()) - $ this ->getDiscountInvoiced ());
1381
+ $ this ->setDiscountCanceled (
1382
+ abs ((float ) $ this ->getDiscountAmount ()) - abs ((float ) $ this ->getDiscountInvoiced ()))
1383
+ ;
1382
1384
$ this ->setBaseDiscountCanceled (
1383
- abs ((float ) $ this ->getBaseDiscountAmount ()) - $ this ->getBaseDiscountInvoiced ()
1385
+ abs ((float ) $ this ->getBaseDiscountAmount ()) - abs (( float ) $ this ->getBaseDiscountInvoiced () )
1384
1386
);
1385
1387
1386
1388
$ this ->setTotalCanceled ($ this ->getGrandTotal () - $ this ->getTotalPaid ());
You can’t perform that action at this time.
0 commit comments