| @@ -1078,11 +1078,18 @@ class MarketingController extends Controller | |||
| else | |||
| $building=$subDetail->Subscriber->company_name; | |||
| if (empty($subDetail->customer_category)){ | |||
| $category = ''; | |||
| } else { | |||
| $category = $subDetail->customer_category; | |||
| } | |||
| array_push($nested_data, array( | |||
| 'index' => $n1.$i, | |||
| 'docket_id' => $a->docket_id, | |||
| 'work_order_id' => $a->work_order_id, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'contractor_id' => $contractor->name, | |||
| 'installer_name' => $tempInstaller->StaffDetail->name, | |||
| 'customer_id' => $building, | |||
| @@ -1175,10 +1182,17 @@ class MarketingController extends Controller | |||
| $building = $a->Subscriber->company_name; | |||
| } | |||
| if(empty($a->customer_category)){ | |||
| $category = ''; | |||
| } else { | |||
| $category = $a->customer_category; | |||
| } | |||
| if(!empty($a->Subscriber)){ | |||
| array_push($nested_data, array( | |||
| 'index' => $n1.$i.$a->type_application, | |||
| 'nature_work' => $a->WorkOrder->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo'=>$a->WorkOrder->wo, | |||
| 'customer_name' => $a->Subscriber->name, | |||
| 'customer_phone' => $a->Subscriber->phone1, | |||
| @@ -39,6 +39,7 @@ | |||
| <th>Docket</th> | |||
| <th>W/O</th> | |||
| <th>Nature Work</th> | |||
| <th>Category</th> | |||
| <th>Contractor</th> | |||
| <th>Installer</th> | |||
| <th>Building</th> | |||
| @@ -117,6 +118,7 @@ | |||
| { "data": "docket_id","name": "docket_id"}, | |||
| { "data": "work_order_id","name": "work_order_id"}, | |||
| { "data": "nature_work","name": "nature_work"}, | |||
| { "data": "customer_category", "name": "customer_category"}, | |||
| { "data": "contractor_id","name": "contractor_id"}, | |||
| { "data": "installer_name","name": "installer_name"}, | |||
| { "data": "customer_id", "name": "customer_id"}, | |||
| @@ -37,6 +37,7 @@ | |||
| <tr> | |||
| <th>#</th> | |||
| <th>Service</th> | |||
| <th>Cust. Category</th> | |||
| <th>W/O</th> | |||
| <th>Cust. Name</th> | |||
| <th>Contact No.</th> | |||
| @@ -117,6 +118,7 @@ | |||
| "columns": [ | |||
| { "data": "index","name": "index"}, | |||
| { "data": "nature_work","name": "nature_work"}, | |||
| { "data": "customer_category","name": "customer_category"}, | |||
| { "data": "wo","name": "wo"}, | |||
| { "data": "customer_name","name": "customer_name"}, | |||
| { "data": "customer_phone","name": "customer_phone"}, | |||
| @@ -150,7 +152,7 @@ | |||
| var link = "{{ url('/marketing/work-order/generate-pdf') }}"+"/"+data; | |||
| return '<a href="'+link+'" target="_blank"><b>'+data+'</b></a>'; | |||
| }, | |||
| "targets": 2 | |||
| "targets": 3 | |||
| }, | |||
| ], | |||
| }); | |||