Jump to content

fepixie

Member
  • Posts

    10
  • Joined

  • Last visited

About fepixie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

fepixie's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. lol - glad you know now - maybe matt/developers will figure it too - there are a few of these type validation errors about...
  2. very nice - just what i was after - thanks all I've just made a couple of small tweaks... - the date back in d/m/y format - the date selectors wont conk out after 2010 now (was hard coded as max 2010) <?php if ($startday=="") { $startday=date("d"); $startmonth=date("m"); $startyear=date("Y"); $endday=date("d"); $endmonth=date("m"); $endyear=date("Y"); } $pmonth = str_pad($month, 2, "0", STR_PAD_LEFT); $reportdata["title"] = "Invoice details for $startday/$startmonth/$startyear - $endday/$endmonth/$endyear"; $reportdata["description"] = "Invoices Per Period"; $reportdata["headertext"] = "<form method=\"post\" action=\"$PHP_SELF?report=$report&calculate=true\"><center>Start Date: "; $reportdata["headertext"] .= "<select name=\"startday\">"; for ( $counter = 1; $counter <= 31; $counter += 1) { $reportdata["headertext"] .= "<option"; if ($counter==$startday) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> <select name=\"startmonth\">"; for ( $counter = 1; $counter <= 12; $counter += 1) { $reportdata["headertext"] .= "<option"; if ($counter==$startmonth) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $currentyear=date("Y"); $reportdata["headertext"] .= "</select> <select name=\"startyear\">"; for ( $counter = 2006; $counter <= $currentyear+1; $counter++) { $reportdata["headertext"] .= "<option"; if ($counter==$startyear) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> End Date: "; $reportdata["headertext"] .= "<select name=\"endday\">"; for ( $counter = 1; $counter <= 31; $counter += 1) { $reportdata["headertext"] .= "<option"; if ($counter==$endday) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> <select name=\"endmonth\">"; for ( $counter = 1; $counter <= 12; $counter += 1) { $reportdata["headertext"] .= "<option"; if ($counter==$endmonth) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> <select name=\"endyear\">"; for ( $counter = 2006; $counter <= $currentyear+1; $counter++) { $reportdata["headertext"] .= "<option"; if ($counter==$endyear) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> <input type=\"submit\" value=\"Generate Report\"></form>"; $startday = str_pad($startday,2,"0",STR_PAD_LEFT); $startmonth = str_pad($startmonth,2,"0",STR_PAD_LEFT); $endday = str_pad($endday,2,"0",STR_PAD_LEFT); $endmonth = str_pad($endmonth,2,"0",STR_PAD_LEFT); $startdate = $startyear.$startmonth.$startday; $enddate = $endyear.$endmonth.$endday; $enddate = $enddate."235959"; $query = "SELECT `tblinvoices`.*, CONCAT(`tblclients`.`firstname`, ' ', `tblclients`.`lastname`) AS 'fullname' FROM `tblinvoices`, `tblclients` WHERE `tblinvoices`.`date` >='$startdate' AND `tblinvoices`.`date` <='$enddate' AND `tblclients`.`id` = `tblinvoices`.`userid` ORDER BY `tblinvoices`.`id` ASC"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); while ($data = mysql_fetch_array($result)) { $id = "<a href=\"invoices.php?action=edit&id=". $data["id"] ."\" target=\"_blank\"\">". $data["id"] ."</a>"; $client = "<a href=\"clientssummary.php?userid=". $data['userid'] ."\" target=\"_blank\"\">" . $data['fullname'] . "</a>"; $amount = $CONFIG["CurrencySymbol"].$data["total"]; $date = fromMySQLDate($data['date']); $duedate = fromMySQLDate($data['duedate']); $datepaid = fromMySQLDate($data['datepaid']); $status = $data['status']; $colour = "<span style='color:"; switch($status) { case "Paid": $colour .= "green"; $grandtotal += $data['total']; break; case "Unpaid": $colour .= "darkred"; $grandtotal += $data['total']; break; case "Cancelled": $colour .= "lightgrey"; break; } $colour .= ";'>"; $reportdata["tableheadings"] = array("Invoice ID","Invoice Date","Invoice Due Date","Client","Status","Amount","Date Paid"); $reportdata["tablevalues"][] = array($id,$date,$duedate,$client,$colour . $status . "</span>",$colour . $amount . "</span>",$colour . $datepaid . "</span>"); } $reportdata["headertext"] .= "<p>Total number of Invoices: $num_rows</p>"; $reportdata["headertext"] .= "<p>Total: ".$CONFIG["CurrencySymbol"]." $grandtotal</p>"; $data['footertext'] = "<p style=\"text-align:center\"><span style=\"font-size:2em; margin:10px auto; font-weight:bold;\">Total: ".$CONFIG["CurrencySymbol"] . $grandtotal . "</span><table width=90% align=center><tr><td>"; $data["footertext"].="</td></tr></table>"; ?>
  3. hmmm - i tired that one - but it don't seem to work for me still.... any other ideas? they all go but the description one... also - for validation - add type="text/javascript" to each <script> tag and perhaps its worth mentioning that the <style> bit for the table should go to page <head> or at least not inside another element if possible then they validate - script too - very nice - apart from the description no go error.... ??
  4. I had trouble figuring this out for a bit - theres not much helpful help here i could find - so here's a hack for anyone who needs it... this is from the "portal" template set version Version: 4.3.1 (will update if it changes for .2 after i get round to downloading it) - no idea if the other templates are the same - havent looked.... the idea is to shrink and move up the status message - and add custom text below it... edit [WHMCS Directory]/templates/portal/invoicepdf.tpl or the corresponding file in your custom template directory moving up the status message a bit... FIND (line 107) $pdf->SetXY(70,90); CHANGE TO $pdf->SetXY(80,85); shrinking the status message... FIND (line 124) $pdf->SetFont('helvetica','B',40); CHANGE TO $pdf->SetFont('helvetica','B',16); or any size you like adding the custom info... FIND (next line) $pdf->Cell(120,20,strtoupper($statustext),0,0,'C'); AFTER ADD # -------------------- CUSTOM DETAILS; $pdf->SetXY(80,100); $pdf->SetTextColor(0,0,0); $pdf->SetFont('helvetica','',; $txt = "Custom info: goes here"; $txt .= "\nAccounts Email: accounts@yoursite.co.nz"; $txt .= "\nWebsite: www.3rings.co.nz"; $pdf->MultiCell(120, 5, $txt."\n", 0, 'C', 0, 0, '' ,'', true); and edit the $txt lines to say whatever you like - the \n goes where you want a line break save and upload Hopefully that will save someone else half a day figuring it out
  5. err - wrapping the code supplied in a paragraph will not fix the code errors - i have also noticed the missing close tags on the Integration Code supplied *rolls eyes* <form method="post" action="http://www.domain.co.nz/support/dologin.php"> <input type="hidden" name="token" value="63c654654654649e2558e519e5f79b59be" /> Email Address: <input type="text" name="username" size="50"><br> Password: <input type="password" name="password" size="20"><br> <input type="submit" value="Login"> </form> is supplied - the last 3 <input> tags need a closing / - and so do the <br /> tags same problem in the other integration forms supplied for anyone else having validation problems the input tags should look like... Password: <input type="password" name="password" size="20" /><br />
  6. Are you censoring complaints then? i see a new member with 2 posts has had their posts approved - but my post with a complaint a couple of days ago i've not heard a word about - i guess you must have decided to ban complaints?
×
×
  • 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