@php
$file_type = "vnd.ms-excel";
$file_name= "ExportData.xls";
header("Content-Type: application/$file_type");
header("Content-Disposition: attachment; filename=$file_name");
$TicketStatusDemoId='8d8e0cfd-f258-403f-9e99-b1c984a2536e';
$TicketSubTypeDemoId='33951c92-9e1d-4ceb-99b0-71bcb4b7abbd';
$TicketTypeDemoId='b0e5c84d-2eca-4b2f-9dbd-28ac7a2200e9';
$StatusNameId=$GetModuleDropdownDet[$TicketStatusDemoId];
$SubTypeNameId=$GetModuleDropdownDet[$TicketSubTypeDemoId];
$TypeNameId=$GetModuleDropdownDet[$TicketTypeDemoId];
$TypeArray=array();
$StatusArray=array();
$SubTypeArray=array();
$TypeArray=$GetDropdownLists[$TypeNameId];
$StatusArray=$GetDropdownLists[$StatusNameId];
$SubTypeArray=$GetDropdownLists[$SubTypeNameId];
echo "
";
// print_r($TypeArray);
// print_r($SubTypeArray);
echo "
";
$i=0;
@endphp
| S.No |
Ticket Number |
Status |
Ticket Start Time |
Ticket Closed Time |
Total Turn AroundTime |
Ticket Closed By |
First Response Time |
Ticket Type |
Ticket Sub Type |
Emails InBound count |
Emails OutBound count |
InBound & OutBound count |
@foreach($ClosedTicketReportResult as $EachRecord)
@php
$i++;
$TicketNumber=$EachRecord->TicketNumber;
$TicketId=$EachRecord->TicketId;
$CreatedDate=$EachRecord->CreatedDate;
$DisplayCreatedDate=date('d-m-Y h:i a',strtotime("$CreatedDate"));
$UpdatedBy=$EachRecord->UpdatedBy;
$TicketName=$EachRecord->TicketName;
$TicketType=$EachRecord->TicketType;
$TicketSubType=$EachRecord->TicketSubType;
$Status=$EachRecord->Status;
$DisplayStatusValue='';
$DisplayTypeValue='';
$DisplaySubTypeValue='';
if(array_key_exists($Status,$StatusArray))
{
$DisplayStatusValue=$StatusArray[$Status];
}
if(array_key_exists($TicketType,$TypeArray))
{
$DisplayTypeValue=$TypeArray[$TicketType];
}
if(array_key_exists($TicketSubType,$SubTypeArray))
{
$DisplaySubTypeValue=$SubTypeArray[$TicketSubType];
}
$statumodifieddate=$EachRecord->statumodifieddate;
$statumodifiedDate=date('d-m-Y h:i a',strtotime("$statumodifieddate"));
$FirstResponseTime=$EachRecord->FirstResponseTime;
// $starttimestamp = strtotime($CreatedDate);
// $endtimestamp = strtotime($statumodifieddate);
// $difference = abs($endtimestamp - $starttimestamp)/3600;
//$hourdiff = round((strtotime($statumodifieddate) - strtotime($CreatedDate))/3600, 1);
$datetime1 = new DateTime($CreatedDate);
$datetime2 = new DateTime($statumodifieddate);
$interval = $datetime1->diff($datetime2);
$abc=$interval->format('%h')." Hr ".$interval->format('%i')." Min";
$pass_array=array("ModuleId"=>'806867ab-96a5-11eb-948a-56b1773fd56f',"RowId"=>$TicketId);
$emailsBothCount=$EmailsList[$TicketId]['both'];
$emailsInboundCount=$EmailsList[$TicketId]['inbound'];
$emailsOutBoundCount=$EmailsList[$TicketId]['outbound'];
@endphp
| {{$i}} |
{{$TicketNumber}}
|
{{$DisplayStatusValue}} |
{{$DisplayCreatedDate}} |
{{$statumodifiedDate}} |
{{$abc}} |
{{$UpdatedBy}} |
{{$FirstResponseTime}} |
{{$DisplayTypeValue}} |
{{$DisplaySubTypeValue}} |
{{$emailsInboundCount}} |
{{$emailsOutBoundCount}} |
{{$emailsBothCount}} |
@endforeach