| @@ -92,7 +92,7 @@ class FormController extends BaseController | |||
| public function get_data_form(Request $request){ | |||
| $dateS = Carbon::createFromFormat('Y-m-d', '2019-01-01'); | |||
| $dateS = Carbon::createFromFormat('Y-m-d', '2020-01-01'); | |||
| $start = $dateS->copy()->startOfDay(); | |||
| $dateE = Carbon::createFromFormat('Y-m-d', '2020-08-31'); | |||
| $end = $dateE->copy()->endOfDay(); | |||
| @@ -30,6 +30,11 @@ class WorkOrderController extends Controller | |||
| } | |||
| function createWorkID($limit){ | |||
| $number = WorkOrder::select('id','wo')->orderBy('created_at','DESC')->first(); | |||
| $numberOnly = str_replace('WO-','',$number->wo); | |||
| $numberOnly++; | |||
| return $numberOnly; | |||
| $allowedNumbers = range(0, 9); | |||
| shuffle($allowedNumbers); | |||
| $digits = array_rand($allowedNumbers, $limit); | |||
| @@ -762,4 +767,4 @@ class WorkOrderController extends Controller | |||
| return redirect('/contractor/work-order/list'); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -29,7 +29,12 @@ class CoverageController extends Controller | |||
| return substr(base_convert(sha1(uniqid(mt_rand())), 16, 36), 0, $limit); | |||
| } | |||
| function createWorkID($limit){ | |||
| function createWorkID($limit) { | |||
| $number = WorkOrder::select('id','wo')->orderBy('created_at','DESC')->first(); | |||
| $numberOnly = str_replace('WO-','',$number->wo); | |||
| $numberOnly++; | |||
| return $numberOnly; | |||
| $allowedNumbers = range(0, 9); | |||
| shuffle($allowedNumbers); | |||
| $digits = array_rand($allowedNumbers, $limit); | |||
| @@ -207,4 +212,4 @@ class CoverageController extends Controller | |||
| return 'false'; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -74,7 +74,9 @@ class CustomerController extends Controller | |||
| $nested_data = array(); | |||
| if($type == 'null' && $building == 'null' && $dealer == 'null'){ | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(500)->get(); | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(2000)->get(); | |||
| }else if($type != 'null' && $building == 'null' && $dealer == 'null'){ | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get(); | |||
| }else if($type != 'null' && $building != 'null' && $dealer == 'null'){ | |||
| @@ -743,7 +745,7 @@ class CustomerController extends Controller | |||
| $nested_data = array(); | |||
| if($type == 'null' && $building == 'null' && $dealer == 'null'){ | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->get(); | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(2000)->get(); | |||
| }else if($type != 'null' && $building == 'null' && $dealer == 'null'){ | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get(); | |||
| }else if($type != 'null' && $building != 'null' && $dealer == 'null'){ | |||
| @@ -860,7 +862,7 @@ class CustomerController extends Controller | |||
| $nested_data = array(); | |||
| if($type == 'null' && $building == 'null' && $dealer == 'null'){ | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->get(); | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(2000)->get(); | |||
| }else if($type != 'null' && $building == 'null' && $dealer == 'null'){ | |||
| $form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get(); | |||
| }else if($type != 'null' && $building != 'null' && $dealer == 'null'){ | |||
| @@ -33,6 +33,11 @@ class WorkOrderController extends Controller | |||
| } | |||
| function createWorkID($limit){ | |||
| $number = WorkOrder::select('id','wo')->orderBy('created_at','DESC')->first(); | |||
| $numberOnly = str_replace('WO-','',$number->wo); | |||
| $numberOnly++; | |||
| return $numberOnly; | |||
| $allowedNumbers = range(0, 9); | |||
| shuffle($allowedNumbers); | |||
| $digits = array_rand($allowedNumbers, $limit); | |||
| @@ -1446,4 +1451,4 @@ class WorkOrderController extends Controller | |||
| return redirect()->to('/customer-service/work-order/add/schedule/secured/'.$wo.'/'. $su_id); | |||
| } | |||
| } | |||
| } | |||
| @@ -204,6 +204,7 @@ class BusinessController extends Controller | |||
| $destinationPath = 'document/'.$su_id; | |||
| // create folder/dir if not exist | |||
| info(public_path()); | |||
| if(!File::exists(public_path().'/'.$destinationPath)){ | |||
| File::makeDirectory(public_path().'/'.$destinationPath,0777,true); | |||
| } | |||
| @@ -599,4 +600,4 @@ class BusinessController extends Controller | |||
| } | |||
| return view('email.invoiceb', compact ('form', 'product')); | |||
| } | |||
| } | |||
| } | |||
| @@ -207,7 +207,8 @@ class ResidentialController extends Controller | |||
| $destinationPath = 'document/'.$su_id; | |||
| // create folder/dir if not exist | |||
| if(!File::exists(public_path().'/'.$destinationPath)){ | |||
| info(public_path()); | |||
| if(!File::exists(public_path().'/'.$destinationPath)){ | |||
| File::makeDirectory(public_path().'/'.$destinationPath,0777,true); | |||
| } | |||
| @@ -50,8 +50,12 @@ class StoreDocket implements ShouldQueue | |||
| public function handle(Docket $docket) | |||
| { | |||
| $note = ''; | |||
| if(isset($this->request['Note'])){ | |||
| $mac_router =''; | |||
| $type_testing =''; | |||
| if(isset($this->request['Note']) || ($this->request['mac_router']) || ($this->request['type_testing'])){ | |||
| $note = $this->request['Note']; | |||
| $mac_router = $this->request['mac_router']; | |||
| $type_testing = $this->request['type_testing']; | |||
| } | |||
| $docket->work_order_id = $this->request['wo']; | |||
| @@ -60,15 +64,15 @@ class StoreDocket implements ShouldQueue | |||
| $docket->installer_id = $this->staff; | |||
| $docket->end_job = Carbon::now()->toDateTimeString(); | |||
| $docket->router_serial_number = $this->request['router_serial_number']; | |||
| $docket->mac_router = $this->request['mac_router']; | |||
| $docket->mac_router = $mac_router; | |||
| $docket->cable_read = $this->request['cable_read']; | |||
| $docket->condition = $this->request['condition']; | |||
| $docket->type_testing = $type_testing; | |||
| $docket->Note = $note; | |||
| $docket->Rating1 = $this->request['Rating1']; | |||
| $docket->Rating2 = $this->request['Rating2']; | |||
| $docket->Rating3 = $this->request['Rating3']; | |||
| $docket->moden_sn = $this->request['modem_sn']; | |||
| $docket->type_testing = $this->request['type_testing']; | |||
| $docket->modem_sn = $this->request['modem_sn']; | |||
| $docket->customer_signature = $this->signature; | |||
| $work_order = WorkOrder::where('wo',$this->request['wo'])->first(); | |||
| @@ -654,6 +654,7 @@ | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| @if ($ext1 !="pdf" && $ext2 !="pdf" && $ext3 !="pdf" && $ext4 !="pdf" && $ext5 != "pdf" && $ext6 !="pdf") | |||
| @if($form->back_ic != "" && $form->front_ic != "") | |||
| <!-- <div class="page-break"></div> --> | |||
| <table border="0" cellpadding="0" cellspacing="0" width="100%"> | |||
| @@ -771,5 +772,6 @@ | |||
| @endif | |||
| </table> | |||
| @endif | |||
| @endif | |||
| </body> | |||
| </html> | |||