Browse Source

add new in docket list

ifah
Siti Hajar Ibrahim 4 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

@@ -1054,6 +1054,7 @@ class MarketingController extends Controller
$nested_data = array();
$test = 0;

$curr = Carbon::now()->getTimestamp();
foreach ($docket as $a)
{
$i++;
@@ -1063,6 +1064,15 @@ class MarketingController extends Controller
$contractor = Company::where('_id', $a->WorkOrder->contractor_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))
$building=$subDetail->Subscriber->building_name;
else

Loading…
Cancel
Save