Jump to content

Add bank / mailin information to PDF invoice


benFF

Recommended Posts

Simple mod here - adds the "Instructions" field from the payment gateway settings to the bottom of your invoice.

 

Only shows if there is actually something in the field, else stays hidden :)

 

Look inside the "invoicepdf.tpl" file and scroll to the bottom until you find:

 

# Notes
if ($notes) {
   $pdf->Ln(5);
$pdf->SetFont('freesans','',;
$pdf->MultiCell(170,5,$_LANG["invoicesnotes"].": $notes");
}

 

Add this below (or anywhere you want really, I just wanted mine at the bottom :)

 

# Payment Instructions
$paymentmethodsql = mysql_real_escape_string($paymentmethod);
$result = mysql_query("select pg1.value AS instructions from tblpaymentgateways pg1, tblpaymentgateways pg2 WHERE pg1.gateway = pg2.gateway AND pg1.setting = 'instructions' AND pg2.value = '$paymentmethodsql'");
$data = mysql_fetch_array($result);
mysql_free_result($result);

if ($paymentinstructions = (!empty($data['instructions'])) ? $data['instructions'] : '') {
   $pdf->Ln(5);
$pdf->SetFont('freesans','B',10);
$pdf->Cell(0,4,'Payment Instructions',0,1);
   $pdf->Ln(1);
$pdf->SetFont('freesans','B',;	
$pdf->Cell(0,4,$paymentmethod,0,1);
$pdf->SetFont('freesans','',;	
$pdf->MultiCell(0,5,$paymentinstructions,0,'L');
}

 

Save it and you're done :)

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