Jump to content

consul

Member
  • Posts

    8
  • Joined

  • Last visited

About consul

consul's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Dear all! Currently my configuration for Sequential Invoice Number Format form is: {YEAR}-{NUMBER} and this generate as first invoice the number 2018-1 If I wanted to get the number 2018-00001 , which setting should I use? Thank you! Best, Giorgio
  2. Dear all, I'm trying to write a hook to change the description field of tblinvoiceitems table: <?php use Illuminate\Database\Capsule\Manager as Capsule; add_hook("InvoiceCreationPreEmail", 1, function($vars) { $invoiceid = $vars['invoiceid']; //get invoice line items from DB $result = Capsule::table('tblinvoiceitems')->where([ ['invoiceid', '=', $invoiceid], ['type', 'like', 'Domain%'], ])->get(); $itemid = $result[0]->id; $clientid = $result[0]->userid; $description = $result[0]->description; $domainid = $result[0]->relid; foreach ($itemid as $itemid) { Capsule::table('tblinvoiceitems')->where('id',$itemid)->update("description" => $description ." - ". $domainid); } }); But it's return this error: Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /includes/hooks/invoicedescriptionedit.php on line 20 Please, you can help me to understand the error? Thank you!
  3. I solved with a reference to generic "ClientAreaPage" Regards.
  4. Ok, I have tried this hook: <?php add_hook("ShoppingCartValidateDomainsConfig", 1, function refclient_hook($vars) { $refclient = $vars['RefClient']; $return = array("refclient" => $refclient); return $return; }); But it's not work properly... How can I retrieve the variable values "$refclient" sent by form "<form method="post" action="{$smarty.server.PHP_SELF}?a=confdomains" id="frmConfigureDomains">" ? Thank you!
  5. Dear all, which they are the operations type for a domain? It is possible to execute different instructions for each of these types? Thank you.
  6. Dear all, I must to create a hook for /cart.php?a=checkout page, but I do not understand what the correct hook category. You can help me? Thank you!
  7. Hi all, I'm trying to create a hook to add the name of the registrant of a domain in the description of the invoice, so as to obtain a description of this type: Domain Registration - domainame.com - 1 Year/s (19/08/2016 - 18/08/2017) - ACME Ltd <?php function invoice_domain_registrant($vars) { $result = full_query("SELECT id, description, (SELECT (SELECT tblcontacts.companyname FROM tblcontacts WHERE id = tblorders.contactid) FROM tblorders WHERE userid ='".$vars['userid']."' AND invoiceid='".$vars['invoiceid']."') AS registrant FROM tblinvoiceitems WHERE invoiceid='".$vars['invoiceid']."'"); while($data = mysql_fetch_array ($result)) if($data['registrant'] !== NULL) // Add Company Name of contact of client update_query("tblinvoiceitems", array("description" => $data['description']." - ".$data['registrant']), array("id" => $data['id'])); } else { $result = full_query("SELECT id, description, (SELECT (SELECT tblclients.companyname FROM tblclients WHERE id = tblorders.userid) FROM tblorders WHERE userid ='".$vars['userid']."' AND invoiceid='".$vars['invoiceid']."') AS registrant FROM tblinvoiceitems WHERE invoiceid='".$vars['invoiceid']."'"); while($data = mysql_fetch_array ($result)) if($data['registrant'] !== NULL) // Add Company Name of client update_query("tblinvoiceitems", array("description" => $data['description']." - ".$data['registrant']), array("id" => $data['id'])); } add_hook("InvoiceCreationPreEmail", 1, "invoice_domain_registrant"); I do not understand what is the error, but the description does not change... Thank you.
  8. Hi, I am a new user and I am considering whether to adopt WHMCS as a solution for some of my clients. The fundamental question is whether it is possible to issue invoices in different currencies (EUR and GBP) for the same customer. 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