{{ (@$bills) ? 'Edit Bill' : 'Add Bill' }}

{{ Form::open( [ 'method'=> 'POST', 'url' => route('save.cargo.generated.bill'), 'onsubmit'=>'return saveCargoGeneratedBill(this)','id'=> 'cargo_bills_save', 'enctype' => 'multipart/form-data']) }} {{Form::hidden('client_id',@$client_id)}} {{Form::hidden('month',((@$bills->id) ? @$bills->month : $current_month))}} {{Form::hidden('bill_id',@$bills->id)}}
{{Form::text( 'bill_no', ((@$bills->id) ? @$bills->bill_no : $bill_no), [ "class" => "form-control", "placeholder" => "", (@$bills->id) ? 'readonly' : '' ]) }}
{{ Form::select( 'client_id', @$clients_options, ((@$bills->id) ? @$bills->client_id : $client_id), [ "class" => "form-control", 'disabled'=>'disabled'] ) }}
{{Form::text( 'amount', ((@$bills->id) ? @$bills->amount : $amount), [ "class" => "form-control", "placeholder" => "e.g 1234" ]) }}
{{ Form::select( "month", $month, ((@$bills->id) ? @$bills->month : $current_month), [ 'class' => 'form-control', 'disabled' => 'disabled' ] ) }}
{{Form::text( 'fchpercent', ((@$bills->id) ? @$bills->fchpercent : $fch), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'cgstpercent', ((@$bills->id) ? @$bills->cgstpercent : $cgst), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'sgstpercent', ((@$bills->id) ? @$bills->sgstpercent : $sgst), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'igstpercent', ((@$bills->id) ? @$bills->igstpercent : $igst), [ "class" => "form-control", "placeholder" => "" ]) }}
{{Form::text( 'created_at', ((@$bills->id && @$bills->created_at != NULL) ? date(LaraCore::setting('date_format'),strtotime(@$bills->created_at)) : $today), [ "class" => "form-control date_input", "id" => 'date' ]) }}
@foreach($bill_templates as $key => $bill_template)
{{ Form::radio( "bill_template", $bill_template->template_key, true, [ 'id' => "$bill_template->template_key", 'class'=>'minimal', ]) }}
@endforeach
{{ Form::close() }}