<% content_for :page_specific_css do %> <%= stylesheet_link_tag "client_management/backend" %> <% end %>

Purchase Info <% if @purchase.total_amount == (@total_received_amount + @total_adjustable_amount) %> Received <% else %> Pending <% end %>

Contract Id : <%= @contract.uid %>
Contract Date : <%= @contract.created_at.strftime("%Y, %B %d") %>
Total Amount : <%= @purchase.total_amount %> NTD.
Amount Received : <%= @total_received_amount %> NTD.
Amount Adjusted : <%= @total_adjustable_amount %> NTD.
Amount Pending : <%= @purchase.total_amount - (@total_received_amount + @total_adjustable_amount) %> NTD.
<% ["client_management.receipt_number", "client_management.amount", "client_management.amount_received", "client_management.amount_pending", "client_management.receipt_status", :actions].each_with_index do |f,i| %> <%= thead(f) %> <% end %> <% if !@purchase.purchase_receipts.blank? %> <% @purchase.purchase_receipts.each do |pr| %> <% end %> <% else %> <% end %>
<%= pr.receipt_number %> <%= pr.amount %> <%= pr.amount_received %> <%= pr.amount_pending %> <% if pr.is_pending? %> Pending <% else %> Cleared <% end %> Edit
No receipts issued.
<% if @purchase.total_amount > (@total_received_amount + @total_adjustable_amount) %> Add Receipt <% end %> Back to Contract