izghitu Posted August 9, 2018 Share Posted August 9, 2018 Hi, Sorry for opening a topic that has been opened already before but I was unable to find an answer in those that would help me. When I create an invoice for a client and then view it from the Client area the logo size is huge. I did edit invoicepdf.tpl and set it to show properly in the downloaded PDF file but it still appears huge when the invoice is viewed in the Client area. One other problem I have is that the invoice viewed in the Client Area appears to be different from the downloaded one in terms of data that is displayed. For example if I create an invoice and set the payment method to Bank Transfer then the bank transfer details will appear in the invoice viewed in the Client area. After I download that invoice I can no longer see those bank payment details. Is it possible to add those same details into the PDF version of the invoice? Please help. Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted August 9, 2018 Share Posted August 9, 2018 (edited) 4 hours ago, izghitu said: When I create an invoice for a client and then view it from the Client area the logo size is huge. I did edit invoicepdf.tpl and set it to show properly in the downloaded PDF file but it still appears huge when the invoice is viewed in the Client area. invoicepdf.tpl is for the PDF version. The invoice you see from Clientarea is the HTML version that can be edited from viewinvoice.tpl template file. 4 hours ago, izghitu said: One other problem I have is that the invoice viewed in the Client Area appears to be different from the downloaded one in terms of data that is displayed. For example if I create an invoice and set the payment method to Bank Transfer then the bank transfer details will appear in the invoice viewed in the Client area. After I download that invoice I can no longer see those bank payment details. Is it possible to add those same details into the PDF version of the invoice? Simply add a line somewhere in invoicepdf.tpl with your bank details always visible. Edited August 9, 2018 by Kian 0 Quote Link to comment Share on other sites More sharing options...
izghitu Posted August 9, 2018 Author Share Posted August 9, 2018 5 hours ago, Kian said: invoicepdf.tpl is for the PDF version. The invoice you see from Clientarea is the HTML version that can be edited from viewinvoice.tpl template file. I found reference to the logo in that file but I can't see how I can do the sizing stuff, there's nothing in the docs about this, can you please help with details? 5 hours ago, Kian said: Simply add a line somewhere in invoicepdf.tpl with your bank details always visible. Can you please be more detailed about this too? how do I do it? What variable do I use? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted August 9, 2018 Share Posted August 9, 2018 1 hour ago, izghitu said: I found reference to the logo in that file but I can't see how I can do the sizing stuff, there's nothing in the docs about this, can you please help with details? You can use style... <p><img src="{$logo}" title="{$companyname}" style="height:60px" /></p> Or a class... <p><img src="{$logo}" title="{$companyname}" class="mylogo" /></p> <!-- Don't forget to create your CSS rule .mylogo { height:60px } This should go in your .css file --> Or use a dedicated image just for this page: <p><img src="my-logo-60px-height.png" title="{$companyname}" /></p> 1 hour ago, izghitu said: Can you please be more detailed about this too? how do I do it? What variable do I use? You could add your bank details as last line in Pay To Text (Setup > General Settings > Pay To Text). If you want to place it in another place open invoicepdf.tpl like follows: # Put me right above "# Generation Date" to show bank details as footer on invoice $pdf->SetFont('freesans','',8); $pdf->Ln(5); $pdf->Cell(180,4,'IBAN: IT0000000000000005 My Bank Ltd. - Pay To: Elvis Presley','','','C'); 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 9, 2018 Share Posted August 9, 2018 7 minutes ago, Kian said: $pdf->SetFont('freesans','',8); on newer versions, that should be... $pdf->SetFont($pdfFont, '', 8); 10 minutes ago, Kian said: $pdf->Cell(180,4,'IBAN: IT0000000000000005 My Bank Ltd. - Pay To: Elvis Presley','','','C'); personally, i'd use a HTML table, but doesn't matter... either will work. 10 minutes ago, Kian said: # Put me right above "# Generation Date" to show bank details as footer on invoice if you wanted to add it to the footer, it would be easier to use an invoicepdffooter.tpl template for that. 1 Quote Link to comment Share on other sites More sharing options...
izghitu Posted August 9, 2018 Author Share Posted August 9, 2018 Thanks guys for your help so far. What if I want the bank details displayed in the PDF only when the method of payment chosen is Bank Transfer? How do I correctly add that If statement? Please let me know. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 10, 2018 Share Posted August 10, 2018 21 hours ago, izghitu said: What if I want the bank details displayed in the PDF only when the method of payment chosen is Bank Transfer? How do I correctly add that If statement? effectively it's a double IF statement because there's no point giving them payment details if they've already paid (e.g on the Payment Confirmation Invoice)... if ($status=="Unpaid" && $paymentmethod=="Bank Transfer") { output your bank transfer details here... } in our hosting invoices, we use a similar technique for multiple payment methods.. so we'll have If ($status=="Unpaid") { as the opening if statement and then additional IF statements for each offline payment method available... e.g bank transfer, cheques (we still get some!) etc... alternatively, if you have multiple offline options, you can give them all in the same table... plenty of options, once you decide exactly what you want to show. 0 Quote Link to comment Share on other sites More sharing options...
izghitu Posted August 10, 2018 Author Share Posted August 10, 2018 Yay, that did the trick. Thanks a lot for your help! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.