@php use App\Models\Demography; use App\Models\ProgressiveDialler; $studentRegistrationModuleId="f8d9d46f-30c8-41dc-a816-727fd9e058d0"; $AppointmentsModuleId="e62506fb-5247-471b-b575-518a3099b64b"; $CallRecordsModuleId="c7d8d1a7-73c1-8527-2f2d-603ccbe1e9ae"; //echo "
";
	//print_r($results);
//echo "
"; if($ExportToExcel) { $file_type = "vnd.ms-excel"; $file_name= "LeadReport.xls"; header("Content-Type: application/$file_type"); header("Content-Disposition: attachment; filename=$file_name"); $tableClass=""; $border="border=1"; } else { $tableClass="table table-hover table-striped table-bordered table-no-space"; $border="border=1"; } @endphp @if(!$ExportToExcel)
@endif @php $x=0; @endphp @foreach($results as $result) @php $x++; $StudyModuleValues=ProgressiveDialler::GetChildRecord($studentRegistrationModuleId,$ModuleId,$result->LeadId); $AppointmentValues=ProgressiveDialler::GetChildRecord($AppointmentsModuleId,$ModuleId,$result->LeadId); $CallRecordsValues=ProgressiveDialler::GetChildRecord($CallRecordsModuleId,$ModuleId,$result->LeadId); @endphp @endforeach
Slno Branch City First_Name Last_Name Primary_Mobile Email_ID Study_Destination Lead Call Date Study_Level Last_Level_of_Educat Intake Study_Year Appointment_Date Lead_Source Lead_Source_Detail Agent Name Lead Disposition Lead Sub Disposition
{{$x}} {{Demography::GetDisplayValue($ModuleId,"BranchOffice",$result->BranchOffice)}} {{Demography::GetDisplayValue($ModuleId,"PrimaryAddressCity",$result->PrimaryAddressCity)}} {{Demography::GetDisplayValue($ModuleId,"FirstName",$result->FirstName)}} {{Demography::GetDisplayValue($ModuleId,"LastName",$result->LastName)}} {{Demography::GetDisplayValue($ModuleId,"PhoneMobile",$result->PhoneMobile)}} {{Demography::GetDisplayValue($ModuleId,"EmailId",$result->EmailId)}} {{Demography::GetDisplayValue($ModuleId,"StudyDestination",$result->StudyDestination)}} @php try { echo $StartDate=date('Y-m-d',strtotime($result->StartDate)); } catch(\Exception $e){$StartDate="";} @endphp @php try { $StudyLevel=$StudyModuleValues->StudyLevel; } catch(\Exception $e){$StudyLevel="";} @endphp {{Demography::GetDisplayValue($studentRegistrationModuleId,"StudyLevel",$StudyLevel)}} @php try { $LastLevelEducation=$StudyModuleValues->LastLevelEducation; } catch(\Exception $e){$LastLevelEducation="";} @endphp {{Demography::GetDisplayValue($studentRegistrationModuleId,"LastLevelEducation",$LastLevelEducation)}} @php try { $Intake=$StudyModuleValues->Intake; } catch(\Exception $e){$Intake="";} @endphp {{Demography::GetDisplayValue($studentRegistrationModuleId,"Intake",$Intake)}} @php try { $StudyYear=$StudyModuleValues->StudyYear; } catch(\Exception $e){$StudyYear="";} @endphp {{Demography::GetDisplayValue($studentRegistrationModuleId,"StudyYear",$StudyYear)}} @php try { echo date('d-m-Y h:i:s a',strtotime($AppointmentValues->MeetingDateandTime)); } catch(\Exception $e){$MeetingDateandTime="";} @endphp {{Demography::GetDisplayValue($ModuleId,"LeadSource",$result->LeadSource)}} {{Demography::GetDisplayValue($ModuleId,"LeadSourceDetail",$result->LeadSourceDetail)}} @php try { $CreatedBy=$StudyModuleValues->CreatedBy; } catch(\Exception $e){$CreatedBy="";} @endphp {{Demography::GetDisplayValue($studentRegistrationModuleId,"CreatedBy",$CreatedBy)}} {{Demography::GetDisplayValue($ModuleId,"LeadDisposition",$result->LeadDisposition)}} {{Demography::GetDisplayValue($ModuleId,"LeadSubDisposition",$result->LeadSubDisposition)}}
@if($x!=0 && !$ExportToExcel)
@endif @if(!$ExportToExcel)
@endif