Optimising Supplier Layout and source code placement

This commit is contained in:
Deon George
2022-06-28 23:20:56 +10:00
parent 464407e7ee
commit fb416306e7
19 changed files with 269 additions and 301 deletions

View File

@@ -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