show and update changes in commission and report
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
<%= sale_item.qty %>
|
||||
</td>
|
||||
<td class='unit_price' width="20%">
|
||||
<%= sale_item.unit_price %>
|
||||
<%= sale_item.price %>
|
||||
</td>
|
||||
<td class='commissioner' width="20%">
|
||||
<% product_commission = ProductCommission.find_by_sale_item_id(sale_item.id) %>
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
<th colspan="7"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sale</th>
|
||||
<th>Sale Item</th>
|
||||
<th>Commissioner Name</th>
|
||||
<th>Product Name</th>
|
||||
<th>Qty</th>
|
||||
@@ -44,12 +46,10 @@
|
||||
|
||||
<% @transaction.each do |result| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= result.commissioner.name rescue '-' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= result.commission.menu_item.name rescue '-' %>
|
||||
</td>
|
||||
<td><%= result.sale_id rescue '-' %></td>
|
||||
<td><%= result.sale_item_id rescue '-' %></td>
|
||||
<td><%= result.commissioner.name rescue '-' %></td>
|
||||
<td><%= result.commission.menu_item.name rescue '-' %></td>
|
||||
<td><%= sprintf "%.2f", result.qty.to_f.to_d rescue '-' %></td>
|
||||
<td><%= sprintf "%.2f", result.price.to_f.to_d rescue '-' %></td>
|
||||
<td><%= sprintf "%.2f", result.amount.to_f.to_d rescue '-' %></td>
|
||||
@@ -61,7 +61,7 @@
|
||||
<% end %>
|
||||
|
||||
<tr style="border-top: 3px solid grey;">
|
||||
<td colspan="2"></td>
|
||||
<td colspan="4"></td>
|
||||
<td><b><%= sprintf("%.2f", total_qty) rescue '-' %></b></td>
|
||||
<td><b><%= sprintf("%.2f", total_price) rescue '-' %></b></td>
|
||||
<td><b><%= sprintf("%.2f", total_amount) rescue '-' %></b></td>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<%= f.input :commission_type, :collection => ['Percentage','Net Amount'], prompt: 'Select Commission Type', class: 'form-control' %>
|
||||
<%= f.input :amount %>
|
||||
<label><%= f.check_box :is_active %> Active </label>
|
||||
|
||||
|
||||
</div><br>
|
||||
<div class="form-actions">
|
||||
<%= link_to 'Back', settings_commissions_path, class: 'btn btn-success' %>
|
||||
|
||||
Reference in New Issue
Block a user