Jump to content

big red UNPAID


paniolo

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?

 

Link to comment
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
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