| @@ -1219,6 +1219,12 @@ class MarketingController extends Controller | |||
| $var1 = $installer->name; | |||
| } | |||
| if (empty($a->Form->customer_category)) { | |||
| $category = ''; | |||
| } else { | |||
| $category = $a->Form->customer_category; | |||
| } | |||
| if ($a->Form->type_application == "R") { | |||
| $r++; | |||
| @@ -1230,6 +1236,7 @@ class MarketingController extends Controller | |||
| array_push($nested_data, array( | |||
| 'index' => $r . $n1, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo' => $a->wo, | |||
| 'customer_name' => $customer->name, | |||
| 'customer_phone' => $customer->phone1, | |||
| @@ -1256,6 +1263,7 @@ class MarketingController extends Controller | |||
| array_push($nested_data, array( | |||
| 'index' => $b . $n1, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo' => $a->wo, | |||
| 'customer_name' => $customer->name, | |||
| 'customer_phone' => $customer->phone1, | |||
| @@ -1290,6 +1298,11 @@ class MarketingController extends Controller | |||
| $var1 = $installer->name; | |||
| } | |||
| if (empty($a->Form->customer_category)) { | |||
| $category = ''; | |||
| } else { | |||
| $category = $a->Form->customer_category; | |||
| } | |||
| if ($a->Form->type_application == "R") { | |||
| $r++; | |||
| @@ -1301,6 +1314,7 @@ class MarketingController extends Controller | |||
| array_push($nested_data, array( | |||
| 'index' => $r . $n1, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo' => $a->wo, | |||
| 'customer_name' => $customer->name, | |||
| 'customer_phone' => $customer->phone1, | |||
| @@ -1326,6 +1340,7 @@ class MarketingController extends Controller | |||
| array_push($nested_data, array( | |||
| 'index' => $b . $n1, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo' => $a->wo, | |||
| 'customer_name' => $customer->name, | |||
| 'customer_phone' => $customer->phone1, | |||
| @@ -1362,6 +1377,11 @@ class MarketingController extends Controller | |||
| $var1 = $installer->name; | |||
| } | |||
| if (empty($a->Form->customer_category)) { | |||
| $category = ''; | |||
| } else { | |||
| $category = $a->Form->customer_category; | |||
| } | |||
| if ($a->Form->type_application == "R") { | |||
| $r++; | |||
| @@ -1373,6 +1393,7 @@ class MarketingController extends Controller | |||
| array_push($nested_data, array( | |||
| 'index' => $r . $n1, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo' => $a->wo, | |||
| 'customer_name' => $customer->name, | |||
| 'customer_phone' => $customer->phone1, | |||
| @@ -1398,6 +1419,7 @@ class MarketingController extends Controller | |||
| array_push($nested_data, array( | |||
| 'index' => $b . $n1, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo' => $a->wo, | |||
| 'customer_name' => $customer->name, | |||
| 'customer_phone' => $customer->phone1, | |||
| @@ -1433,6 +1455,12 @@ class MarketingController extends Controller | |||
| $var1 = $installer->name; | |||
| } | |||
| if (empty($a->Form->customer_category)) { | |||
| $category = ''; | |||
| } else { | |||
| $category = $a->Form->customer_category; | |||
| } | |||
| if ($a->Form->type_application == "R") { | |||
| $r++; | |||
| @@ -1444,6 +1472,7 @@ class MarketingController extends Controller | |||
| array_push($nested_data, array( | |||
| 'index' => $r . $n1, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo' => $a->wo, | |||
| 'customer_name' => $customer->name, | |||
| 'customer_phone' => $customer->phone1, | |||
| @@ -1469,6 +1498,7 @@ class MarketingController extends Controller | |||
| array_push($nested_data, array( | |||
| 'index' => $b . $n1, | |||
| 'nature_work' => $a->nature_work, | |||
| 'customer_category' => $category, | |||
| 'wo' => $a->wo, | |||
| 'customer_name' => $customer->name, | |||
| 'customer_phone' => $customer->phone1, | |||
| @@ -3789,7 +3819,7 @@ class MarketingController extends Controller | |||
| }], 'Staff')->where('formT', 'B')->where('dealer', $company)->where('activated_my', $month . '/' . $year)->orderBy('activated_dt', 'DESC')->get(); | |||
| } | |||
| } else if ($year != 'null' && $month != 'null' && $app != 'null' && $ptype != 'null') { | |||
| if ($app == 'Residential') { | |||
| $dataClaim = DealerClaim::with(['Subscriber' => function ($q) { | |||
| $q->with('Form'); | |||