Community Forum

If you have questions about my software, chances are this forum has the answers.

You'll need to register before you can post on the forum to ask your question or to answer another one. A reply will be posted to each and every question that is asked so there is no need to double post or bump your post. I do my best to answer promptly but in some cases it may take a day or two. If you bump your post, it may be removed. Bear with me and I`ll get your question answered quickly.

Here are a few tips to help you to get your questions answered more rapidly.

IMPORTANT: Posts in English only. I don't have a translator and I'll be unable to understand your message properly and will probably delete it.
SEARCH: Use the search option to see if your question has been answered on the forum before now or if there is an answer in the documentation of your software.
PERSONAL SUPPORT: If you have purchased a commercial version of any software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
LINKS: Any links posted are not clickable and must be copied / pasted into your browser address bar.

You are not logged in.

#1 IamKangy 22-04-2020 01:11:42

I am using the Random ticket numbers for my submitted tickets. I am wanting to know if this is possible to do.

In front of the random ticket number is it possible to add: HWS-

So the ticket would show as - HWS-[Random Ticket Number Here]

The HWS is the abbrev. of my business and our management team have been discussing if it might be possible for us to do this. So everything else we use has HWS- at the front at of it.

Thank you. smile

#2 msworld 23-04-2020 03:05:43

Yes, this should be fairly easy to accomplish. smile

Open the 'control/functions.php' file and scroll down to the 'mswRandTicket' function. Change to:

function mswRandTicket($id) {
  $cn = (6 - strlen($id));
  return 'HWS-' . substr(time(), -2) . mt_rand(111, 999) . '-' . ($cn > 0 ? substr(sha1($id . time()), 0, $cn) . $id : $id);
}

If you want to update existing tickets in the database, run the following (backup first, just in case):

update `msp_tickets` set `tickno` = concat('HWS-',`tickno`);

I can add a prefix option for random tickets in the next version, no problem. smile

#3 IamKangy 23-04-2020 03:42:58

Thank you David smile

#4 IamKangy 23-04-2020 03:50:24

Also ran the SQL command and changed all previous and current tickets with no problems at all. Worked like a charm. Thanks again smile

#5 msworld 23-04-2020 13:45:42

You are welcome, glad it worked ok. smile

Board footer

Maian Script World - Free PHP Software for Personal or Business Use.
© 2003-2020 Maian Script World & David Ian Bennett.

2Checkout.com is an authorized reseller of goods and services provided by Maian Script World

Free PHP Software / Responsive PHP Scripts / Lightweight PHP Software / White Label PHP Software