ultimatepos/Modules/IndustrialEngineering/Resources/views/mrp/index.blade.php

58 lines
3.1 KiB
PHP

@extends('layouts.app')
@section('title', __('industrialengineering::lang.run_mrp'))
@section('content')
@include('industrialengineering::layouts.nav')
<section class="content-header">
<h1><i class="fa fa-cogs"></i> @lang('industrialengineering::lang.run_mrp')</h1>
</section>
<section class="content">
@if(session('status'))
<div class="alert alert-{{ session('status.success') ? 'success' : 'warning' }} alert-dismissible">
<button type="button" class="close" data-dismiss="alert">&times;</button>
{{ session('status.msg') }}
</div>
@endif
<div class="box box-success">
<div class="box-body">
<form method="POST" action="{{ action([\Modules\IndustrialEngineering\Http\Controllers\MrpController::class, 'run']) }}">
@csrf
<div class="form-group">
<label>MBOM</label>
<select name="bom_id" class="form-control select2" required>
@foreach($boms as $bom)
<option value="{{ $bom->id }}">
{{ $bom->lineRevision?->revision_code ?? '—' }} / {{ $bom->bom_code }} {{ $bom->name }}
</option>
@endforeach
</select>
</div>
<div class="form-group">
<label>@lang('industrialengineering::lang.planned_quantity')</label>
<input type="number" name="planned_quantity" class="form-control" value="1" min="0.0001" step="any">
</div>
<div class="form-group">
<label>@lang('industrialengineering::lang.business_location')</label>
<select name="location_id" class="form-control select2">
@foreach($locations as $lid => $lname)
<option value="{{ $lid }}">{{ $lname }}</option>
@endforeach
</select>
</div>
<div class="form-group">
<label>@lang('industrialengineering::lang.default_supplier')</label>
<select name="supplier_contact_id" class="form-control select2">
<option value="">@lang('industrialengineering::lang.auto_from_catalog')</option>
@foreach($suppliers as $sid => $sname)
<option value="{{ $sid }}">{{ $sname }}</option>
@endforeach
</select>
</div>
<div class="checkbox"><label><input type="checkbox" name="create_purchase_orders" value="1" checked> @lang('industrialengineering::lang.create_purchase_orders')</label></div>
<div class="checkbox"><label><input type="checkbox" name="create_work_order" value="1" checked> @lang('industrialengineering::lang.create_work_order')</label></div>
<button type="submit" class="btn btn-success"><i class="fa fa-play"></i> @lang('industrialengineering::lang.run_mrp')</button>
</form>
</div>
</div>
</section>
@endsection