leew87
Retired Forum Member-
Posts
29 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Hotfixes
Everything posted by leew87
-
InvoicePDF.tpl not showing logo even tho logo is there
leew87 replied to leew87's topic in Developer Corner
hi i have tried the default tpl file that works even with my cost but even with the code working if i copy it make it does not display. which is why i am pulling my hair out clearly if it works on the default it should work on the custom. this code has been working for a very long which with no issue has there be any recent changes to the way it has to be coded? -
InvoicePDF.tpl not showing logo even tho logo is there
leew87 replied to leew87's topic in Developer Corner
Hi Bear yes i have tried i have also tried using the curl via SSH this gives a 200 status. curl -o /dev/null -s -w "%{http_code}\n" https://billing.illit.co.uk/assets/img/illit/logo.png 200 but the logo still does not display for some great unknow reason. -
Hi all i am pulling my hair out i have a custom design invoicepdf.tpl it is not showing my logo i set for some reason it has been working for many years without issue but for some reason it is now not working no changes have been made or anything. i have checked the location using curl and it shows a 200 status so i know it is looking in the correct location it just will not display. i have tried to contact whmcs support that say its a custom invoicepdf.tpl issue so would need to find a developer to troubleshoot/help. can anyone help or even point me in the right direction of how i could attempt to troubleshoot this. the code im using is # Logo $logoFilename = 'placeholder.png'; if (file_exists(ROOTDIR . '/assets/img/illit/logo.png')) { $logoFilename = 'logo.png'; } elseif (file_exists(ROOTDIR . '/assets/img/illit/logo.jpg')) { $logoFilename = 'logo.jpg'; } $pdf->Image(ROOTDIR . '/assets/img/illit/' . $logoFilename, 15, 25, 75); i have other images added to my invoicepfd.tpl file with the same coding they work just fine without issue. i am at a bit of a lose. thank you all in advance for any help
-
Still Stuck on Invoice Dates in Description
leew87 replied to Wolfie6610's topic in Developer Corner
Ok thank you for taking the time to explain has the github script been edited to reflect or would I need to make the adjustment to change hook? -
Still Stuck on Invoice Dates in Description
leew87 replied to Wolfie6610's topic in Developer Corner
hi thank you for your code when i contacted whmcs support before knowing i could post here they said the following There isn't a way within WHMCS, as it comes, to remove such description data. The data is stored in the tblinvoiceitems database table, which you will see is stored as: PRODUCT NAME (08/04/2022 - 07/05/2022) You would need to remove that from the table itself upon invoice generation, but before it's delivered to the client, via a hook like InvoiceCreation: https://developers.whmcs.com/hooks-reference/invoices-and-quotes/#invoicecreation Capsule can be used to update the value: https://developers.whmcs.com/advanced/db-interaction/ A basic to intermediate knowledge of PHP would be required to achieve it. so from what i understand InvoiceCreation is where they recomend. -
Still Stuck on Invoice Dates in Description
leew87 replied to Wolfie6610's topic in Developer Corner
thank you i will try and get my head around this and hopefully get it work new to development so all abit confusing for me where would i enter this hook code? sorry if it seems like a silly question i apologies. if you had this already written of course i would be very very greatful if you wished to share then one you have tested. -
Still Stuck on Invoice Dates in Description
leew87 replied to Wolfie6610's topic in Developer Corner
i am looking for assistance to learn this myself and direction on resolve this issue rather than just outsourcing to custom development such little task which it was i thought this community was about not just paid work. -
Still Stuck on Invoice Dates in Description
leew87 replied to Wolfie6610's topic in Developer Corner
i am also looking for a solution for this -
hi All i am very new to development / WHMCS i am looking for a way to remove the dates from invoice description i am looking to for descriptions to go fromPRODUCT NAME (08/04/2022 - 07/05/2022) to PRODUCT NAME I have seen from some screenshots some of you have managed this but i dont no where to start with the code as far as i can work out i would need to edit the in invoice.tpl how would i go about editing this line of code nl2br($item['description'] in some way. i thank you all in advance for any assistance you maybe able to give.
-
replied thanks
-
hi all i am looking for a quote for someone to modify my invoice that is both emailed and downloaded as PDF to show my bank details if the payment gateway is set to Bank Transfer. thanks all in advance regards Lee
-
hi i wonder if someone would be intrested in carring out some minor edits on the Default invoice template that is used in the V5 Demo i am looking to add a footer very close to the bottom of page 1 around 5-10mm and a watermark behind the table in the invoice. i am also looking for status that is displayed in the right corner if the invoice is paid or unpaid ect only to display on all other status apart from Unpaid is this possiable? look forward to you replys pm me with Quotes or for more information thanks
-
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.
-
i am looking for some custom WHMCS billing client development i would like public function Footer() edited in tcpdf.php so it only puts footer on the 1st page and not every page. 2nd i would like the invoice.tpl and quotepdf.tpl to show as attached(WHATIWANT.pdf) it is almost there it currently displays (WHMCSSAMPLE.pdf) it just need the watermark adjusting and sending to background. please PM me if you would like to see the PDF i mentioned as i will not let me upload these i get the following "Your submission could not be processed because a security token was missing. If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error." or if you need anymore infomation do not hesitate to PM me and i will be happy to supply it thanks all in advance.
-
where can i find the server status folder to view server Status in my WHMCS
-
i really like the layout any change of a copy of the file and i will edit images and colours ect for my company would be much appricated
-
ggd8176 which template did you edit got change the header ect
-
can any1 help with the following error that i am getting when i try to call functions from another php file Fatal error: Call to a member function ChapterTitle() on a non-object in /home/illit/public_html/whmcs/includes/extrafunctions.php on line 63
-
right i am now about 90% complete i put i am having problems calling function from another php file i am getting errors Fatal error: Call to a member function ChapterTitle() on a non-object in /home/illit/public_html/whmcs/includes/extrafunctions.php on line 63 can any1 help
-
redrat i will post a copy of my pdfconfig.php file on completion i have found a Tutorials on Line breaks and colors which loads text in from a txt file which would be handy but cant get it work check it out http://www.fpdf.org/ maybe some can help get it working on pdfconfig regards
-
hi i wonder if anyone can help i am trying to follow a tutorial found at http://www.fpdf.org/ using the following code to load in a file and display it on my invoice require('fpdf.php'); class PDF extends FPDF { function Header() { global $title; //Arial bold 15 $this->SetFont('Arial','B',15); //Calculate width of title and position $w=$this->GetStringWidth($title)+6; $this->SetX((210-$w)/2); //Colors of frame, background and text $this->SetDrawColor(0,80,180); $this->SetFillColor(230,230,0); $this->SetTextColor(220,50,50); //Thickness of frame (1 mm) $this->SetLineWidth(1); //Title $this->Cell($w,9,$title,1,1,'C',true); //Line break $this->Ln(10); } function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',; //Text color in gray $this->SetTextColor(128); //Page number $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C'); } function ChapterTitle($num,$label) { //Arial 12 $this->SetFont('Arial','',12); //Background color $this->SetFillColor(200,220,255); //Title $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true); //Line break $this->Ln(4); } function ChapterBody($file) { //Read text file $f=fopen($file,'r'); $txt=fread($f,filesize($file)); fclose($f); //Times 12 $this->SetFont('Times','',12); //Output justified text $this->MultiCell(0,5,$txt); //Line break $this->Ln(); //Mention in italics $this->SetFont('','I'); $this->Cell(0,5,'(end of excerpt)'); } function PrintChapter($num,$title,$file) { $this->AddPage(); $this->ChapterTitle($num,$title); $this->ChapterBody($file); } } $pdf=new PDF(); $title='Terms And Conditions'; $pdf->SetTitle($title); $pdf->SetAuthor(ILL IT Solutions); $pdf->PrintChapter(1,'Terms And Conditions','T&C.txt'); $pdf->Output(); can anyone help i am trying to create an invoice that looks like my current 1 found at http://www.illit.co.uk/ILLITInvoice.pdf thanks in advance Lee
-
i am closer to creating my invoice that i sent link for now but still not 100% there as you can see this is my pdfconfig.pho now which seems to be working <?php # Logo $pdf->Image(ROOTDIR.'/images/logo.jpg',5,5); # Header Bar $pdf->Ln(4); $invoiceprefix = $_LANG["invoicenumber"]; $pdf->SetFont('Arial','B',14); $pdf->SetFillColor(255,255,255); $pdf->Cell(0,8,$invoiceprefix.$invoicenum,0,1,'R','1'); $pdf->SetFont('Arial','',12); $pdf->Cell(0,6,$_LANG["invoicesdatecreated"].': '.$datecreated.'',0,1,'R','1'); $pdf->Ln(5); # Company Details $pdf->SetFont('Arial','',12); $pdf->Cell(0,4,$companyname,0,1,'R'); $pdf->SetFont('Arial','',10); for ( $i = 0; $i <= 4; $i += 1) { $pdf->Cell(0,4,trim($companyaddress[$i]),0,1,'R'); } # Clients Details $pdf->SetFont('Arial','B',12); $pdf->Cell(0,4,$_LANG["invoicesinvoicedto"],0,1); $pdf->SetFont('Arial','',10); if ($clientsdetails["companyname"]) { $pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L'); $pdf->Cell(0,4,$_LANG["invoicesattn"].": ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } else { $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } $pdf->SetFont('Arial','',10); $pdf->Cell(0,4,$clientsdetails["address1"],0,1,'L'); if ($clientsdetails["address2"]) { $pdf->Cell(0,4,$clientsdetails["address2"],0,1,'L'); } $pdf->Cell(0,4,$clientsdetails["city"].", ".$clientsdetails["state"].", ".$clientsdetails["postcode"],0,1,'L'); $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); $pdf->Ln(10); # Invoice Table $pdf->SetDrawColor(212,212,212); $pdf->SetFont('Arial','B',12); $pdf->SetFillColor(63,63,63); $pdf->SetTextColor(117,188,232); $pdf->Cell(130,7,$_LANG["invoicesdescription"],1,0,'C','1'); $pdf->Cell(40,7,$_LANG["invoicesamount"],1,0,'C','1'); $pdf->Ln(); $pdf->SetFont('Arial','',11); $pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); foreach ($invoiceitems AS $item) { if (strlen($item["description"])>75) { $pdf->Cell(130,6,substr($item["description"],0,75),1); $pdf->Cell(40,6,$currencysymbol.$item["amount"],1,0,'C'); $pdf->Ln(); $pdf->Cell(130,6,substr($item["description"],75),1); $pdf->Cell(40,6,"",1,0,'C'); } else { $pdf->Cell(130,6,$item["description"],1); $pdf->Cell(40,6,$currencysymbol.$item["amount"],1,0,'C'); } $pdf->Ln(); } $pdf->SetFont('Arial','B',12); $pdf->SetTextColor(117,188,232); $pdf->Cell(130,7,$_LANG["invoicessubtotal"],1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$subtotal,1,0,'C','1'); $pdf->Ln(); /* Add VAT Tax to the invoice un comment this if ($taxrate!="0.00") { $pdf->Cell(130,7,$taxrate."% ".$taxname,1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$tax,1,0,'C','1'); $pdf->Ln(); } if ($taxrate2!="0.00") { $pdf->Cell(130,7,$taxrate2."% ".$taxname2,1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$tax2,1,0,'C','1'); $pdf->Ln(); } */ $pdf->Cell(130,7,$_LANG["invoicescredit"],1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$credit,1,0,'C','1'); $pdf->Ln(); $pdf->Cell(130,7,$_LANG["invoicestotal"],1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$total,1,0,'C','1'); $pdf->Ln(); $pdf->Ln(); # Invoice Notes if ($notes) { $pdf->SetFont('Arial','',10); $pdf->SetTextColor(200,200,200); $pdf->MultiCell(170,5,$_LANG["invoicesnotes"].": $notes"); } # Invoice Status $pdf->SetXY(45,90); if ($status=="Cancelled") { $statustext = $_LANG["invoicescancelled"]; $pdf->SetTextColor(162,162,162); } elseif ($status=="Unpaid") { $statustext = $_LANG["invoicesunpaid"]; $pdf->SetTextColor(204,0,0); } elseif ($status=="Paid") { $statustext = $_LANG["invoicespaid"]; $pdf->SetTextColor(51,96,9); } $pdf->SetFont('Arial','B',40); $pdf->Cell(120,20,strtoupper($statustext),0,0,'C'); //Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',; //Page number $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); } # Turn footer page number off $pdf->setPrintFooter(false); ?> i still need to find a way to make a extra page and add my own footer as the coding i have for this does not seem to work and move the company name in line with the invoice to field.
-
i mean the the pdf page is just plain white (blank)
-
this bit of coding in the pdfconfig file turns off the page numbers $pdf->setPrintFooter(false); does anyone know how i get a new page on my pdf so i can but my Terms and Conditions also on the PDF that is sent via email
-
i have read up on the cell command and it is being used but can not seem to get them to link up the coding i am using is # Company Details $pdf->SetFont('Arial','',12); $pdf->Cell(0,6,$companyname,0,1,'R'); $pdf->SetFont('Arial','',10); for ( $i = 0; $i <= 4; $i += 1) { $pdf->Cell(0,4,trim($companyaddress[$i]),0,1,'R'); } # Clients Details $pdf->SetFont('Arial','B',12); $pdf->Cell(0,4,$_LANG["invoicesinvoicedto"],0,1); $pdf->SetFont('Arial','',10); if ($clientsdetails["companyname"]) { $pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L'); $pdf->Cell(0,4,$_LANG["invoicesattn"].": ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } else { $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } $pdf->SetFont('Arial','',10); $pdf->Cell(0,4,$clientsdetails["address1"],0,1,'L'); if ($clientsdetails["address2"]) { $pdf->Cell(0,4,$clientsdetails["address2"],0,1,'L'); } $pdf->Cell(0,4,$clientsdetails["city"].", ".$clientsdetails["state"].", ".$clientsdetails["postcode"],0,1,'L'); $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); $pdf->Ln(10);
