<% unless @loan_application.submitted? %>
Loan Amount
<%= number_to_currency(@loan_application.loan_amount, unit: "#{@loan_application.currency.symbol} ") %>
<% end %>
Instalment
<%= number_to_currency(@loan_application.instalment, unit: "#{@loan_application.currency.symbol} ") %>
Purpose of Loan
<%= @loan_application.loan_purpose %>
Pledged Security
<% unless @loan_application.pledged_securities.empty? %><%= "#{@loan_application.pledged_securities[0].security_type} - #{@loan_application.pledged_securities[0].description}" %><% else %>None<% end %>
<% if @loan_application.loan_application_logs.empty? %>
<%= link_to 'Submit for Processing', email_loan_applications_path(id: @loan_application), :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 %>
<% if @loan_application.status != "SUBMITTED" %>
<% if @loan_application.completed == true and @loan_application.status == "APPROVED" %>
<%= link_to 'Submit Application', application_submission_form_loan_applications_path(id: @loan_application), :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" %>
<%= link_to 'Print', print_loan_applications_path(appid: @loan_application.appid, :format => :pdf), :target => "_blank", :class => "text-uppercase s-btn s-btn--md btn-success g-radius--50 g-padding-x-50--xs g-margin-b-20--xs" %>
<% elsif @loan_application.completed != true and @loan_application.status == "APPROVED" %>
<%= link_to "Complete Application", personal_details_customers_path(id: @loan_application.customer, appid: @loan_application.appid), :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" %>
<% elsif @loan_application.status == "COMPLETED" and @loan_application.closed == false %>
This loan application has been successfully completed. Awaiting disbursement
<%= link_to 'Print', print_loan_applications_path(appid: @loan_application.appid, :format => :pdf), :target => "_blank", :class => "text-uppercase s-btn s-btn--md btn-success g-radius--50 g-padding-x-50--xs g-margin-b-20--xs" %>
<% elsif @loan_application.status == "DISBURSED" and @loan_application.closed == true %>
This loan application has been successfully disbursed.
<%= link_to 'Print', print_loan_applications_path(appid: @loan_application.appid, :format => :pdf), :target => "_blank", :class => "text-uppercase s-btn s-btn--md btn-success g-radius--50 g-padding-x-50--xs g-margin-b-20--xs" %>
<% end %>
<% end %>