leew87 Posted January 7, 2012 Share Posted January 7, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
m8internet Posted January 7, 2012 Share Posted January 7, 2012 It's not an image, it is text What version is this? The template does not look like the one I am using Check your language file for unpaid 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted January 8, 2012 Share Posted January 8, 2012 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); } 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.