mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-04-02 07:01:59 -04:00
Added accounts to allow for assinging income account to items, and selecting default income account. Also added item type selection
This commit is contained in:
39
app/views/accounts/index.html.erb
Normal file
39
app/views/accounts/index.html.erb
Normal file
@@ -0,0 +1,39 @@
|
||||
<h1>Accounts</h1>
|
||||
|
||||
<%= form_with url: set_default_accounts_path, method: :patch, local: true do %>
|
||||
<table style="width:100%; border-collapse: collapse; margin-bottom: 1em;">
|
||||
<thead style="background-color: #f2f2f2;">
|
||||
<tr>
|
||||
<th style="padding: 8px; border: 1px solid #ddd;">Default</th>
|
||||
<th style="padding: 8px; border: 1px solid #ddd;">Name</th>
|
||||
<th style="padding: 8px; border: 1px solid #ddd;">Description</th>
|
||||
<th style="padding: 8px; border: 1px solid #ddd;">Classification</th>
|
||||
<th style="padding: 8px; border: 1px solid #ddd;">Active</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @accounts.each_with_index do |account, index| %>
|
||||
<tr style="background-color: <%= index.even? ? '#ffffff' : '#f9f9f9' %>;">
|
||||
<td style="text-align: center; border: 1px solid #ddd; padding: 8px;">
|
||||
<%= radio_button_tag "default_account_id", account.id, account.default %>
|
||||
</td>
|
||||
<td style="border: 1px solid #ddd; padding: 8px;"><%= account.name %></td>
|
||||
<td style="border: 1px solid #ddd; padding: 8px;"><%= account.description %></td>
|
||||
<td style="border: 1px solid #ddd; padding: 8px;"><%= account.classification %></td>
|
||||
<td style="text-align: center; border: 1px solid #ddd; padding: 8px;">
|
||||
<%= account.active ? "Yes" : "No" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" style="padding: 8px; text-align: right;">
|
||||
<%= submit_tag "Save Default Account", style: "padding: 6px 12px; font-weight: bold;" %>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user