Jump to content

Invoice PDF


coghost

Recommended Posts

When an invoice is created the client receives a pdf invoice. I found the invoice template and would like to remove the big red banner from the top right corner that says UNPAID in white. I think it is all the code below the #Logo called # Invoice Status, is this correct?

Link to comment
Share on other sites

Thanks Brian, I want the whole thing gone not just the color. I find it offensive that it is there at all on an initial invoice and in fact something like this should only be there on an invoice after all attempts to collect have failed. It gives the impression of someone screaming loudly to pay your bill and that is very unprofessional.

Link to comment
Share on other sites

It's easy, really

 

Default invoice template has something lke this:

# Invoice Status
$statustext = $_LANG['invoices'.strtolower($status)];
$pdf->SetFillColor(223,85,74);
$pdf->SetDrawColor(171,49,43);
if ($status=="Paid") {
   $pdf->SetFillColor(151,223,74);
   $pdf->SetDrawColor(110,192,70);
}elseif ($status=="Cancelled") {
   $pdf->SetFillColor(200);
   $pdf->SetDrawColor(140);
} elseif ($status=="Refunded") {
   $pdf->SetFillColor(131,182,218);
   $pdf->SetDrawColor(91,136,182);
} elseif ($status=="Collections") {
   $pdf->SetFillColor(3,3,2);
   $pdf->SetDrawColor(127);
}
$pdf->SetXY(0,0);
$pdf->SetFont('freesans','B',28);
$pdf->SetTextColor(255);
$pdf->SetLineWidth(0.75);
$pdf->StartTransform();
$pdf->Rotate(-35,100,225);
$pdf->StopTransform();
$pdf->SetTextColor(0);

 

You just need to change it to:

# Invoice Status
$statustext = $_LANG['invoices'.strtolower($status)];
$pdf->SetFillColor(223,85,74);
$pdf->SetDrawColor(171,49,43);
if ($status=="Paid") {
   $pdf->SetFillColor(151,223,74);
   $pdf->SetDrawColor(110,192,70);
}elseif ($status=="Cancelled") {
   $pdf->SetFillColor(200);
   $pdf->SetDrawColor(140);
} elseif ($status=="Refunded") {
   $pdf->SetFillColor(131,182,218);
   $pdf->SetDrawColor(91,136,182);
} elseif ($status=="Collections") {
   $pdf->SetFillColor(3,3,2);
   $pdf->SetDrawColor(127);
}
$pdf->SetXY(0,0);
$pdf->SetFont('freesans','B',28);
$pdf->SetTextColor(255);
$pdf->SetLineWidth(0.75);
$pdf->StartTransform();
$pdf->Rotate(-35,100,225);
if ($status!="Unpaid") $pdf->Cell(100,18,strtoupper($statustext),'TB',0,'C','1');
$pdf->StopTransform();
$pdf->SetTextColor(0);

 

 

The only difference is this line here: if ($status!="Unpaid") $pdf->Cell(100,18,strtoupper($statustext),'TB',0,'C','1');

Link to comment
Share on other sites

The only difference is this line here: if ($status!="Unpaid") $pdf->Cell(100,18,strtoupper($statustext),'TB',0,'C','1');

I don't think that would solve his issue - all it does is not display the unpaid text, the big red banner would still be there... and he wants the whole thing removed.

 

so you either remove the lines below, or change them to 255 (white).

 

$pdf->SetFillColor(223,85,74);

$pdf->SetDrawColor(171,49,43);

Link to comment
Share on other sites

I don't think that would solve his issue - all it does is not display the unpaid text, the big red banner would still be there... and he wants the whole thing removed.

 

so you either remove the lines below, or change them to 255 (white).

 

Thats what it looks like to me to Brian. I just went ahead and removed all the code under # Invoice Status. Since turning it white only masks it and really for my need I dont need it at all.

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