8 class Grandtotal extends \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal
29 $this->_taxConfig = $taxConfig;
30 parent::__construct($taxHelper, $taxCalculation, $ordersFactory,
$data);
46 $store = $this->getOrder()->getStore();
47 if (!$this->_taxConfig->displaySalesTaxWithGrandTotal(
$store)) {
48 return parent::getTotalsForDisplay();
51 $amountExclTax = $this->
getAmount() - $this->getSource()->getTaxAmount();
52 $amountExclTax = $amountExclTax > 0 ? $amountExclTax : 0;
53 $amountExclTax = $this->getOrder()->formatPriceTxt($amountExclTax);
54 $tax = $this->getOrder()->formatPriceTxt($this->getSource()->getTaxAmount());
55 $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;
59 'amount' => $this->getAmountPrefix() . $amountExclTax,
60 'label' =>
__(
'Grand Total (Excl. Tax)') .
':',
61 'font_size' => $fontSize,
65 if ($this->_taxConfig->displaySalesFullSummary(
$store)) {
70 'amount' => $this->getAmountPrefix() .
$tax,
71 'label' =>
__(
'Tax') .
':',
72 'font_size' => $fontSize,
75 'amount' => $this->getAmountPrefix() .
$amount,
76 'label' =>
__(
'Grand Total (Incl. Tax)') .
':',
77 'font_size' => $fontSize,
__construct(\Magento\Tax\Helper\Data $taxHelper, \Magento\Tax\Model\Calculation $taxCalculation, \Magento\Tax\Model\ResourceModel\Sales\Order\Tax\CollectionFactory $ordersFactory, \Magento\Tax\Model\Config $taxConfig, array $data=[])