Jump to content

invoice changes


leew87

Recommended Posts

hi All

 

i am currently using the same theme as the WHMCS demo that puts the coloured image over the right hand corner of the page to note the status of the invoice is it possiable to have the images display for all other status apart from unpaid.

 

i have found the code in the invoicepdf.tpl that shows the status

 

# 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->Cell(100,18,strtoupper($statustext),'TB',0,'C','1');

$pdf->StopTransform();

$pdf->SetTextColor(0);

 

but i can not see how to remove the Unpaid status from the loop

 

thanks for any help in advance.

Link to comment
Share on other sites

Use the following:

# 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);
}

if ($status!='Unpaid') {
   $pdf->SetXY(0,0);
   $pdf->SetFont('freesans','B',28);
   $pdf->SetTextColor(255);
   $pdf->SetLineWidth(0.75);
   $pdf->StartTransform();
   $pdf->Rotate(-35,100,225);
   $pdf->Cell(100,18,strtoupper($statustext),'TB',0,'C','1');
   $pdf->StopTransform();
   $pdf->SetTextColor(0);
}

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