Optimising Supplier Layout and source code placement
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<!-- $o = Supplier::class -->
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="form-group has-validation">
|
||||
<label for="cost_id">Supplier Invoice</label>
|
||||
<select class="form-control form-control-border" id="cost_id" name="cost_id">
|
||||
<option value=""></option>
|
||||
<option value="">Add New</option>
|
||||
@foreach(\App\Models\Cost::orderBy('billed_at','DESC')->get() as $oo)
|
||||
<option value="{{ $oo->id }}">{{ $oo->billed_at->format('Y-m-d') }}: ${{ number_format($oo->total,2) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('name')
|
||||
{{ $message }}
|
||||
@else
|
||||
Date is required.
|
||||
@enderror
|
||||
</span>
|
||||
<span class="input-helper">Suppliers Invoice</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#cost_id')
|
||||
.on('change',function(item) {
|
||||
window.location.href = '{{ url('a/supplier/cost') }}'+(item.target.value ? '/'+item.target.value : '');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user