diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php index ab06f423eb4d5..99b61fd64e124 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php @@ -70,6 +70,10 @@ public function includeTax() */ public function getTotalExclTax() { + // The tax key will not exist if a quote contains no items + if (!isset($this->getTotals()['tax'])) { + return $this->getTotals()['grand_total']->getValue(); + } $excl = $this->getTotals()['grand_total']->getValue() - $this->getTotals()['tax']->getValue(); $excl = max($excl, 0); return $excl;