|
|
|
|
|
|
|
|
$var1 = $installer->name; |
|
|
$var1 = $installer->name; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (empty($a->Form->customer_category)) { |
|
|
|
|
|
$category = ''; |
|
|
|
|
|
} else { |
|
|
|
|
|
$category = $a->Form->customer_category; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($a->Form->type_application == "R") { |
|
|
if ($a->Form->type_application == "R") { |
|
|
$r++; |
|
|
$r++; |
|
|
|
|
|
|
|
|
array_push($nested_data, array( |
|
|
array_push($nested_data, array( |
|
|
'index' => $r . $n1, |
|
|
'index' => $r . $n1, |
|
|
'nature_work' => $a->nature_work, |
|
|
'nature_work' => $a->nature_work, |
|
|
|
|
|
'customer_category' => $category, |
|
|
'wo' => $a->wo, |
|
|
'wo' => $a->wo, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_phone' => $customer->phone1, |
|
|
'customer_phone' => $customer->phone1, |
|
|
|
|
|
|
|
|
array_push($nested_data, array( |
|
|
array_push($nested_data, array( |
|
|
'index' => $b . $n1, |
|
|
'index' => $b . $n1, |
|
|
'nature_work' => $a->nature_work, |
|
|
'nature_work' => $a->nature_work, |
|
|
|
|
|
'customer_category' => $category, |
|
|
'wo' => $a->wo, |
|
|
'wo' => $a->wo, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_phone' => $customer->phone1, |
|
|
'customer_phone' => $customer->phone1, |
|
|
|
|
|
|
|
|
$var1 = $installer->name; |
|
|
$var1 = $installer->name; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (empty($a->Form->customer_category)) { |
|
|
|
|
|
$category = ''; |
|
|
|
|
|
} else { |
|
|
|
|
|
$category = $a->Form->customer_category; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ($a->Form->type_application == "R") { |
|
|
if ($a->Form->type_application == "R") { |
|
|
$r++; |
|
|
$r++; |
|
|
|
|
|
|
|
|
array_push($nested_data, array( |
|
|
array_push($nested_data, array( |
|
|
'index' => $r . $n1, |
|
|
'index' => $r . $n1, |
|
|
'nature_work' => $a->nature_work, |
|
|
'nature_work' => $a->nature_work, |
|
|
|
|
|
'customer_category' => $category, |
|
|
'wo' => $a->wo, |
|
|
'wo' => $a->wo, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_phone' => $customer->phone1, |
|
|
'customer_phone' => $customer->phone1, |
|
|
|
|
|
|
|
|
array_push($nested_data, array( |
|
|
array_push($nested_data, array( |
|
|
'index' => $b . $n1, |
|
|
'index' => $b . $n1, |
|
|
'nature_work' => $a->nature_work, |
|
|
'nature_work' => $a->nature_work, |
|
|
|
|
|
'customer_category' => $category, |
|
|
'wo' => $a->wo, |
|
|
'wo' => $a->wo, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_phone' => $customer->phone1, |
|
|
'customer_phone' => $customer->phone1, |
|
|
|
|
|
|
|
|
$var1 = $installer->name; |
|
|
$var1 = $installer->name; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (empty($a->Form->customer_category)) { |
|
|
|
|
|
$category = ''; |
|
|
|
|
|
} else { |
|
|
|
|
|
$category = $a->Form->customer_category; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ($a->Form->type_application == "R") { |
|
|
if ($a->Form->type_application == "R") { |
|
|
$r++; |
|
|
$r++; |
|
|
|
|
|
|
|
|
array_push($nested_data, array( |
|
|
array_push($nested_data, array( |
|
|
'index' => $r . $n1, |
|
|
'index' => $r . $n1, |
|
|
'nature_work' => $a->nature_work, |
|
|
'nature_work' => $a->nature_work, |
|
|
|
|
|
'customer_category' => $category, |
|
|
'wo' => $a->wo, |
|
|
'wo' => $a->wo, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_phone' => $customer->phone1, |
|
|
'customer_phone' => $customer->phone1, |
|
|
|
|
|
|
|
|
array_push($nested_data, array( |
|
|
array_push($nested_data, array( |
|
|
'index' => $b . $n1, |
|
|
'index' => $b . $n1, |
|
|
'nature_work' => $a->nature_work, |
|
|
'nature_work' => $a->nature_work, |
|
|
|
|
|
'customer_category' => $category, |
|
|
'wo' => $a->wo, |
|
|
'wo' => $a->wo, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_phone' => $customer->phone1, |
|
|
'customer_phone' => $customer->phone1, |
|
|
|
|
|
|
|
|
$var1 = $installer->name; |
|
|
$var1 = $installer->name; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (empty($a->Form->customer_category)) { |
|
|
|
|
|
$category = ''; |
|
|
|
|
|
} else { |
|
|
|
|
|
$category = $a->Form->customer_category; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($a->Form->type_application == "R") { |
|
|
if ($a->Form->type_application == "R") { |
|
|
$r++; |
|
|
$r++; |
|
|
|
|
|
|
|
|
array_push($nested_data, array( |
|
|
array_push($nested_data, array( |
|
|
'index' => $r . $n1, |
|
|
'index' => $r . $n1, |
|
|
'nature_work' => $a->nature_work, |
|
|
'nature_work' => $a->nature_work, |
|
|
|
|
|
'customer_category' => $category, |
|
|
'wo' => $a->wo, |
|
|
'wo' => $a->wo, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_phone' => $customer->phone1, |
|
|
'customer_phone' => $customer->phone1, |
|
|
|
|
|
|
|
|
array_push($nested_data, array( |
|
|
array_push($nested_data, array( |
|
|
'index' => $b . $n1, |
|
|
'index' => $b . $n1, |
|
|
'nature_work' => $a->nature_work, |
|
|
'nature_work' => $a->nature_work, |
|
|
|
|
|
'customer_category' => $category, |
|
|
'wo' => $a->wo, |
|
|
'wo' => $a->wo, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_name' => $customer->name, |
|
|
'customer_phone' => $customer->phone1, |
|
|
'customer_phone' => $customer->phone1, |
|
|
|
|
|
|
|
|
}], 'Staff')->where('formT', 'B')->where('dealer', $company)->where('activated_my', $month . '/' . $year)->orderBy('activated_dt', 'DESC')->get(); |
|
|
}], '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') { |
|
|
} else if ($year != 'null' && $month != 'null' && $app != 'null' && $ptype != 'null') { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($app == 'Residential') { |
|
|
if ($app == 'Residential') { |
|
|
$dataClaim = DealerClaim::with(['Subscriber' => function ($q) { |
|
|
$dataClaim = DealerClaim::with(['Subscriber' => function ($q) { |
|
|
$q->with('Form'); |
|
|
$q->with('Form'); |