57 lines
2.9 KiB
PHP
57 lines
2.9 KiB
PHP
@extends('portal::layouts.supplier')
|
|
@section('title', $rfq->ref_no)
|
|
@section('content')
|
|
@php $myResponse = $rfq->responses->first(); @endphp
|
|
<section class="content-header"><h1>{{ $rfq->ref_no }} — {{ $rfq->title }}</h1></section>
|
|
<section class="content">
|
|
<div class="box box-primary">
|
|
<div class="box-body">
|
|
<p><strong>@lang('portal::lang.status'):</strong> {{ $rfq->status }}</p>
|
|
<p><strong>@lang('supplychain::lang.due_date'):</strong> @format_date($rfq->due_date)</p>
|
|
@if($rfq->notes)<p>{{ $rfq->notes }}</p>@endif
|
|
<h4>@lang('supplychain::lang.rfq_lines')</h4>
|
|
<table class="table table-bordered">
|
|
<thead><tr><th>@lang('product.product')</th><th>@lang('sale.qty')</th><th>@lang('supplychain::lang.specs')</th></tr></thead>
|
|
<tbody>
|
|
@foreach($rfq->lines as $line)
|
|
<tr>
|
|
<td>{{ $line->specs ?? ('#'.$line->product_id) }}</td>
|
|
<td>{{ $line->qty }}</td>
|
|
<td>{{ $line->specs }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@if($myResponse && $myResponse->status === 'submitted')
|
|
<div class="alert alert-success">
|
|
@lang('supplychain::lang.portal_quote_submitted'):
|
|
{{ number_format($myResponse->quoted_price, 2) }} — {{ $myResponse->lead_days }} @lang('supplychain::lang.lead_days')
|
|
</div>
|
|
@elseif($rfq->status === 'open')
|
|
<form method="POST" action="{{ route('supplier.supplychain.rfq.quote', $rfq->id) }}">
|
|
@csrf
|
|
<div class="row">
|
|
<div class="col-md-4 form-group">
|
|
<label>@lang('supplychain::lang.quoted_price')</label>
|
|
<input type="number" step="0.01" name="quoted_price" class="form-control" required>
|
|
</div>
|
|
<div class="col-md-4 form-group">
|
|
<label>@lang('supplychain::lang.lead_days')</label>
|
|
<input type="number" name="lead_days" class="form-control" min="1" required>
|
|
</div>
|
|
<div class="col-md-12 form-group">
|
|
<label>@lang('supplychain::lang.notes')</label>
|
|
<textarea name="notes" class="form-control" rows="3"></textarea>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">@lang('supplychain::lang.portal_submit_quote')</button>
|
|
</form>
|
|
@endif
|
|
</div>
|
|
<div class="box-footer">
|
|
<a href="{{ route('supplier.supplychain.rfq.index') }}" class="btn btn-default">@lang('messages.back')</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|