瀏覽代碼

latest code in server

ifah
root 5 年之前
父節點
當前提交
f833ffd4c0

+ 1
- 1
app/Http/Controllers/Api/FormController.php 查看文件

@@ -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-08-12');
$start = $dateS->copy()->startOfDay();
$dateE = Carbon::createFromFormat('Y-m-d', '2020-08-31');
$end = $dateE->copy()->endOfDay();

+ 6
- 1
app/Http/Controllers/Contractor/WorkOrderController.php 查看文件

@@ -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');
}
}
}
}

+ 7
- 2
app/Http/Controllers/CustomerService/CoverageController.php 查看文件

@@ -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';
}
}
}
}

+ 3
- 3
app/Http/Controllers/CustomerService/CustomerController.php 查看文件

@@ -74,7 +74,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')->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 +743,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 +860,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'){

+ 6
- 1
app/Http/Controllers/CustomerService/WorkOrderController.php 查看文件

@@ -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);

}
}
}

+ 2
- 1
app/Http/Controllers/Form/BusinessController.php 查看文件

@@ -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'));
}
}
}

+ 2
- 1
app/Http/Controllers/Form/ResidentialController.php 查看文件

@@ -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);
}


二進制
public/assets/avatar/5ee1c416a1f29b3d4c69e2d8.jpg 查看文件


+ 2
- 0
resources/views/pdf/residential-pdf.blade.php 查看文件

@@ -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>

Loading…
取消
儲存