We use the popular WHMCS billing system to manage our customers accounts alongside Umbraco.

One of the things our customers asked for is the Bank details to be included on the PDF invoice which is emailed or downloaded from within their account.

We thought this was a great idea. A quick look through the WHMCS Community has shown others asking this exact question in the past, using the post on the community as a guide we implemented this into our system with a few minor tweaks.

The change is very small, firstly open up the file called invoicepdf.tpl this can be found within your template folder.

Find # Clients Details and then around line 102 you should find the following:

$pdf->Ln(10);

After that line, insert the following:

#BANK TRANSFER PAYMENTS
if ($paymentmethod=="Bank Transfer") {
$pdf->SetXY(15, 95);
$pdf->SetFont('$pdfFont','B',10);
$pdf->Cell(180,15,"Payment Due Via Bank Transfer",0,0,'R');
$pdf->Ln(10);
$pdf->SetFont('$pdfFont','',9);
$pdf->Cell(0, 4, "Bank Name: BANK NAME", 0, 1, 'R');
$pdf->Cell(0, 4, "Payee Name: PAYEE NAME", 0, 1, 'R');
$pdf->Cell(0, 4, "Sort Code: SORT CODE", 0, 1, 'R');
$pdf->Cell(0, 4, "Account No: ACCOUNT NUMBER", 0, 1, 'R');
$pdf->Cell(0, 4, "IBAN: IBAN NUMBER", 0, 1, 'R');
$pdf->Cell(0, 4, "BIC / SWIFT: BIN NUMBER", 0, 1, 'R');
$pdf->Cell(0, 4, "Ref: #$invoicenum", 0, 1, 'R');
$pdf->Ln(10);
}

Finally replace the values in the text above with your actual Bank Details.

That's all there is to it!

Comments

Post a comment

Fields marked with an * (asterisk) are required


Recent Posts

Tips & Tricks
How to use Cloudflare Workers and Transform Rul...

This post explains how to m...

News
UmbHost Limited is now a Silver Umbraco Partner

We are now officially a Sil...

Umbraco
How to pass a Content Security Nonce (CSP) to G...

How to use a CSP nonce with...

News
UmbCheckout 1.0.0 & UmbCheckout.StarterKit.Stri...

The stable version of UmbCh...

News
Voting is now open for the Green Business of th...

We've been shortlisted! - P...

ADVERTISTING
Browse Umbraco Hosting

Umbraco Hosting Starting At $26/month