[Vtigercrm-developers] hardcoded string in PDF Invoice filename
srihari Tp
srihari.tp at vtiger.com
Tue Nov 29 04:24:56 PST 2011
Hi Holbok,
Thanks for your feedback. Instead of changing it in settings screen or in
config.inc.php, we would recommend to have a translated string in the
language file for that label.
We have created a trac ticket with the solution and here is the
link<http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7243>.
Let us know your feedback.
On Fri, Nov 25, 2011 at 9:55 PM, Holbok István <holbok at gmail.com> wrote:
> 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
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
--
Best Regards,
Srihari,
*vtiger team.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20111129/a05e8e7f/attachment-0002.html
More information about the vtigercrm-developers
mailing list