I am using a function to show custom information on an invoice: (app/code/core/Mage/Sales/Model/Order/Pdf/invoice.php)
public function customtext($page)
{
$page->drawText(Mage::helper('sales')->__('custom text '), 35, $this->y, 'UTF-8');
}
Added at end of invoice.php, and $this->customtext($page);
added to end of public function getPdf($invoices = array())
above $this->_afterGetPdf();
But I want to include in my custom text the value of 20% of my invoice Grand Total. How is this done?