Jump to content

Invoice URL in PDF


sol2010

Recommended Posts

I am customising the PDF invoice and wondering if it is possible to add a direct link to the invoice, rather than just the client area... something like

 



$html = '<a href="http://www.mydomain.com/clients/viewinvoice.php?id='.$invoicenum.'">click here to view invoice</a>'; 


 

Can anyone help with that?

Link to comment
Share on other sites

  • 2 weeks later...
Doh - been trying to work this out for ages - and as soon as I post a question on the forum, I worked it out....

 

Pretty simple really:

 

$pdf->Cell(0,0,"http://www.mydomain.com/clients/viewinvoice.php?id=".$invoicenum,0,1,'L','0');

 

Doesn't the client still have to log in? Where do you place this? In the invoice email?

Link to comment
Share on other sites

Hi

 

Yes, the client still must log in - but it is a direct link to that specific invoice.

 

You can place it where you like - you can even put it in the email template if you want.

 

I placed it in the invoicepdf.tpl template file like so :

 

 

///////////////////////////////////////////////////

// show bank info only if unpaid

 

if ($status=="Unpaid") {

 

$pdf->SetFont('helvetica','B',15);

$pdf->Cell(0,0,"Available Payment Methods: ",0,1,'L','0'); //Pay by:

 

 

$pdf->Ln();

$pdf->SetFont('helvetica','',12);

$pdf->Cell(0,0,"PayPal: ",0,1,'L','0'); //Pay by:

$pdf->SetFont('helvetica','',10);

$pdf->Cell(0,0,"To pay with PayPal (using either a Credit Card or your PayPal account balance), login here:",0,1,'L','0');

$pdf->Cell(0,0,"http://www.MYDOMAIN.com/WHMCS/viewinvoice.php?id=".$invoicenum,0,1,'L','0');

 

 

#ETC....

 

 

} // End of unpaid for payment details

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated