|
|
@@ -91,9 +91,9 @@ class FormController extends BaseController |
|
|
|
|
|
|
|
public function get_data_form(){ |
|
|
|
|
|
|
|
$dateS = Carbon::createFromFormat('Y-m-d', '2020-01-01'); |
|
|
|
$dateS = Carbon::createFromFormat('Y-m-d', '2019-01-01'); |
|
|
|
$start = $dateS->copy()->startOfDay(); |
|
|
|
$dateE = Carbon::createFromFormat('Y-m-d', '2020-06-17'); |
|
|
|
$dateE = Carbon::createFromFormat('Y-m-d', '2020-06-19'); |
|
|
|
$end = $dateE->copy()->endOfDay(); |
|
|
|
|
|
|
|
$result = array(); |
|
|
@@ -119,6 +119,10 @@ class FormController extends BaseController |
|
|
|
$labelD = ""; |
|
|
|
} |
|
|
|
|
|
|
|
// $amount_claim=""; |
|
|
|
// if(!empty($f->Subscriber->DealerClaim)){ |
|
|
|
// $amount_claim = $f->Subscriber->DealerClaim->total_claim; |
|
|
|
// } |
|
|
|
if(!empty($f->Subscriber) && !empty($f->PackageDetail)){ |
|
|
|
if($f->type_application == 'R'){ |
|
|
|
$name = $f->Subscriber->name; |
|
|
@@ -136,7 +140,7 @@ class FormController extends BaseController |
|
|
|
$address = $f->Subscriber->postcode. ' , '.$f->Subscriber->city. ' , '.$f->Subscriber->state; |
|
|
|
} |
|
|
|
|
|
|
|
$woD = '-'; $woId = 'none'; $natureWork = ''; $doId = ''; $woRate=""; $amount_claim=""; |
|
|
|
$woD = '-'; $woId = 'none'; $natureWork = ''; $doId = ''; $woRate=""; |
|
|
|
if(!empty($f->WorkOrder)){ |
|
|
|
$woId = $f->WorkOrder->wo; |
|
|
|
$natureWork = $f->WorkOrder->nature_work; |
|
|
@@ -144,22 +148,56 @@ class FormController extends BaseController |
|
|
|
if(!empty($f->WorkOrder->Docket)){ |
|
|
|
$woD = $f->WorkOrder->Docket->end_job; |
|
|
|
$woRate = $f->WorkOrder->Docket->Rating1; |
|
|
|
// $amount_claim = $f->Subscriber->DealerClaim->total_claim; |
|
|
|
$installerId = $f->WordOrder->Docket->installer_id; |
|
|
|
|
|
|
|
// array_push($result,array( |
|
|
|
// 'type_application' => $f->type_application, |
|
|
|
// "type_service" => $f->type_service, |
|
|
|
// "customer_name"=> $name, |
|
|
|
// "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, |
|
|
|
// )); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// array_push($result,array( |
|
|
|
// 'type_application' => $f->type_application, |
|
|
|
// "type_service" => $f->type_service, |
|
|
|
// "customer_name"=> $name, |
|
|
|
// "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, |
|
|
|
// )); |
|
|
|
array_push($result,array( |
|
|
|
'Installer' => $installerId, |
|
|
|
'Dealer Name' => $labelD, |
|
|
|
"Customer Name"=> $name, |
|
|
|
"Contact Number"=> $contact_no, |
|
|
|
'Completion Date' => $woD, |
|
|
|
'Type Application' => $f->type_application, |
|
|
|
"Form Type" => $f->type_service, |
|
|
|
"Package"=> $f->PackageDetail->contract, |
|
|
|
"WO No" => $woId, |
|
|
|
"DO No" => $doId, |
|
|
|
"Service Type" => $natureWork, |
|
|
|
"Service Type" => $f->PackageDetail->name, |
|
|
|
"Building"=>$building, |
|
|
|
"Rating" => $woRate, |
|
|
|
"Claim Amount" => $amount_claim, |
|
|
|
// "Claim Amount" => $amount_claim, |
|
|
|
)); |
|
|
|
} |
|
|
|
|