easyhosting Posted February 12, 2016 Share Posted February 12, 2016 Hi I have some clients who are paying via bank transfer and apart from when they make the official order they are not given my bank details per invoice. How can I add my bank details to the bottom of the PDF invoice just after the table. i have tried by all that happens is the PDF invoices stop working or opening. 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted February 13, 2016 Share Posted February 13, 2016 We use the following code: if ($status=="Unpaid") { $pdf->SetFont($pdfFont,'B',10); $pdf->Cell(0,4,"Payment Method: ".$paymentmethod,0,1); $pdf->SetFont('pdfFont','',10); if ($paymentmethod=="Direct Deposit") { // The "visible name" of the payment method $pdf->Ln(); $pdf->Cell(0,0,"Bank: Bank Name",0,1,'L','0'); $pdf->Cell(0,0,"Payee Name: Payee Name",0,1,'L','0'); $pdf->Cell(0,0,"BSB: BSB Number",0,1,'L','0'); $pdf->Cell(0,0,"Account Number: Account Number",0,1,'L','0'); $pdf->Ln(); $pdf->Cell(0,0,"Please use the invoice number as a payment reference. No other remittance advice is required.",0,1,'L','0'); } } 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 13, 2016 Share Posted February 13, 2016 if it were me, i'd just add it using html - fpdf is fine and will work, but for most users, they'll probably find html easier to understand and modify... http://forum.whmcs.com/showthread.php?89574-How-to-Add-Payment-Details-to-your-WHMCS-PDF-Invoices&p=393683#post393683 0 Quote Link to comment Share on other sites More sharing options...
easyhosting Posted February 13, 2016 Author Share Posted February 13, 2016 if it were me, i'd just add it using html - fpdf is fine and will work, but for most users, they'll probably find html easier to understand and modify... http://forum.whmcs.com/showthread.php?89574-How-to-Add-Payment-Details-to-your-WHMCS-PDF-Invoices&p=393683#post393683 that html one does not work i just set a server error notice when opening a PDF invoice 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 13, 2016 Share Posted February 13, 2016 that html one does not work i just set a server error notice when opening a PDF invoice really? I just pasted it into our v6.2.2 dev after the transactions table and it works fine... I suppose technically the old references to 'Helvetica' should be changed to $pdfFont for v6, but other than that... the point being that invoicepdf.tpl already uses multiple html tables to display the description, prices, transactions etc - so adding another one shouldn't cause a server issue. 0 Quote Link to comment Share on other sites More sharing options...
easyhosting Posted February 13, 2016 Author Share Posted February 13, 2016 really? I just pasted it into our v6.2.2 dev after the transactions table and it works fine... I suppose technically the old references to 'Helvetica' should be changed to $pdfFont for v6, but other than that... the point being that invoicepdf.tpl already uses multiple html tables to display the description, prices, transactions etc - so adding another one shouldn't cause a server issue. Hi old references to 'Helvetica' must have been the cause as i changed it too $pdfFont and it works 0 Quote Link to comment Share on other sites More sharing options...
easyhosting Posted February 13, 2016 Author Share Posted February 13, 2016 really? I just pasted it into our v6.2.2 dev after the transactions table and it works fine... I suppose technically the old references to 'Helvetica' should be changed to $pdfFont for v6, but other than that... the point being that invoicepdf.tpl already uses multiple html tables to display the description, prices, transactions etc - so adding another one shouldn't cause a server issue. Now it seems to move over to 2 pages 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 13, 2016 Share Posted February 13, 2016 Now it seems to move over to 2 pages that's the nature of the beast of adding more information to the invoice - especially if it contains an order for multiple different products which will take up more space on the page. what I would suggest is that you use some IF statements to only show particular sections depending on the invoice status ($status). for example, if an invoice is unpaid, there is no point in showing the transactions table because it will be blank - so for unpaid invoices, it makes more sense to show the payment methods... and oppositely, for invoices that have been paid, there's no point including the payment information - but more useful to show the transactions table. that will allow you to utilise the page space more effectively. 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.