<% content_for :title, "Complete Application" %>
<%= form_with(model: @customer, local: true) do |form| %> <% if @customer.errors.any? %>

<%= pluralize(@customer.errors.count, "error") %> prohibited this customer from being saved:

    <% @customer.errors.full_messages.each do |message| %>
  • <%= message %>
  • <% end %>
<% end %> <%= form.hidden_field :redirect_action, value: "contact_details" %> <%= form.hidden_field :redirect_error, value: "personal_details" %> <%= form.hidden_field :appid, value: "#{@loan_application.appid}" %> <% if @customer.customer_type.name == "Individual" %>

What is your Name?

<%= form.label :firstname, :class=>"lead g-font-size-16--xs" %> <%= form.text_field :firstname, :class=>"form-control" %>
<%= form.label :lastname, :class=>"lead g-font-size-16--xs" %> <%= form.text_field :lastname, :class=>"form-control" %>
<%= form.label :gender, "", :class=>"lead g-font-size-16--xs" %>
<%= form.radio_button :gender, 'male' %> Male <%= form.radio_button :gender, 'female' %> Female
<% unless @loan_application.nil? %>
<%= form.label :idnumber, "National ID", :class=>"lead g-font-size-16--xs" %>
National ID is required in the format - 00123456A00 <%= form.text_field :idnumber, :class=>"form-control" %>
<%= form.label :dob, "Date of Birth", :class=>"lead g-font-size-16--xs" %> <%= form.text_field :dob, 'data-provide' => "datepicker", 'data-date-format'=> "dd/mm/yyyy", 'startDate' => "#{Date.today - 65.years}", class: "form-control" %>
<% end %> <% else %>

What is the name of your Organisation?

<%#= form.label :customer_name, :class=>"lead g-font-size-16--xs" %> <%= form.text_field :customer_name, required: true, :class=>"form-control" %>
<%= form.label :incorporation_date, "Date of Incorporation", :class=>"lead g-font-size-16--xs" %> <%= form.text_field :incorporation_date, required: true, :class => "datepicker form-control", 'data-date-format'=> "mm/dd/yyyy" %>
<%= form.label :cr_number, "Company Registration No.", :class=>"lead g-font-size-16--xs" %> <%= form.text_field :cr_number, required: true, :class => "form-control" %>
<%= form.label :bp_number, "Business Partner No. (BP Number)", :class=>"lead g-font-size-16--xs" %> <%= form.text_field :bp_number, required: true, :class => "form-control" %>
<%= form.label :employees_number, "Number of Employees (Less than)", :class=>"lead g-font-size-16--xs" %> <%= form.select :employees_number, ["5","12","30","70"], {:prompt => "Select Range"}, required: true, :class => "form-control" %>
<%= form.label :estimated_sales, "Estimated Sales per Month", :class=>"lead g-font-size-16--xs" %>
Indicate the Estimated Sales per Month in the Currency applied for <%= form.select :estimated_sales, ["500","1500","6000","12000","25000","100000","250000","500000","1000000"], {:prompt => "Select Range"}, required: true, :class => "form-control" %>
<% end %>
<%= submit_tag "Update & Proceed", :class => "text-uppercase s-btn s-btn--md btn-success g-radius--50 g-padding-x-70--xs g-margin-b-20--xs" %>
<% end %>
<%= "#{@customer_type} #{@customer_name}" %>