From 42f53f8641150acdf46a43ebc56001c4f9fe6c0a Mon Sep 17 00:00:00 2001 From: "Kristof, Fooman" Date: Wed, 22 Jul 2015 00:22:37 +1200 Subject: [PATCH] string false does not evaluate to false The false value used here https://github.com/magento/magento2/blob/develop/app/code/Magento/Sales/etc/pdf.xml#L33 gets represented as a string which leads to all totals being shown in the pdfs even if the amount is 0 and it is configured to not show. Checking for the string true fixes it. --- app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php b/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php index aef42991031bf..39c501d7ff084 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php @@ -145,7 +145,7 @@ public function getFullTaxInfo() public function canDisplay() { $amount = $this->getAmount(); - return $this->getDisplayZero() || $amount != 0; + return $this->getDisplayZero() === 'true' || $amount != 0; } /**