本文整理汇总了PHP中Workflow::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Workflow::find方法的具体用法?PHP Workflow::find怎么用?PHP Workflow::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Workflow
的用法示例。
在下文中一共展示了Workflow::find方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtoupper
<?php
$wfName = Workflow::find('2');
?>
<br/>
<!-- PURCHASE REQUEST SECTION -->
<div class="panel panel-success">
<div class="panel-heading">
<?php
$sectionName = Section::find('5');
?>
<div class="panel-title">
<?php
$section_name = strtoupper($sectionName->sectionName);
$position = 90;
$str = substr($section_name, 0, $position) . "<br>" . substr($section_name, $position);
echo $str;
?>
</div>
</div>
<div class="panel-body">
<!-- Displays form for adding new tasks to the workflow -->
<div id="office-create-form" class="well div-form">
{{ Form::open(['url'=>'addtask'], 'POST', array('role' => 'form')) }}
<div class="col-md-8">
{{ Form::text('label', null, array('class' => 'form-control', 'placeholder' => 'Enter field label here','maxlength'=>'45')) }}
<input type ="hidden" name="section_id" value="{{$sectionName->id}}">
</div>
示例2: foreach
<?php
//Cursor Component
//Count Cursor
$id = $purchase->id;
$docs = DB::table('document')->where('pr_id', '=', $id)->first();
$workflow = DB::table('workflow')->get();
$taskch = TaskDetails::where('doc_id', $docs->id)->where('status', 'New')->orWhere('status', 'Active')->count();
$taskexist = TaskDetails::where('doc_id', $docs->id)->count();
//Get Cursor Value
if ($taskch == 0) {
$taskc = TaskDetails::where('doc_id', $docs->id)->where('status', 'Done')->orderBy('id', 'DESC')->first();
} else {
$taskc = TaskDetails::where('doc_id', $docs->id)->where('status', 'New')->orWhere('status', 'Active')->first();
}
//Queries
$workflow = Workflow::find($docs->work_id);
$section = Section::where('workflow_id', $workflow->id)->orderBy('section_order_id', 'ASC')->get();
$taskd = TaskDetails::where('doc_id', $docs->id)->orderBy('id', 'ASC')->get();
$sectioncheck = 0;
$prdays = 0;
$lastid = 0;
if ($taskexist != 0) {
foreach ($section as $sections) {
$sectiondays = 0;
$task = Task::where('section_id', $sections->section_order_id)->where('wf_id', $workflow->id)->orderBy('order_id', 'ASC')->get();
echo "<div class='panel panel-success'><div class='panel-heading'><h3 class='panel-title'>" . $sections->section_order_id . ". " . $sections->sectionName . "</h3></div>";
echo "<div class='panel-body'>";
echo "<table border='1' class='workflow-table'>";
//Addon Display
$otherc = OtherDetails::where('section_id', $sections->id)->count();
if ($otherc != 0) {
示例3: strtoupper
<?php
$wfName = Workflow::find('5');
?>
<br/>
<!-- PURCHASE REQUEST SECTION -->
<div class="panel panel-success">
<div class="panel-heading">
<?php
$sectionName = Section::find('16');
?>
<div class="panel-title">
<?php
$section_name = strtoupper($sectionName->sectionName);
$position = 90;
$str = substr($section_name, 0, $position) . "<br>" . substr($section_name, $position);
echo $str;
?>
</div>
</div>
<div class="panel-body">
<!-- Displays form for adding new tasks to the workflow -->
<div id="office-create-form" class="well div-form">
{{ Form::open(['url'=>'addtask'], 'POST', array('role' => 'form')) }}
<div class="col-md-8">
{{ Form::text('label', null, array('class' => 'form-control', 'placeholder' => 'Enter field label here','maxlength'=>'45')) }}
<input type ="hidden" name="section_id" value="{{$sectionName->id}}">
</div>
示例4: Purchase
</td>
<?php
$doc = new Purchase();
$doc = DB::table('document')->where('pr_id', $request->id)->get();
?>
<td width="30%">
@foreach ($doc as $docs)
<?php
$workflow = Workflow::find($docs->work_id)->workFlowName;
if ($workflow == "Small Value Procurement (Below P50,000)") {
echo "SVP (Below P50,000)";
} else {
if ($workflow == "Small Value Procurement (Above P50,000 Below P500,000)") {
echo "SVP (Above P50,000 Below P500,000)";
} else {
echo $workflow = Workflow::find($docs->work_id)->workFlowName;
}
}
if ($request->otherType != "Pakyaw" || $request->otherType != "Direct Contracting") {
} else {
if ($request->otherType != "") {
echo "<br> <i>{$request->otherType}</i>";
}
}
?>
@endforeach
</td>
<td width="15%"><span class="label {{($request->status == 'New') ? 'label-primary' : (($request->status == 'Active') ? 'label-success' : (($request->status == 'Overdue') ? 'label-danger' : 'label-default'))}}">{{ $request->status; }}</span></td>
<td width="15%">{{{ $request->amount }}}</td>
</tr>
@endforeach
示例5: create_submit
//.........这里部分代码省略.........
$purchase->sourceOfFund = strip_tags(Input::get('sourceOfFund'));
$purchase->amount = Input::get('amount');
$purchase->office = Input::get('office');
$purchase->requisitioner = Input::get('requisitioner');
if (!Input::get('dateRequested') == '') {
$purchase->dateRequested = Input::get('dateRequested');
}
$purchase->dateReceived = Input::get('dateReceived');
$purchase->status = 'Active';
$purchase->otherType = Input::get('otherType');
// Get latest control number
$cn = Input::get('controlNo');
$checkUniqueControlNo = Purchase::where('controlNo', '=', "{$cn}")->count();
if ($checkUniqueControlNo != 0) {
$purchase->controlNo = '';
} else {
$purchase->controlNo = Input::get('controlNo');
}
if (Input::get('otherType') == 'Pakyaw') {
$purchase->projectType = "None";
} else {
$purchase->projectType = Input::get('projectType');
}
// Set creator id
$user_id = Auth::user()->id;
$purchase->created_by = $user_id;
$purchase_save = $purchase->save();
if ($purchase_save && (Session::get('imgerror') == NULL || !Input::hasfile('file'))) {
$document->pr_id = $purchase->id;
$document->work_id = Input::get('hide_modeOfProcurement');
$document_save = $document->save();
if ($document_save) {
$doc_id = $document->id;
$workflow = Workflow::find($document->work_id);
$section = Section::where('workflow_id', $document->work_id)->orderBy('section_order_id', 'ASC')->get();
$firstnew = 0;
// Set due date;
$new_purchase = Purchase::find($purchase->id);
$workflow_id = Input::get('hide_modeOfProcurement');
$workflow = Workflow::find($workflow_id);
$addToDate = $workflow->totalDays;
date_default_timezone_set("Asia/Manila");
$dueDate = date('Y-m-d H:i:s', strtotime("+{$addToDate} days"));
$new_purchase->dueDate = $dueDate;
$new_purchase->save();
$tasks = Task::where('wf_id', $document->work_id)->orderBy('section_id', 'ASC')->orderBy('order_id', 'ASC')->get();
foreach ($tasks as $task) {
$task_details = new TaskDetails();
$task_details->task_id = $task->id;
$stringamount = $new_purchase->amount;
$stringamount = str_replace(str_split(','), '', $stringamount);
$amount = (double) $stringamount;
if ($firstnew == 0) {
$task_details->status = "New";
} else {
$task_details->status = "Pending";
}
//Project Type
if ($task->taskName == "PRE-PROCUREMENT CONFERENCE" || $task->taskName == "ADVERTISEMENT" || $task->taskName == "PRE-BID CONFERENCE") {
$task_details->status = "Lock";
if ($new_purchase->projectType == "Goods/Services") {
if ($task->taskName == "PRE-PROCUREMENT CONFERENCE" || $task->taskName == "ADVERTISEMENT") {
if ($amount > 2000000) {
$task_details->status = "Pending";
}
} else {
示例6: janisawesome
public function janisawesome()
{
function generateRandomString($length = 10)
{
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomString;
}
function generateRandomAmount()
{
$length = rand(4, 8);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= rand(1, 9);
}
return $randomString;
}
$numLoop = 1;
while ($numLoop < 301) {
$purchase = new Purchase();
$document = new Document();
$purchase->projectPurpose = generateRandomString();
$purchase->sourceOfFund = generateRandomString();
$controlAmt = generateRandomAmount();
$controlAmt .= ".00";
$purchase->amount = number_format($controlAmt);
$purchase->office = "1";
$purchase->requisitioner = "1";
$purchase->dateRequested = date('Y-m-d H:i:s');
$purchase->dateReceived = date('Y-m-d H:i:s');
$purchase->status = 'Active';
$purchase->otherType = " ";
// Get latest control number
$cn = 0;
$purchase_controlNo = Purchase::orderBy('ControlNo', 'DESC')->first();
if (!$purchase_controlNo == NuLL) {
$cn = $purchase_controlNo->controlNo;
}
$cn += 1;
$purchase->controlNo = $cn;
if (Input::get('otherType') == ' ') {
$purchase->projectType = "None";
} else {
$purchase->projectType = "None";
}
// Set creator id
$user_id = Auth::user()->id;
$purchase->created_by = $user_id;
$purchase_save = $purchase->save();
if ($purchase_save) {
if ($controlAmt < 50000) {
$amtControl = 1;
} else {
if ($controlAmt >= 50000 && $controlAmt <= 500000) {
$amtControl = 2;
} else {
if ($controlAmt >= 500000) {
$amtControl = 3;
}
}
}
$document->pr_id = $purchase->id;
$document->work_id = $amtControl;
$document_save = $document->save();
if ($document_save) {
$doc_id = $document->id;
$workflow = Workflow::find($document->work_id);
$section = Section::where('workflow_id', $document->work_id)->orderBy('section_order_id', 'ASC')->get();
$firstnew = 0;
// Set due date;
$new_purchase = Purchase::find($purchase->id);
$workflow_id = "1";
$workflow = Workflow::find($workflow_id);
$addToDate = $workflow->totalDays;
date_default_timezone_set("Asia/Manila");
$dueDate = date('Y-m-d H:i:s', strtotime("+{$addToDate} days"));
$new_purchase->dueDate = $dueDate;
$new_purchase->save();
$tasks = Task::where('wf_id', $document->work_id)->orderBy('section_id', 'ASC')->orderBy('order_id', 'ASC')->get();
foreach ($tasks as $task) {
$task_details = new TaskDetails();
$task_details->task_id = $task->id;
$stringamount = $new_purchase->amount;
$stringamount = str_replace(str_split(','), '', $stringamount);
$amount = (double) $stringamount;
if ($firstnew == 0) {
$task_details->status = "New";
} else {
$task_details->status = "Pending";
}
//Project Type
if ($task->taskName == "PRE-PROCUREMENT CONFERENCE" || $task->taskName == "ADVERTISEMENT" || $task->taskName == "PRE-BID CONFERENCE") {
$task_details->status = "Lock";
if ($new_purchase->projectType == "Goods/Services") {
if ($task->taskName == "PRE-PROCUREMENT CONFERENCE" || $task->taskName == "ADVERTISEMENT") {
if ($amount > 2000000) {
$task_details->status = "Pending";
//.........这里部分代码省略.........
示例7: strtoupper
<?php
$wfName = Workflow::find('1');
?>
<br/>
<?php
$sectionName = Section::find('5');
?>
<!-- PURCHASE REQUEST SECTION -->
<div class="panel panel-success">
<div class="panel-heading">
<?php
$sectionName = Section::find('1');
?>
<div class="panel-title">
<?php
$section_name = strtoupper($sectionName->sectionName);
$position = 90;
$str = substr($section_name, 0, $position) . "<br>" . substr($section_name, $position);
echo $str;
?>
</div>
</div>
<div class="panel-body">
<!-- Displays form for adding new tasks to the workflow -->
<div id="office-create-form" class="well div-form">
示例8: strtoupper
<?php
$wfName = Workflow::find('4');
?>
<br/>
<!-- PURCHASE REQUEST SECTION -->
<div class="panel panel-success">
<div class="panel-heading">
<?php
$sectionName = Section::find('13');
?>
<div class="panel-title">
<?php
$section_name = strtoupper($sectionName->sectionName);
$position = 90;
$str = substr($section_name, 0, $position) . "<br>" . substr($section_name, $position);
echo $str;
?>
</div>
</div>
<div class="panel-body">
<!-- Displays form for adding new tasks to the workflow -->
<div id="office-create-form" class="well div-form">
{{ Form::open(['url'=>'addtask'], 'POST', array('role' => 'form')) }}
<div class="col-md-8">
{{ Form::text('label', null, array('class' => 'form-control', 'placeholder' => 'Enter field label here','maxlength'=>'45')) }}
<input type ="hidden" name="section_id" value="{{$sectionName->id}}">