Purchase for contract : <%= contract.uid %>
Total : <%= purchase.total_amount %> NTD.
Amount Received : <%= purchase.total_amount_recieved %> NTD.
Time : <%= purchase.created_at.strftime("%d %B, %Y %H:%M") %>
<% if !purchase.purchase_receipts.blank? %>
<% purchase.purchase_receipts.each do |receipt| %>
Receipt Number |
Total Amount |
Amount Received |
Amount Pending |
Receipt Status |
<%= receipt.receipt_number %> |
<%= receipt.amount %> |
<%= receipt.amount_received %> |
<%= receipt.amount_pending %> |
<% if receipt.is_pending? %>
Pending
<% else %>
Cleared
<% end %>
|
<% end %>
<% end %>
<% if purchase.cleared? %>
Cleared
<% else %>
Pending
<% end %>
<% if !purchase.purchase_receipts.blank? %>
Receipts
<% end %>
<% end %>