Remove tax from invoice pdf

I am trying to remove this single line (Tax :) from the pdf invoice. He did not know that it would be so hard and cost me 5 hours, and I was still stuck.

His print button in the sales invoice .. in admin enter image description here

Please, help!

My last attempt was

placement if($totalInfo['source_field'] == 'tax_amount') {continue;} foreach below ()

In _getTotalsList ($ Source) in Mage_Sales_Model_Order_Pdf_Abstract (Which I am going to override later)

  protected function _getTotalsList($source) { $totals = Mage::getConfig()->getNode('global/pdf/totals')->asArray(); usort($totals, array($this, '_sortTotalsList')); $totalModels = array(); foreach ($totals as $index => $totalInfo) { 

if($totalInfo['source_field'] == 'tax_amount') {continue;}

  if (!empty($totalInfo['model'])) { $totalModel = Mage::getModel($totalInfo['model']); if ($totalModel instanceof Mage_Sales_Model_Order_Pdf_Total_Default) { $totalInfo['model'] = $totalModel; } else { Mage::throwException( Mage::helper('sales')->__('PDF total model should extend Mage_Sales_Model_Order_Pdf_Total_Default') ); } } else { $totalModel = Mage::getModel($this->_defaultTotalModel); } $totalModel->setData($totalInfo); $totalModels[] = $totalModel; } return $totalModels; } 

but it didn’t work.

+4
source share
5 answers

To remove the "Tax" column from a magento PDF invoice -

Two files you need to change:

  • To remove headers: /app/code/local/Mage/Sales/Model/Order/Pdf/Invoice.php
  • To increase the tax on each line item /app/code/local/Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php

Hope this helps you!

another wise

Refer to the links

0
source

You cannot delete this line, because still the total will be 1.10, just hidden. If you do not want the tax in your products to simply disable it in the magento configuration.

Switch to:

 Sales > Tax > Manage Tax Rules 

And set taxes for all customer groups as 0.

0
source

The two main magento classes responsible for displaying tax reports in pdf format are

 Mage_Tax_Model_Sales_Pdf_Tax Mage_Sales_Model_Order_Pdf_Total_Default 

You can use these class files to display tax information as you wish.

0
source

I had this problem on my own several times, and I found a couple of hacking methods, but today I think I finally found the “right” solution.

If you look at layout / sales.xml, you will find several nodes that contain a block called order_totals , and inside it is a block called tax . This is what is responsible for this line appearing in your PDF file.

I would suggest the “right” way to remove it, and then add this to your layout / local.xml file:

 <sales_order_printinvoice> <reference name="order_totals"> <remove name="tax"/> </reference> </sales_order_printinvoice> 

(If you do not have a layout / local.xml file, just create one.)

This removes it from the printout of the invoice, which is mentioned in the question. To remove it from other places, make sure you have the correct node name - for example, to remove it from the order listing available to the client from the order history, use this:

 <sales_order_print> <reference name="order_totals"> <remove name="tax"/> </reference> </sales_order_print> 

... etc. for letters, etc. Just look in layout / sales.xml for each _totals occurrence to see all affected nodes.

0
source

I hope you can try in admin

System > Configuration > Sales > Tax from this select the Orders, Invoices, Credit Memos Display Settings and


Display Full Tax Summary as No There are other settings. This will help. enter image description here

0
source

Source: https://habr.com/ru/post/1492875/


All Articles