meta/lib/recycledcloud_web/templates/billing/index.html.eex
2021-01-20 18:17:16 +01:00

65 lines
1.4 KiB
Elixir

<h1>Billing</h1>
<p>You currently are registered as billing entity #<%= @partner.id %>.</p>
<h2>Billing address</h2>
<%= form_for @partner_changeset, Routes.billing_path(@conn, :update), fn f -> %>
<%= if @partner_changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<%= text_input f, :display_name, placeholder: "Display name" %>
<%= error_tag f, :display_name %>
<br />
<%= text_input f, :street, placeholder: "Street" %>
<%= error_tag f, :street %>
<br />
<%= text_input f, :city, placeholder: "City" %>
<%= error_tag f, :city %>
<br />
<%= text_input f, :zip, placeholder: "Zip" %>
<%= error_tag f, :zip %>
<br />
<%= text_input f, :country, placeholder: "Country", readonly: true %>
<%= error_tag f, :country %>
<div>
<%= submit "Change address" %>
</div>
<% end %>
<h2>Invoices</h2>
<table>
<thead>
<tr>
<th>#</th>
<th>Created On</th>
<th>Due on</th>
<th>Amount</th>
<th>State</th>
</tr>
</thead>
<tbody>
<%= for invoice <- @invoices do %>
<tr>
<td><%= invoice.display_name %></td>
<td><%= invoice.invoice_date %></td>
<td><%= invoice.invoice_date_due %></td>
<td><%= invoice.amount_total %></td>
<td><%= invoice.state %></td>
</tr>
<% end %>
</tbody>
</table>