<%= @loan_application.product.name %> Application for <%= @loan_application.customers[0] %>
<%= notice %>
<% unless @loan_application.submitted? %>
<%= form_with(model: @loan_application, local: true) do |form| %>
<% if @loan_application.errors.any? %>
<%= pluralize(loan_application.errors.count, "error") %> prohibited this loan_application from being saved:
<% @loan_application.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= form.label :tenor, "Select the Tenor You Wish to Apply For (Months)", :class=>"lead g-font-size-18--xs" %>
<%= form.select :tenor, ["6","12","18","24","48","60"], {:prompt => "Select Tenor"}, class: "form-control" %>
Status
<%= @loan_application.status %>
<% if @loan_application.file.attached? %>
Attachment
<%= link_to(raw("") + " View Order/Invoice", @loan_application.file) %>
<% end %>
<%= link_to 'Amortisation Schedule', amortisation_schedule_loan_applications_path(id: @loan_application), remote: true, :class => "text-uppercase s-btn s-btn--md s-btn--primary-bg g-radius--50 g-padding-x-20--xs g-margin-b-20--xs" %>
<% end %>
<% else %>
<% unless @loan_application.customer.nil? %>
Customer Name
<%= @loan_application.customer.customer_name %>
Contact Details
<%= "#{@loan_application.customer.mobile_1} - #{@loan_application.customer.mobile_2}" %>
Email Address
<%= "#{@loan_application.customer.email}" %>
<% end %>
Loan Amount
<%= number_to_currency(@loan_application.loan_amount, unit: "#{@loan_application.currency.symbol} ") %>
<% if @loan_application.approved? %>
<%= @loan_application.approval_confirmation %>
<% end %>
<%= link_to 'Amortisation Schedule', amortisation_schedule_loan_applications_path(id: @loan_application), remote: true, :class => "text-uppercase s-btn s-btn--md s-btn--primary-bg g-radius--50 g-padding-y-20--xs g-margin-b-20--xs" %> |
<%= link_to 'Print', print_loan_applications_path(appid: @loan_application.appid, :format => :pdf), :target => "_blank", :class => "text-uppercase s-btn s-btn--md s-btn--primary-bg g-radius--50 g-padding-x-50--xs g-margin-b-20--xs" %>
<% end %>