Pārlūkot izejas kodu

Edit flow wo status

ifah
Siti Hajar Ibrahim pirms 6 gadiem
vecāks
revīzija
b277d036e4

+ 9
- 5
app/Http/Controllers/CustomerService/WorkOrderController.php Parādīt failu

$company = Company::where('team','CBB')->get(); $company = Company::where('team','CBB')->get();
$today = Carbon::today(); $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(); $subscriber = Subscriber::where('subscriber_id',$subscriber_id)->first();
if(!empty($subscriber)){ if(!empty($subscriber)){
$form = Form::with('WorkOrder')->where('_id',$subscriber->_id)->first(); $form = Form::with('WorkOrder')->where('_id',$subscriber->_id)->first();
$work_order->docket_id = ''; $work_order->docket_id = '';
$work_order->remarks_custservice = ''; $work_order->remarks_custservice = '';
$work_order->remarks_installer = ''; $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 = ''; $work_order->created_by = '';


$form->workorder()->save($work_order); $form->workorder()->save($work_order);
} }


$installer = ''; $installer = '';
info($w->Form->_id);
$form = Form::with('Subscriber','PackageDetail')->where('_id',$w->Form->_id)->first(); $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(); $product = Product::where('speed',$form->PackageDetail->name)->where('formT',$w->Form->type_application)->first();
$company = Company::where('_id',$w->contractor_id)->first(); $company = Company::where('_id',$w->contractor_id)->first();

Notiek ielāde…
Atcelt
Saglabāt