Skip to content

Commit 42f53f8

Browse files
committed
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.
1 parent 043b721 commit 42f53f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Sales/Model/Order/Pdf/Total/DefaultTotal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function getFullTaxInfo()
145145
public function canDisplay()
146146
{
147147
$amount = $this->getAmount();
148-
return $this->getDisplayZero() || $amount != 0;
148+
return $this->getDisplayZero() === 'true' || $amount != 0;
149149
}
150150

151151
/**

0 commit comments

Comments
 (0)