[Vtigercrm-developers] hardcoded string in PDF Invoice filename
Holbok István
holbok at gmail.com
Fri Nov 25 08:25:33 PST 2011
Hi All,
It may useful if somebody would like to use other filename for the PDF
invoice. For example in Hungary better to use other word then Invoice.
My suggestion is to use instead of word Invoice a string variable that
could be set up in the settings screen or in config.inc.php.
Here is in file: ....\modules\Invoice\CreatePDF.php
include_once 'modules/Invoice/InvoicePDFController.php';
global $currentModule;
$controller = new Vtiger_InvoicePDFController($currentModule);
$controller->loadRecord(vtlib_purify($_REQUEST['record']));
$invoice_no =
getModuleSequenceNumber($currentModule,vtlib_purify($_REQUEST['record']));
if(isset($_REQUEST['savemode']) && $_REQUEST['savemode'] == 'file') {
$id = vtlib_purify($_REQUEST['record']);
$filepath='test/product/'.$id.'_*Invoice*_'.$invoice_no.'.pdf';
$controller->Output($filepath,'F'); //added file name to make it
work in IE, also forces the download giving the user the option to save
} else {
$controller->Output('*Invoice*_'.$invoice_no.'.pdf', 'D');//added
file name to make it work in IE, also forces the download giving the
user the option to save
exit();
}
Best regards:
--
Holbok István
telefon: +3670-342-0900
e-mail: holbok at gmail.com <mailto:holbok at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20111125/4cc8aeb0/attachment-0002.html
More information about the vtigercrm-developers
mailing list