vtiger Forum Index vtiger
The Honest Open Source CRM
 

Adding NEW BUTTON to Invoice Detailed View.
Click here to go to the original topic

 
       vtiger Forum Index -> Developer Forum - 4.x
Previous topic :: Next topic  
Author Message
makos



Joined: 14 Nov 2005
Posts: 29

Posted: Sun Nov 20, 2005 6:22 pm    Post subject: Adding NEW BUTTON to Invoice Detailed View.  

Hello,
I want to add a new Export to PDF button to Invoice detailed view that would create billing PDF, and name it "Export a Bill" or something.
In other words I need to print the same invoice in two different PDF forms.
Questions are:

1) How to add a button to Invoices detailed view?
I found that buttons are described in /vtiger/modules/Invoice/DetailedView.php
Code: $xtpl->assign("CREATEPDF","<td><input title=\"Export To PDF\" accessKey=\"Alt+e\" class=\"button\" onclick=\"this.form.return_module.value='Invoice'; this.form.return_action.value='DetailView'; this.form.return_id.value='".$_REQUEST['record']."'; this.form.action.value='CreatePDF'\" type=\"submit\" name=\"Export To PDF\" value=\"Export To PDF\"></td>");


But! Copying and changing is not enough. Do I need to declare some action/method or something? (I foung that there is an $action CreatePDF but where it is described?

2) How this button work? It will execute my custom CreatePDF.php file or it will pass some arguments to CreatePDF.php file and there it must be described?

Please point me to the right direction!
Thanks in advance for any help!
Back to top  
grahama



Joined: 08 Oct 2005
Posts: 73

Posted: Mon Nov 21, 2005 4:00 pm    Post subject: Re: Adding NEW BUTTON to Invoice Detailed View.  

Hi

We have a similar, but different problem, that I think our fix might help you...

We need to create two formats for invoices, orders and quotes. The difference is ONE with logo for email and one without, for printing onto the printed letterhead.

We have done this by adding a pop up from the export 2 PDF button, that opens a dialogue, with the two options listed... then the selection carry's out the desired PDF template. Perhaps this method would suit your problem, you could have the dialogue asking for Invoice or Billing Sheet...??

If this is of interest, let me know, and we can post the files and instructions.

Regards

Graham
Back to top  
makos



Joined: 14 Nov 2005
Posts: 29

Posted: Mon Nov 21, 2005 4:34 pm    Post subject: Re: Adding NEW BUTTON to Invoice Detailed View.  

Thanks for reply!

Yes. Please post them ASAP!
Back to top  
makos



Joined: 14 Nov 2005
Posts: 29

Posted: Tue Nov 22, 2005 3:35 pm    Post subject: Re: Adding NEW BUTTON to Invoice Detailed View.  

Sorry, but its realy urgent for me. So could u provide any further instructions please. ;)
Back to top  
 
       vtiger Forum Index -> Developer Forum - 4.x
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group