Jump to content

Synister

Member
  • Posts

    27
  • Joined

  • Last visited

About Synister

Recent Profile Visitors

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

Synister's Achievements

Junior Member

Junior Member (1/3)

2

Reputation

  1. How would I add the Service ID to the Invoice Created and Credit Card Invoice Created Templates?
  2. I'm completely clueless on how to do this.
  3. Im wanting it in the HTML invoice and PDF Invoice. Either the Service username or Service ID. Service ID would probably be better and more secure since it does not show any part of the login info. Kind of like in the attached image,
  4. Is there a way to include the Service Username on the invoice? This would help clients who have multiple services know which one they are renewing.
  5. Thanks Brian. I couldn't remember where I got it Just know it works
  6. I use this and it works fine. <?php use WHMCS\Database\Capsule; add_hook('PreModuleTerminate', 1, function($vars) { $invoices = Capsule::table('tblinvoiceitems') ->where('relid', $vars['params']['serviceid']) ->where('type', '!=', 'GroupDiscount') ->get(); logActivity('Auto Cancel Invoice: Starting...'); foreach($invoices as $key){ $invoiceIDs = Capsule::table('tblinvoices') ->where('id', $key->invoiceid) ->where('status', 'Unpaid') ->value('id'); $invoiceLine = Capsule::table('tblinvoiceitems') ->where('invoiceid', $invoiceIDs) ->where('relid', $vars['params']['serviceid']) ->value('id'); $invoiceLines = Capsule::table('tblinvoiceitems') ->where('invoiceid', $invoiceIDs) ->get(); $description = Capsule::table('tblinvoiceitems') ->where('relid', $vars['params']['serviceid']) ->where('invoiceid', $invoiceIDs) ->value('description'); $discountLine = Capsule::table('tblinvoiceitems') ->where('invoiceid', $invoiceIDs) ->where('type', 'GroupDiscount') ->where('description', 'like', '% '.$description.'%') ->value('id'); if($invoiceIDs){ logActivity('Auto Cancel Invoice: Invoice ' . $invoiceIDs . ' has had a line removed. This invoice previously had ' . count($invoiceLines) . ' lines.'); if(count($invoiceLines) > 1){ $command = 'UpdateInvoice'; $postData = array( 'invoiceid' => $invoiceIDs, 'deletelineids' => array($invoiceLine), ); $results = localAPI($command, $postData); }elseif(count($invoiceLines) == 1){ logActivity('Auto Cancel Invoice: Invoice ' . $invoiceIDs . ' has been cancelled because the product was terminated.'); $command = 'UpdateInvoice'; $postData = array( 'invoiceid' => $invoiceIDs, 'status' => 'Cancelled', ); $results = localAPI($command, $postData); } if(count($invoiceLines) <= 2 && Capsule::table('tblinvoiceitems')->where('invoiceid', $invoiceIDs)->where('type', 'LateFee')->get()){ logActivity('Auto Cancel Invoice: Invoice ' . $invoiceIDs . ' has been cancelled because the only line was a Late Fee.'); $command = 'UpdateInvoice'; $postData = array( 'invoiceid' => $invoiceIDs, 'status' => 'Cancelled', ); $results = localAPI($command, $postData); } if($discountLine){ logActivity('Auto Cancel Invoice: Invoice ' . $invoiceIDs . ' had a Group Discount. This has been removed.'); $command = 'UpdateInvoice'; $postData = array( 'invoiceid' => $invoiceIDs, 'deletelineids' => array($discountLine), ); $results = localAPI($command, $postData); } } } });
  7. Thank brian! your a superstar. Ive learned a lot just from reading your replies to topics.
  8. Ok I think I got it <body oncopy="return false" oncut="return false" onpaste="return false">
  9. NO Im not using the Cpanel Overview.tpl Im using a custom provisioning module at this time.
  10. What Im actually trying to do is prevent clients from copy/paste their username/password into the ticket area. So maybe just way to prevent in on the overview.tpl file would work, since currently that is the only place the username and password are visible. I get tickets where clients say their username/password do not work. But then they copy and paste it into the ticket which allows them to send the correct username and password. However that is not the username and password they are typing. Usually happens when the username or password contains " Il0O" in them. I want to prevent them from being able to copy/paste it when then would require them to type it and then my staff could see the exact error they are doing when typing their username and password. It might not be a good idea to limit the ticket area due to there may be a error or something they would need to copy/paste in the future.
  11. Is there a way to prevent a client from Copy and Pasting when submitting a Ticket or replying?
  12. Today while testing this a little further I noticed this. If Client has never ordered any products the Panel does not show. If Client has and Products (Active/Canceled/ Terminated) The panel shows. How can I get it to only show if a client has a product that is active?
×
×
  • 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