Contract info
<%= @contract.uid %>
<%= @contract.created_at.strftime("%d %B %Y") %>
<% if @contract.confirmed %>
Confirmed
<% else %>
Not-Confirmed
<% end %>
Request
<%= @site_request.get_request_type %>
<% if @site_request.type == "existing" %>
Site Info
<%= @site_request.get_site.uid %>
<%= @site_request.get_site.title %>
<% end %>
<% if !@contract.contract_file.url.nil? || !@contract.signed_contract_file.url.nil? %>
Contract Files
<% if !@contract.contract_file.url.nil? %>
<% end %>
<% if !@contract.signed_contract_file.url.nil? %>
<% end %>
<% end %>
Quotaion
Cost in NTD.
<% total_amount = 0 %>
<% ["new_site_cost","hosting_with_rulingdigital_cost","service_cost","option_module_cost","customized_module_cost","template_cost","customized_template_cost","rwd_cost"].each do |attrib| %>
<% amount = @contract.send(attrib.to_sym) %>
<% if amount > 0 %>
<% if attrib == "option_module_cost" %>
<% else %>
<% end %>
<%= amount %>
<% end %>
<% total_amount = total_amount + amount %>
<% end %>
<% if !@contract.other.nil? || @contract.other_cost > 0 %>
<%= @contract.other_cost %>
<% total_amount = total_amount + @contract.other_cost %>
<% end %>
<%= total_amount %>
<% if !@contract.confirmed %>
<%= form_for @contract, :url => "/cpanel/contract/#{@contract.uid}/update_contract" do |f| %>
<%= f.file_field :signed_contract_file, :class=>"file-box" %>
<% end %>
<% end %>