Skip to content

Commit 382e550

Browse files
issue #18617 in v2.2.6
1 parent c9d1bec commit 382e550

File tree

1 file changed

+13
-0
lines changed
  • app/code/Magento/Weee/Model/Sales/Pdf

1 file changed

+13
-0
lines changed

app/code/Magento/Weee/Model/Sales/Pdf/Weee.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,17 @@ public function getTotalsForDisplay()
7070

7171
return $totals;
7272
}
73+
74+
/**
75+
* Check if we can display Weee total information in PDF
76+
*
77+
* @return bool
78+
*/
79+
public function canDisplay()
80+
{
81+
$items = $this->getSource()->getAllItems();
82+
$store = $this->getSource()->getStore();
83+
$amount = $this->_weeeData->getTotalAmounts($items, $store);
84+
return $this->getDisplayZero() === 'true' || $amount != 0;
85+
}
7386
}

0 commit comments

Comments
 (0)