UpdateCommissioner

This commit is contained in:
yamin
2017-08-23 15:03:53 +06:30
parent d6b8e8bdee
commit 621dfb03fe
4 changed files with 215 additions and 213 deletions

View File

@@ -6,10 +6,12 @@
<%= f.input :name %>
<%= f.label :emp_id %>
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %><br/>
<%= f.label :commission_type %>
<%= f.collection_select :commission_type, Commission.all, :id, :product_id, {prompt: 'Select Commission Type'}, class: 'form-control' %><br/>
<label><%= f.check_box :is_active %> Active </label>
</div>
<%= f.label :commission_type %>
<%= f.select :commission_type, Commission.all.map{ |l| [l.menu_item.name, l.id] } %>
<br/>
<label><%= f.check_box :is_active %> Active </label>
</div><br/>
<div class="form-actions">
<%= link_to 'Back', origami_commissioners_path, class: 'btn btn-success' %>

View File

@@ -26,7 +26,7 @@
</tr>
<tr>
<td style="width:20%">Commission Type</td>
<td><%= @commissioner.commission.product.name rescue '-' %></td>
<td><%= @commissioner.commission.menu_item.name rescue '-' %></td>
</tr>
<tr>
<td style="width:20%">Active</td>