Workflows

@if ($plant_code) @php $stage = App\Models\Stage::where([['plant_code', $plant_code], ['status', 'active']])->first(); @endphp @endif
@if (empty($stocks))

No active workflows at the moment

@else
@if ($plant_code)
@endif
@if (session('danger'))

{{ session('danger') }}

@endif
@include('layouts.components.loading')
@if (session('success'))

{{ session('success') }}

@endif
@if ($listMode)
@if (count($stocks) > 0) @foreach ($stocks as $item) @endforeach @endif
Material Type Current Stock SAP stock Variance
{{ $item->types->material_type_name }} {{ $item->total_current }} {{ $item->total_sap }} {{ $item->total_current - $item->total_sap }}
@elseif($plantMode) @if ($plant_code)

Plant: {{ $plant->plant_name }}

@foreach ($plant_stocks as $item) @endforeach
Material Type Current Stock SAP stock Variance
{{ $item->types->material_type_name }} {{ $item->total_current }} {{ $item->total_sap }} {{ $item->total_current - $item->total_sap }}

My Approval

@if ($my_comment && $my_comment->comments) @foreach ($my_comment->comments as $comment) @endforeach @endif
Explanation Signature Date Action
{{ $comment->comment }} {{ date('M d, Y', strtotime($comment->created_at)) }} Edit

Other Approvals

@if ($other_comments && $other_comments->comments) @foreach ($other_comments->comments as $comment) @php $user = App\Models\User::where('id', $comment->user_id)->first(); $role = App\Http\Controllers\Helpers\HelperController::get_user_role($comment->role); @endphp @endforeach @endif
Name Role Explanation Signature Date
{{ $user->name }} {{ $role }} {{ $comment->comment }} {{ date('M d, Y', strtotime($comment->created_at)) }}
@if (session('success'))

{{ session('success') }}

@endif
@endif @elseif($locationMode) @if ($location_code)

Storage Location: {{ $location->storage_location_name }}

@foreach ($materials as $item) @endforeach
Material Material Code Current Stock SAP Stock Variance Clerk Comment
{{ $item->materials->material_name }} {{ $item->material_no }} {{ $item->current_stock }} {{ $item->sap_stock }} {{ $item->sap_variance }} {{ $item->comment ? $item->comment : 'No comment yet' }}
@endif @endif @endif