- Edited
Hi Guys,
I have found out, to customize the ticket number we need to modify the below mentioned function in class.misc.php:
function randNumber($len=6,$start=false,$end=false) {
mt_srand ((double) microtime() * 1000000);
$start=(!$len && $start)?$start(1,$len,"0",STR_PAD_RIGHT);
$end=(!$len && $end)?$end(9,$len,"9",STR_PAD_RIGHT);
return mt_rand($start,$end);
}
We also need to make some changes in class.ticket.php. I need to get a custom ticket in the format 20111206001, the first four digits are year, next two digits are month, the next two are day and the last three digits are the incrementing digits which increment every time a ticket opens. These three digits reset to 001 as the date changes.