Question

I am using Magento 1.9.3

I have enabled Display Full Tax Summary and its working fine. I can see my VAT and TAX both in totals area.

But now I need to remove only Total Tax data from invoice PDF. (Screenshot)

Is it possible to remove Total Tax data only form PDF?

enter image description here

Was it helpful?

Solution

override this file

app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php

to

app/code/local/Mage/Sales/Model/Order/Pdf/Abstract.php

and Find insertTotals function

foreach ($total->getTotalsForDisplay() as $totalData) {
    $lineBlock['lines'][] = array(
        array(
            'text'      => $totalData['label'],
            'feed'      => 475,
            'align'     => 'right',
            'font_size' => $totalData['font_size'],
            'font'      => 'bold'
        ),
        array(
            'text'      => $totalData['amount'],
            'feed'      => 565,
            'align'     => 'right',
            'font_size' => $totalData['font_size'],
            'font'      => 'bold'
        ),
    );
}

to

foreach ($total->getTotalsForDisplay() as $totalData) {
                    if($totalData['label'] != "Tax:") {
                    $lineBlock['lines'][] = array(
                        array(
                            'text'      => $totalData['label'],
                            'feed'      => 475,
                            'align'     => 'right',
                            'font_size' => $totalData['font_size'],
                            'font'      => 'bold'
                        ),
                        array(
                            'text'      => $totalData['amount'],
                            'feed'      => 565,
                            'align'     => 'right',
                            'font_size' => $totalData['font_size'],
                            'font'      => 'bold'
                        ),
                    );
                     }
                }
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top