| @@ -92,6 +92,13 @@ class WorkOrderController extends Controller | |||
| $company = Company::where('team','CBB')->get(); | |||
| $today = Carbon::today(); | |||
| $wo_status = ''; | |||
| if($status == "non-prelaid"){ | |||
| $wo_status = 'Pending Non Prelaid'; | |||
| }else { | |||
| $wo_status = 'Pending Contractor'; | |||
| } | |||
| $subscriber = Subscriber::where('subscriber_id',$subscriber_id)->first(); | |||
| if(!empty($subscriber)){ | |||
| $form = Form::with('WorkOrder')->where('_id',$subscriber->_id)->first(); | |||
| @@ -119,11 +126,7 @@ class WorkOrderController extends Controller | |||
| $work_order->docket_id = ''; | |||
| $work_order->remarks_custservice = ''; | |||
| $work_order->remarks_installer = ''; | |||
| if($status=="non-prelaid"){ | |||
| $work_order->status = 'Pending Non Prelaid'; | |||
| }else { | |||
| $work_order->status = 'Pending Contractor'; | |||
| } | |||
| $work_order->status = $wo_status ; | |||
| $work_order->created_by = ''; | |||
| $form->workorder()->save($work_order); | |||
| @@ -248,6 +251,7 @@ class WorkOrderController extends Controller | |||
| } | |||
| $installer = ''; | |||
| info($w->Form->_id); | |||
| $form = Form::with('Subscriber','PackageDetail')->where('_id',$w->Form->_id)->first(); | |||
| $product = Product::where('speed',$form->PackageDetail->name)->where('formT',$w->Form->type_application)->first(); | |||
| $company = Company::where('_id',$w->contractor_id)->first(); | |||