{{ (@$branches) ? 'Edit Branches' : 'Add Branches' }}

{{ Form::open( [ 'method'=> 'POST', 'url' => route('branches.store'), 'id'=> 'branches_save', 'enctype' => 'multipart/form-data']) }} {{Form::hidden('id',@$branches->id) }}
{{ Form::select( 'user_id', @$users_options, ((@$branches->id) ? @$branches->user_id : ""), [ "class" => "form-control", "id" => "user_id"] ) }}
{{Form::text( 'code', ((@$branches->id) ? @$branches->code : ""), [ "class" => "form-control", "placeholder" => "e.g B001" ]) }}
{{Form::text( 'name', ((@$branches->id) ? @$branches->name : ""), [ "class" => "form-control", "placeholder" => "e.g ABC" ]) }}
{{Form::text( 'address', ((@$branches->id) ? @$branches->address : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{ Form::select( 'city', @$centers_options, ((@$branches->id) ? @$branches->city : ""), [ "class" => "form-control", ] ) }}
{{Form::text( 'zipcode', ((@$branches->id) ? @$branches->zipcode : ""), [ "class" => "form-control", "placeholder" => "e.g 12345" ]) }}
{{Form::text( 'contact_no', ((@$branches->id) ? @$branches->contact_no : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'person_name', ((@$branches->id) ? @$branches->person_name : ""), [ "class" => "form-control"]) }}
{{Form::text( 'bank_address', ((@$branches->id) ? @$branches->bank_address : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'bank_acno', ((@$branches->id) ? @$branches->bank_acno : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'ifsc_code', ((@$branches->id) ? @$branches->ifsc_code : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'msme_no', ((@$branches->id) ? @$branches->msme_no : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'pancard', ((@$branches->id) ? @$branches->pancard : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'gstno', ((@$branches->id) ? @$branches->gstno : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'lut_no', ((@$branches->id) ? @$branches->lut_no : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'sac_code', ((@$branches->id) ? @$branches->sac_code : ""), [ "class" => "form-control", "placeholder" => "" ]) }}
@if(@$branches->id) @php $selected = explode(',', @$branches->user_id); @endphp
{{ Form::select( 'operators', @$operators_options, ((@$branches->id) ? explode(',', @$branches->user_id) : ""), [ "class" => "form-control", "id" => "operators", "multiple"=>"multiple", "name"=>"operators[]"] ) }}
@endif
{{Form::textarea( 'quotation_notes', ((@$branches->id) ? @$branches->quotation_notes : ""), [ "class" => "form-control", "rows" => 3, "placeholder" => "Online tracking system." ]) }}
{{Form::textarea( 'cash_receipt_notes', ((@$branches->id) ? @$branches->cash_receipt_notes : ""), [ "class" => "form-control", "rows" => 3, "placeholder" => "1) It is insisted to insure parcels of or above Rs. 500" ]) }}
{{Form::textarea( 'bill_terms_and_conditions', ((@$branches->id) ? @$branches->bill_terms_and_conditions : ""), [ "class" => "form-control", "rows" => 3, "placeholder" => "1) Bill terms and conditions" ]) }}
{{Form::textarea( 'daily_parcel_mail_notes', ((@$branches->id) ? @$branches->daily_parcel_mail_notes : ""), [ "class" => "form-control", "rows" => 3, "placeholder" => "1) Booking terms and conditions" ]) }}
{{Form::file( 'image[]', [ "data-src" => @$branches->image, "data-names" => @$branches->image_token, "multiple"=>false]) }}

@if($errors->has('image')) {{$errors->first('image') }} @endif
{{Form::file( 'stamp[]', [ "data-src" => @$branches->stamp, "data-names" => @$branches->stamp_token, "multiple"=>false]) }}

@if($errors->has('stamp')) {{$errors->first('stamp') }} @endif
{{Form::file( 'payment_qr_code[]', [ "data-src" => @$branches->payment_qr_code, "data-names" => @$branches->payment_qr_code_token, "multiple"=>false]) }}

@if($errors->has('payment_qr_code')) {{$errors->first('payment_qr_code') }} @endif
{{ Form::radio( "status", 1, (((@$branches->id) && (@$branches->status == '1')) ? true : ('1' === '1' ? true : false) ), [ 'id' => 'status_Active', 'class'=>'minimal', ]) }} {{ Form::radio( "status", 0, (((@$branches->id) && (@$branches->status == '0')) ? true : ('1' === '0' ? true : false) ), [ 'id' => 'status_Inactive', 'class'=>'minimal', ]) }}
{{ Form::close() }}