Fixed recording of orders and order notes

This commit is contained in:
Deon George
2019-06-17 13:17:58 +10:00
parent 4c5c43c390
commit 3ff82f5f10
7 changed files with 30 additions and 21 deletions

View File

@@ -55,8 +55,8 @@
<label for="account_id">Client Account</label>
<select class="form-control" id="account_id" name="account_id">
<option value="">&nbsp;</option>
@foreach ($user->all_accounts()->sortBy('company') as $o)
<option value="{{ $o->id }}" @if($o->id == old('account_id')) selected @endif>{{ $o->company }}</option>
@foreach ($user->all_accounts()->sortBy('name') as $o)
<option value="{{ $o->id }}" @if($o->id == old('account_id')) selected @endif>{{ $o->name }}</option>
@endforeach
</select>
<span class="help-block">{{ $errors->first('account_id') }}</span>
@@ -111,8 +111,8 @@
<label for="account_id">Existing Account</label>
<select class="form-control" id="account_id" name="account_id">
<option value="">&nbsp;</option>
@foreach ($user->accounts->sortBy('company') as $o)
<option value="{{ $o->id }}" @if($o->id == old('account_id')) selected @endif>{{ $o->company }}</option>
@foreach ($user->accounts->sortBy('name') as $o)
<option value="{{ $o->id }}" @if($o->id == old('account_id')) selected @endif>{{ $o->name }}</option>
@endforeach
</select>
<span class="help-block">{{ $errors->first('account_id') }}</span>
@@ -237,14 +237,10 @@
<div class="panel-collapse margin-bottom-20">
<div class="panel-body">
<div class="col-md-12">
<div class="control-group form-group col-sm-12 {{ $errors->has('order_notes') ? 'has-error' : '' }}">
<span class="help-block">{{ $errors->first('product_options') }}</span>
</div>
<div class="control-group form-group col-sm-12 {{ $errors->has('order_notes') ? 'has-error' : '' }}">
<label for="order_notes">Notes</label>
<textarea name="order_notes" class="form-control" rows="4" placeholder="Enter any special instructions...">{{ old('order_notes') }}</textarea>
<span class="help-block">{{ $errors->first('order_notes') }}</span>
<div class="control-group form-group col-sm-12 {{ $errors->has('options.notes') ? 'has-error' : '' }}">
<label for="options.notes">Notes</label>
<textarea name="options[notes]" class="form-control" rows="4" placeholder="Enter any special instructions...">{{ old('options.notes') }}</textarea>
<span class="help-block">{{ $errors->first('options.notes') }}</span>
</div>
</div>