| $nested_data = array(); | $nested_data = array(); | ||||
| $test = 0; | $test = 0; | ||||
| $curr = Carbon::now()->getTimestamp(); | |||||
| foreach ($docket as $a) | foreach ($docket as $a) | ||||
| { | { | ||||
| $i++; | $i++; | ||||
| $contractor = Company::where('_id', $a->WorkOrder->contractor_id)->first(); | $contractor = Company::where('_id', $a->WorkOrder->contractor_id)->first(); | ||||
| $tempInstaller = Staff::with('StaffDetail')->withTrashed()->where('_id',$a->installer_id)->first(); | $tempInstaller = Staff::with('StaffDetail')->withTrashed()->where('_id',$a->installer_id)->first(); | ||||
| $reg_time = $a->created_at; | |||||
| $expiry_date = $reg_time->addDays(3); | |||||
| $expiry_date = $expiry_date->getTimestamp(); | |||||
| $n1=""; | |||||
| if($curr < $expiry_date) { | |||||
| $n1 = "New/"; | |||||
| } | |||||
| if(!empty($subDetail->Subscriber->building_name)) | if(!empty($subDetail->Subscriber->building_name)) | ||||
| $building=$subDetail->Subscriber->building_name; | $building=$subDetail->Subscriber->building_name; | ||||
| else | else |