$address = $form->Subscriber->company_name. ', '.$form->Subscriber->street. ' , '.$form->Subscriber->postcode. ' , '.$form->Subscriber->city. ' , '.$form->Subscriber->state; | $address = $form->Subscriber->company_name. ', '.$form->Subscriber->street. ' , '.$form->Subscriber->postcode. ' , '.$form->Subscriber->city. ' , '.$form->Subscriber->state; | ||||
} | } | ||||
} | |||||
} | |||||
if (empty($form->customer_category)){ | |||||
$category = ''; | |||||
}else { | |||||
$category = $form->customer_category; | |||||
} | |||||
$product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | $product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | ||||
$installer = Staff::with('StaffDetail')->where('_id',$docket->installer_id)->withTrashed()->first(); | $installer = Staff::with('StaffDetail')->where('_id',$docket->installer_id)->withTrashed()->first(); | ||||
$dateTime = Carbon::parse($docket->WorkOrder->dateTimeStart)->toDateTimeString(); | $dateTime = Carbon::parse($docket->WorkOrder->dateTimeStart)->toDateTimeString(); | ||||
$edateTime = Carbon::parse($docket->end_job)->toDateTimeString(); | $edateTime = Carbon::parse($docket->end_job)->toDateTimeString(); | ||||
$pdf = PDF::loadView('pdf.docket-pdf',compact('docket','form','address','product','installer','dateTime','edateTime')); | |||||
$pdf = PDF::loadView('pdf.docket-pdf',compact('docket','form','address','product','installer','dateTime','edateTime', 'category')); | |||||
$pdf->setPaper('A4', 'potrait'); | $pdf->setPaper('A4', 'potrait'); | ||||
return $pdf->stream(); | return $pdf->stream(); | ||||
} | } |
$address = $form->Subscriber->company_name. ', '.$form->Subscriber->street. ' , '.$form->Subscriber->postcode. ' , '.$form->Subscriber->city. ' , '.$form->Subscriber->state; | $address = $form->Subscriber->company_name. ', '.$form->Subscriber->street. ' , '.$form->Subscriber->postcode. ' , '.$form->Subscriber->city. ' , '.$form->Subscriber->state; | ||||
} | } | ||||
} | |||||
} | |||||
if (empty($form->customer_category)){ | |||||
$category = ''; | |||||
}else { | |||||
$category = $form->customer_category; | |||||
} | |||||
$product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | $product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | ||||
$installer = Staff::with('StaffDetail')->where('_id',$docket->installer_id)->withTrashed()->first(); | $installer = Staff::with('StaffDetail')->where('_id',$docket->installer_id)->withTrashed()->first(); | ||||
$dateTime = Carbon::parse($docket->WorkOrder->dateTimeStart)->toDateTimeString(); | $dateTime = Carbon::parse($docket->WorkOrder->dateTimeStart)->toDateTimeString(); | ||||
$edateTime = Carbon::parse($docket->end_job)->toDateTimeString(); | $edateTime = Carbon::parse($docket->end_job)->toDateTimeString(); | ||||
$pdf = PDF::loadView('pdf.docket-pdf',compact('docket','form','address','product','installer','dateTime','edateTime')); | |||||
$pdf = PDF::loadView('pdf.docket-pdf',compact('docket','form','address','product','installer','dateTime','edateTime', 'category')); | |||||
$pdf->setPaper('A4', 'potrait'); | $pdf->setPaper('A4', 'potrait'); | ||||
return $pdf->stream(); | return $pdf->stream(); | ||||
} | } |
$address = $form->Subscriber->company_name. ', '.$form->Subscriber->street. ' , '.$form->Subscriber->postcode. ' , '.$form->Subscriber->city. ' , '.$form->Subscriber->state; | $address = $form->Subscriber->company_name. ', '.$form->Subscriber->street. ' , '.$form->Subscriber->postcode. ' , '.$form->Subscriber->city. ' , '.$form->Subscriber->state; | ||||
} | } | ||||
} | |||||
} | |||||
if (empty($form->customer_category)){ | |||||
$category = ''; | |||||
}else { | |||||
$category = $form->customer_category; | |||||
} | |||||
$product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | $product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | ||||
$installer = Staff::with('StaffDetail')->where('_id',$docket->installer_id)->withTrashed()->first(); | $installer = Staff::with('StaffDetail')->where('_id',$docket->installer_id)->withTrashed()->first(); | ||||
$dateTime = Carbon::parse($docket->WorkOrder->dateTimeStart)->toDateTimeString(); | $dateTime = Carbon::parse($docket->WorkOrder->dateTimeStart)->toDateTimeString(); | ||||
$edateTime = Carbon::parse($docket->end_job)->toDateTimeString(); | $edateTime = Carbon::parse($docket->end_job)->toDateTimeString(); | ||||
$pdf = PDF::loadView('pdf.docket-pdf',compact('docket','form','address','product','installer','dateTime','edateTime')); | |||||
$pdf = PDF::loadView('pdf.docket-pdf',compact('docket','form','address','product','installer','dateTime','edateTime', 'category')); | |||||
$pdf->setPaper('A4', 'potrait'); | $pdf->setPaper('A4', 'potrait'); | ||||
return $pdf->stream(); | return $pdf->stream(); | ||||
} | } |
<div class="o">Please tick (/) where applicable.</div> | <div class="o">Please tick (/) where applicable.</div> | ||||
<p> | <p> | ||||
<table border="0" width="100%" cellspacing="0" cellpadding="5"> | <table border="0" width="100%" cellspacing="0" cellpadding="5"> | ||||
<tr style="height: 50px;"> | |||||
<td style="font-size: 12px; width: 150px;">Customer Category</td> | |||||
<td style="width: 50px;">:</td> | |||||
<td style="font-size: 12px;"> {{ $category }}</td> | |||||
</tr> | |||||
<tr style="height: 50px;"> | <tr style="height: 50px;"> | ||||
<td style="font-size: 12px; width: 150px;">Nature of Work</td> | <td style="font-size: 12px; width: 150px;">Nature of Work</td> | ||||
<td style="width: 50px;">:</td> | <td style="width: 50px;">:</td> | ||||
<td style="font-size: 12px;"> {{ $docket->WorkOrder->nature_work }}</td> | <td style="font-size: 12px;"> {{ $docket->WorkOrder->nature_work }}</td> | ||||
</tr> | |||||
</tr> | |||||
<tr style="height: 50px;"> | <tr style="height: 50px;"> | ||||
<td style="font-size: 12px; width: 150px;">Customer Name</td> | <td style="font-size: 12px; width: 150px;">Customer Name</td> | ||||
<td>:</td> | <td>:</td> |