Jump to content

Edit Invoice Template PDF!


futuroweb

Recommended Posts

Hello,

 

I want to know how to do to edit the bill to show me where it says description, add the field "Quantity" and "Unit Price". I also want that the bill covers the whole page. That goes where the product description page down to lengthen.

 

Attached screenshot of what I want!

Invoice-example (1).JPG

 

Thank you!

Link to comment
Share on other sites

Edit the following

 

  • templates/{$template}/css/invoice.css
  • templates/{$template}/viewinvoice.tpl

 

For "add the field" u should edit the .tpl and change the lang/{$yourlang}.php values, i order to follow the WHMCS design

i'm sorry, but this is totally wrong advice - the question was about the pdf invoice and that has nothing to do with stylesheets or viewinvoice.tpl... oh if only it did!

 

the solution will lie in editing invoicepdf.tpl, but what you want to do isn't simple... going by your drawing, you could split this into three steps...

 

1. redraw the invoice table with two additional columns - quantity and unit price... this step would be easy as it's just html!

2. add the quantity and unit price values into the invoice... this is the difficult part as you would either have to use PHP to obtain these values from the description field or get them from the database - I don't believe they are passed as separate variables to the invoicepdf template (would be easier to do this if they were!).

3. extend the length of the invoice table - you might be able to do this by simply adding a height value to the table tag.

 

I think what you want to do can probably be achieved, but the end result may go beyond just editing invoicepdf.tpl - that will depend on how much PHP tweaking can be achieved in the template, or whether you need to do it externally with hooks... all of which might take someone some time to complete.

Link to comment
Share on other sites

  • 7 years later...

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