Browse Source

add new in docket list

ifah
Siti Hajar Ibrahim 5 years ago
parent
commit
948cbeac45
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      app/Http/Controllers/DS/MarketingController.php

+ 10
- 0
app/Http/Controllers/DS/MarketingController.php View File

$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

Loading…
Cancel
Save