|
|
@@ -92,7 +92,7 @@ class FormController extends BaseController |
|
|
|
|
|
|
|
public function get_data_form(Request $request){ |
|
|
|
|
|
|
|
$dateS = Carbon::createFromFormat('Y-m-d', '2020-01-01'); |
|
|
|
$dateS = Carbon::createFromFormat('Y-m-d', '2017-01-01'); |
|
|
|
$start = $dateS->copy()->startOfDay(); |
|
|
|
$dateE = Carbon::createFromFormat('Y-m-d', '2020-12-31'); |
|
|
|
$end = $dateE->copy()->endOfDay(); |
|
|
@@ -124,10 +124,11 @@ class FormController extends BaseController |
|
|
|
// if(!empty($f->Subscriber->DealerClaim)){ |
|
|
|
// $amount_claim = $f->Subscriber->DealerClaim->total_claim; |
|
|
|
// } |
|
|
|
$subscriber_id=''; |
|
|
|
$subscriber_id=''; $ic=''; $company_reg=''; |
|
|
|
if(!empty($f->Subscriber) && !empty($f->PackageDetail)){ |
|
|
|
if($f->type_application == 'R'){ |
|
|
|
$name = $f->Subscriber->name; |
|
|
|
$ic = $f->Subscriber->ic; |
|
|
|
$subscriber_id = $f->Subscriber->subscriber_id; |
|
|
|
$contact_no = $f->Subscriber->phone1; |
|
|
|
$building = $f->Subscriber->building_name; |
|
|
@@ -138,6 +139,8 @@ class FormController extends BaseController |
|
|
|
} |
|
|
|
}else if($f->type_application == 'B'){ |
|
|
|
$name = $f->Subscriber->company_name; |
|
|
|
$ic = $f->Subscriber->ic; |
|
|
|
$company_reg = $f->Subscriber->company_reg; |
|
|
|
$subscriber_id = $f->Subscriber->subscriber_id; |
|
|
|
$contact_no = $f->Subscriber->company_num; |
|
|
|
$building = $f->Subscriber->street; |
|
|
@@ -167,19 +170,21 @@ class FormController extends BaseController |
|
|
|
'type_application' => $f->type_application, |
|
|
|
"type_service" => $f->type_service, |
|
|
|
"customer_name"=> $name, |
|
|
|
"subscriber_id" => $subscriber_id, |
|
|
|
"contact_no"=> $contact_no, |
|
|
|
"unit_no"=>$f->Subscriber->unit_no, |
|
|
|
"building"=>$building, |
|
|
|
"street"=>$address, |
|
|
|
"submitted_date" => $f->created_at->toDateTimeString(), |
|
|
|
"package_contract" => $f->PackageDetail->contract, |
|
|
|
"package_name" => $f->PackageDetail->name, |
|
|
|
'dealer' => $labelD, |
|
|
|
'wo' => $woId, |
|
|
|
'activated_date' => $woD, |
|
|
|
'installer_name' => $installer_name, |
|
|
|
'contractor_name' => $contractor_name, |
|
|
|
"ic" => $ic, |
|
|
|
"company_reg" => $company_reg, |
|
|
|
// "subscriber_id" => $subscriber_id, |
|
|
|
// "contact_no"=> $contact_no, |
|
|
|
// "unit_no"=>$f->Subscriber->unit_no, |
|
|
|
// "building"=>$building, |
|
|
|
// "street"=>$address, |
|
|
|
// "submitted_date" => $f->created_at->toDateTimeString(), |
|
|
|
// "package_contract" => $f->PackageDetail->contract, |
|
|
|
// "package_name" => $f->PackageDetail->name, |
|
|
|
// 'dealer' => $labelD, |
|
|
|
// 'wo' => $woId, |
|
|
|
// 'activated_date' => $woD, |
|
|
|
// 'installer_name' => $installer_name, |
|
|
|
// 'contractor_name' => $contractor_name, |
|
|
|
)); |
|
|
|
// array_push($result,array( |
|
|
|
// // 'Installer' => $installerId, |