Jump to content


Senior Member
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Danse

  • Rank

Recent Profile Visitors

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

  1. Hey, how can i turn around the first Page in the quotepdf.tpl to have an horizontal view, so: So 297x210 instead of 210x297cm with this command $pdf->AddPage('L', 'A4'); It creates a new horizontal (good) Page, but first Page remains vertical. Any Idea? Edit: i already tried: $pdf->setPageFormat( 'L','A4' ); Error: Error: Call to protected method TCPDF::setPageFormat() from context 'WHMCS\Invoice' in /va EDIT2: I found a way, just use (and first page gets horizontal): $pdf->setPageOrientation('L');
  2. same Problems here .... since a Week, really Annoying, using latest Plesk...
  3. Hi, can someone help me with just a simple Text Sidebar. I need a Hook which inserts a Sidebar to Client Area if i hit a Checkbox in Backend within Client. (Checkbox from Customfields) <?php use WHMCS\View\Menu\Item as MenuItem; // Add Sidebar Panel if Customer didn't signed Document. add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { // IF Customfield is AKTIV then Hide, otherwise show following Sidebar. $client_custom_filed_name = 'av-checkbox'; $clientid = $clientobj->userid; // Get Client Details $clientdata = Capsule::table('tblcustomfieldsvalues') ->select('value') ->join('tblcustomfields', 'tblcustomfields.id', '=', 'tblcustomfieldsvalues.fieldid') ->where('tblcustomfields.fieldname', '=', $client_custom_filed_name) ->where('tblcustomfields.type', '=', 'client') ->where('tblcustomfieldsvalues.relid', '=', $clientid) ->first(); if ($clientdata->value == 'off') { // Add a panel to secondary sidebar $secondarySidebar->addChild('av-contract', array( 'label' => 'CustomTitel', 'uri' => '#', 'icon' => 'fa-file-contract', )) // Retrieve the panel $customPanel = $secondarySidebar->getChild('av-contract'); // Add a Link $customPanel->addChild('av-link', array( 'label' => 'Linkname', 'uri' => '', 'icon' => 'fa-file-contract', )); } }); Any Idea?
  4. HI @brian!, the Problem is - I need to have the three given Overdue Reminders for the Dunning. In Germany you have to warn three Times to cancel Service and or give the whole Situation to an Lawyer. But before i start the Overdue Emails / Warnings / i want to kindly remember Customer for his Payment. I tried to start but obviously i have no clue how to select each Invoice which is overdued and send Emails: use WHMCS\Database\Capsule; if (!defined("WHMCS")) die("Diese Datei kann nicht direkt aufgerufen werden."); add_hook('DailyCronJob', 1, function ($vars) { $messageName = $vars['messagename']; $relid = $vars['relid']; $templateName = "Invoice Payment Reminder"; $intervallDaysafter = 2; // two days after DUE send Reminder Email /* select invoice */ $rows = Capsule::table('tblinvoices')->select('id')->WHERE('userid', '<=', $uid)->where('status', '=', 'Unpaid')->count(); foreach(Capsule::table('tblinvoices')->select('duedate')->WHERE('userid', '=', $uid)->where('status', '=', 'Unpaid')->get() as $unpaidinvoice {$intervallDaysafter}DAY <= NOW()) { // Send Payment Reminder for Each Invoice which is unpaid. Example: Due Date is 01.01.2018 - send Payment Reminder Email ($intervallDaysafter) two days after 01 Januar 2018 } else (empty($rows)) { // IF no Unpaid - stop return; } });
  5. Hi, does anyone has an Hook or Kindly can write a Hook which sends the Payment Reminder Email once AFTER the Due Date? Not before - as like WHMCS Function? Its not friendly in my Opinion to send some reminder BEFORE Due Date.
  6. Hi, are there some tipps to get this correct as possible? Backwards calculation is probably not working that good? We good messed up with this Function.
  7. Hi, we have Customers with several recurring Products which was ordered each on other Days. is there a smooth Option or "How To" to set Invoices all to 1th of Month to have automatically WHMCS creates ONE Invoice instead of TEN Invoices each Month? It must be easy without Fails. We can't change Dates and Calculate Manually the difference Amount of that. Hope you understand as i can't explain that good in english. Any Ideas?
  8. HI, i have following Problem: We use WHMCS Plesk provisioning and or PleskExtend from ModulesGarden (which somehow and i really don't understand why, is build on top off WHMCS Plesk Module) and we have a Problem: 1. New Customer orders a Webspace & Domain. The Webspace gets provisioned first - then the Domain Details should be send over to external Registrar (Domain Module we already have). 2. Which IP will be used for the Domain Records? We want to send over the right ip from our Plesk Server - this is my Question: Which field out from Database to you use? Does someone has some Domain Module template for sending over the IPv4 for Plesk to Domain Registrar? While the Domain Registrar Module atm pulls Data out from "tblhosting > dedicatedip" which usually filled in by the Provisionig Module. My Partner uses this for long time, but my tblhosting dedicated and assignedip Columns (in Database) are empty. Any Ideas?
  9. oh this would be really awesome. I was just searching for this Widget.
  10. Hi, I'm using Integrator 3 from GOHigherIS and the tool InTouch. depending on the Group the Sites run under a Connection. I wanted to ask, if someone could provide a hook wich pulls the Connection out from ... Customer and that i can use the output in Email Template. For example: Customer 1 is assigned to Group "Company 1" and the Company1 has the ID 4 Customer 2 is assigned to Group "Company 2" and the Company1 has the ID 5 i need a Email Shortcode i.e. {connection_id} which is replaced with "&_v=4" or "&_v=5" <--- This little tag added to a link, sets the right Design for Customer if he clicks on the Link. So a hook file to return the correct URL based on the $_SESSION['_v'] variable. But i have no clue how to start a Hook file... Any Help would be awesome. Maybe it would be better to assign a custom Field into every customer and the insert the correct ID of Connection. Because "$Session" sounds like the customer has to be logged in? But Emails would be generated over Night, for Invoices. And he shall open Invoices with Link: domain.de/viewinvoice.php?id=xxxx&_v=4
  11. Haha, they told me to write it down here ... ;-)
  12. Hi, in Germany in some legal Form it's indispensable to charge VAT. In this case it has to be 19%. This is working Fine. Customers can add Credit to their Accounts and wont be charged with VAT cause its Credit. You dont charge Credit in Germany. So when it comes to Pay a valid Invoice (with VAT in my case) and customer choose to pay with Credit, VAT disappears. Thats terrible. My Question: Is there a little Hook to prevent that? I like this "Add Credit to Invoice" Design and a lot of Customers uses this. i.e. i uploaded three Screenshots to clarify my Problem Any help on this would be awesome, since i can't just turn off Credit/ FUND System cause Customers are already using this.
  13. Hi there, I'm new to WHMCS and i need a custom CSV export for my Billing / Booking System. I have some Problems with exports. 1. The GOAL CSV would be this on: - Removed - 2. The Screenshots show actually development (low success) My current attempt is as following: <?php # Report Table of Data Column Headings - should be an array of values $reportdata["tableheadings"] = array("Satzart","Kundennummer","Firma Nr","Rechnungsdatum","Rechnungsnummer","Nettobetrag voller Umsatzsteuersatz","Steuer zum vollen Umsatzsteuersatz","Nettobetrag halber Umsatzsteuersatz","Steuer zum halben Umsatzsteuersatz","Umsätze innergemeinschaftliche Lieferung","Umsätze Export","Sonstige Umsätze: Konto Nr.","Sonstige Umsätze: Betrag","Währung (ISO-Codes)","Gegenkonto","Rechnungsart","Belegtext","Zahlungsbedingung","KontoVoll","KontoHalb","KontoEU","KontoExport","Storno","Schlussrechnung","Erl_sart","System","Verrechnen","Kostenstelle","Lastschrift-Ausführung am"); # Report Table Values - one of these lines for each row you want in the table # should be an array of values to match the column headings #$reportdata["tablevalues"][] = array("CMXUMS","User ID","1","date"=>"Creation Date","invoicenum"=>"Invoice Number","subtotal"=>"Subtotal","","","","","","","","","","","clientname"=>"Client Name","paymentmethod"=>"Payment Method","","","","","","","","","","",""); if (!defined("WHMCS")) die("This file cannot be accessed directly"); # PUNKT1 <---- $filterfields = array("CMXUMS","User ID","1","date"=>"Creation Date","invoicenum"=>"Invoice Number","subtotal"=>"Subtotal","","","","","","","","","","","clientname"=>"Client Name","paymentmethod"=>"Payment Method","","","","","","","","","","",""); #$reportdata["description"] = $reportdata["headertext"] = ''; $incfields = $whmcs->get_req_var('incfields'); $filterfield = $whmcs->get_req_var('filterfield'); $filtertype = $whmcs->get_req_var('filtertype'); $filterq = $whmcs->get_req_var('filterq'); if (!is_array($incfields)) $incfields = array(); if (!is_array($filterfield)) $filterfield = array(); if (!is_array($filtertype)) $filtertype = array(); if (!is_array($filterq)) $filterq = array(); if (!$print) { $reportdata["description"] = "This report can be used to generate a custom export of invoices by applying up to 5 filters. CSV Export is available via the download link at the bottom of the page."; $reportdata["headertext"] = '<form method="post" action="reports.php?report='.$report.'"> <table class="form" width="100%" border="0" cellspacing="2" cellpadding="3"> <tr><td width="20%" class="fieldlabel">Fields to Include</td><td class="fieldarea"><table width="100%"><tr>'; $i=0; foreach ($filterfields AS $k=>$v) { $reportdata["headertext"] .= '<td width="20%"><input type="checkbox" name="incfields[]" value="'.$k.'" id="fd'.$k.'"'; if (in_array($k,$incfields)) $reportdata["headertext"] .= ' checked'; $reportdata["headertext"] .= ' /> <label for="fd'.$k.'">'.$v.'</label></td>'; $i++; if (($i%5)==0) $reportdata["headertext"] .= '</tr><tr>'; } $reportdata["headertext"] .= '</tr></table></td></tr>'; for ( $i = 1; $i <= 5; $i ++ ) { $reportdata["headertext"] .= '<tr><td width="20%" class="fieldlabel">Filter '.$i.'</td><td class="fieldarea"><select name="filterfield['.$i.']"><option value="">None</option>'; foreach ($filterfields AS $k=>$v) { $reportdata["headertext"] .= '<option value="'.$k.'"'; if (isset($filterfield[$i]) && $filterfield[$i]==$k) $reportdata["headertext"] .= ' selected'; $reportdata["headertext"] .= '>'.$v.'</option>'; } $reportdata["headertext"] .= '</select> <select name="filtertype['.$i.']"><option>Exact Match</option><option value="like"'; if (isset($filtertype[$i]) && $filtertype[$i]=="like") $reportdata["headertext"] .= ' selected'; $reportdata["headertext"] .= '>Containing</option></select> <input type="text" name="filterq['.$i.']" size="30" value="'.(isset($filterq[$i])?$filterq[$i]:'').'" /></td></tr>'; } $reportdata["headertext"] .= '</table> <p align="center"><input type="submit" value="Filter" /></p> </form>'; } if (count($incfields)) { $filters = array(); foreach ($filterfield as $i => $val) { if ($val && array_key_exists($val, $filterfields)) { if ($val == 'clientname') { $val = "(SELECT CONCAT(firstname,' ',lastname) FROM tblclients WHERE id=tblinvoices.userid)"; } $filters[] = ($filtertype[$i]=="like") ? $val . " LIKE '%" . db_escape_string($filterq[$i]) . "%'" : $val . "='" . db_escape_string($filterq[$i]) . "'"; } } # HIER IST DAS PROBLEMKIND. Der haut mir für Tabellen die er nicht kennt (logisch die sind ja auch von Collmex die Überschriften) zahlen rein. # Der soll aber das reinhauen was ich will. Das sind immer die gleichen Werte. # Wenn also OBEN bei "PUNKT1" das hier in der VAR drin ist "CMXUMS" dann soll er auch in der ersten Spalte fortlaufend für jede Rechnung CMXUMS eintragen. Aktuell wird überall 0 eingetragen $fieldlist = array(); foreach ($incfields AS $fieldname) { if (array_key_exists($fieldname,$filterfields)) { if ($fieldname=="clientname") $fieldname = "(SELECT CONCAT(firstname,' ',lastname) FROM tblclients WHERE id=tblinvoices.userid)"; $fieldlist[] = $fieldname; } } $result = select_query("tblinvoices", implode(',', $fieldlist), implode(' AND ', $filters)); while ($data = mysql_fetch_assoc($result)) { if (isset($data['paymentmethod'])) $data['paymentmethod'] = $gateways->getDisplayName($data['paymentmethod']); $reportdata["tablevalues"][] = $data; } } ?> <script language="JavaScript"> function selectAll(source) { checkboxes = document.getElementsByName('incfields[]'); for(var i in checkboxes) checkboxes[i].checked = source.checked; } </script> <input type="checkbox" id="selectall" onClick="selectAll(this)" /> Any help i would appreciate. Main Problem: - I cant get the most colums stay empty. - The Date should be different. - customers Numbers wont show up - Javascript is also showing up in CSV .... Thank you.
  • 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