| @@ -609,6 +609,12 @@ class WorkOrderController extends Controller | |||
| $form = Form::with('PackageDetail','Subscriber')->where('_id',$wo->_id)->first(); | |||
| $product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | |||
| if(empty($form->customer_category)){ | |||
| $category = ''; | |||
| }else { | |||
| $category = $form->customer_category; | |||
| } | |||
| if(empty($product)){ | |||
| if($form->PackageDetail->name == "30"){ | |||
| $product = '30Mbps'; | |||
| @@ -644,7 +650,7 @@ class WorkOrderController extends Controller | |||
| } | |||
| $pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address')); | |||
| $pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address', 'category')); | |||
| $pdf->setPaper('A4', 'potrait'); | |||
| return $pdf->stream(); | |||
| } | |||
| @@ -1162,6 +1162,12 @@ class WorkOrderController extends Controller | |||
| $form = Form::with('PackageDetail','Subscriber')->where('_id',$wo->_id)->first(); | |||
| $product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | |||
| if(empty($form->customer_category)){ | |||
| $category = ''; | |||
| }else { | |||
| $category = $form->customer_category; | |||
| } | |||
| if(empty($product)){ | |||
| if($form->PackageDetail->name == "30"){ | |||
| $product = '30Mbps'; | |||
| @@ -1198,7 +1204,7 @@ class WorkOrderController extends Controller | |||
| } | |||
| $pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address')); | |||
| $pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address', 'category')); | |||
| $pdf->setPaper('A4', 'potrait'); | |||
| return $pdf->stream(); | |||
| } | |||
| @@ -1650,6 +1650,12 @@ class MarketingController extends Controller | |||
| $form = Form::with('PackageDetail','Subscriber')->where('_id',$wo->_id)->first(); | |||
| $product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | |||
| if(empty($form->customer_category)){ | |||
| $category = ''; | |||
| }else { | |||
| $category = $form->customer_category; | |||
| } | |||
| if(empty($product)){ | |||
| $product = 'RMbps'; | |||
| }else { | |||
| @@ -1682,7 +1688,7 @@ class MarketingController extends Controller | |||
| } | |||
| $pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address')); | |||
| $pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address', 'category')); | |||
| $pdf->setPaper('A4', 'potrait'); | |||
| return $pdf->stream(); | |||
| } | |||
| @@ -50,6 +50,12 @@ class AssignWorkOrder extends Mailable | |||
| $form = Form::with('PackageDetail','Subscriber')->where('_id',$wo->_id)->first(); | |||
| $product = Product::where('formT',$form->type_application)->where('speed',$form->PackageDetail->name)->first(); | |||
| if(empty($form->customer_category)){ | |||
| $category = ''; | |||
| }else { | |||
| $category = $form->customer_category; | |||
| } | |||
| if(empty($product)){ | |||
| if($form->PackageDetail->name == "30"){ | |||
| $product = '30Mbps'; | |||
| @@ -85,7 +91,7 @@ class AssignWorkOrder extends Mailable | |||
| } | |||
| $pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address')); | |||
| $pdf = PDF::loadView('pdf.workorder-pdf',compact('wo','form','product','created_at','created_by','address', 'category')); | |||
| $pdf->setPaper('A4', 'potrait'); | |||
| return $this->from('no-reply@citybroadband.my','no-reply@citybroadband.my')->subject('You Have New Work Order')->view('email.assign_wo') | |||
| @@ -51,7 +51,10 @@ | |||
| <table> | |||
| <tr> | |||
| <td style="width: 100px; font-size: 13px;">Task:</td> | |||
| <td style="width: 150px;border:1px solid black;font-size: 13px;height:17px"><span>{{ $wo->nature_work }}</span></td> | |||
| <td style="width: 200px;border:1px solid black;font-size: 13px;height:17px"><span>{{ $wo->nature_work }}</span></td> | |||
| <td style="width: 50px; font-size: 13px;"> </td> | |||
| <td style="width: 150px; font-size: 13px;">Customer Category:</td> | |||
| <td style="width: 200px;border:1px solid black;font-size: 13px;height:17px"><span>{{ $category }}</span></td> | |||
| </tr> | |||
| </table> | |||
| </td> | |||