Jump to content
paniolo

big red UNPAID

Recommended Posts

Hello.  I've searched for ways to remove the big red "UNPAID" on the invoices.  I've found an answer in the community from 2017 but it seems like it's changed since then.  Could I get some clarifications on how to remove it from the PDF version?

Here is what seems to be in the invoicepdf.tpl file:

# Invoice Status
$pdf->SetXY(0, 0);
$pdf->SetFont($pdfFont, 'B', 28);
$pdf->SetTextColor(255);
$pdf->SetLineWidth(0.75);
$pdf->StartTransform();
$pdf->Rotate(-35, 100, 225);
if ($status == 'Draft') {
    $pdf->SetFillColor(200);
    $pdf->SetDrawColor(140);
} elseif ($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);
} else {
    $pdf->SetFillColor(223, 85, 74);
    $pdf->SetDrawColor(171, 49, 43);
}
$pdf->Cell(100, 18, strtoupper(Lang::trans('invoices' . strtolower($status))), 'TB', 0, 'C', '1');
$pdf->StopTransform();
$pdf->SetTextColor(0);

However I don't see the option for unpaid.  Is unpaid handled under the final else?  Also, I understand the 3 numbers to be RGB.  What is the single number?

 

Share this post


Link to post
Share on other sites
16 hours ago, paniolo said:

Hello.  I've searched for ways to remove the big red "UNPAID" on the invoices.  I've found an answer in the community from 2017 but it seems like it's changed since then.  Could I get some clarifications on how to remove it from the PDF version?

Here is what seems to be in the invoicepdf.tpl file:

However I don't see the option for unpaid.  Is unpaid handled under the final else?  Also, I understand the 3 numbers to be RGB.  What is the single number?

 

Replace the line:

$pdf->Cell(100, 18, strtoupper(Lang::trans('invoices' . strtolower($status))), 'TB', 0, 'C', '1');    

For:

if ( $status != 'Unpaid'){
    $pdf->Cell(100, 18, strtoupper(Lang::trans('invoices' . strtolower($status))), 'TB', 0, 'C', '1');    
}

The flag will be displayed for all other statuses except Unpaid.

Edited by edvancombr

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated