stock_check report template

This commit is contained in:
Zin Lin Phyo
2017-09-06 18:27:58 +06:30
parent 784e740da3
commit 5e1e0cd5b9
16 changed files with 940 additions and 814 deletions

View File

@@ -22,11 +22,19 @@
%>
<tr>
<td><%= count %></td>
<td><%= item.item_code rescue ""%></td>
<td>
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
<% if menu_item.nil? %>
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
<% else %>
<%= menu_item.menu_item.name rescue "-" %>
- <%= menu_item.item_instance_name rescue "-" %>
<% end %>
</td>
<td><%= item.min_order_level %></td>
<td><%= item.max_stock_level %></td>
<td><%= item.created_by %></td>
<td><%= item.created_at%></td>
<td><%= Employee.find(item.created_by).name rescue '-' %></td>
<td><%= item.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></td>
</tr>
<% end %>
</table>

View File

@@ -1,22 +1,27 @@
<div class="row">
<div class="row">
<div class="col-lg-10 col-md-10 col-sm-10">
<%= render 'inventory_list' %>
<%= render 'inventory_list' %>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<%if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
<button id="back" type="button" class="btn btn-block btn-primary"> Back </button>
<%end%>
<button id="stock_taking" type="button" class="btn btn-block btn-primary"> New Stock Taking </button>
<% if current_login_employee.role == "administrator" || current_login_employee.role == 'manager' %>
<button id="back" type="button" class="btn btn-block btn-primary"> Back</button>
<% end %>
<button id="stock_taking" type="button" class="btn btn-block btn-primary"> New Stock Taking</button>
<button id="stock_check_report" type="button" class="btn btn-block btn-primary"> Stock Check Report</button>
</div>
</div>
<script>
$('#stock_taking').on('click',function(){
window.location.href = '/inventory/stock_checks';
})
$('#stock_check_report').on('click', function(){
window.location.href = '';
})
$('#stock_taking').on('click', function () {
window.location.href = '<%= inventory_stock_checks_path %>';
});
$('#stock_check_report').on('click', function () {
window.location.href = '<%= reports_stock_check_index_path %>';
});
$('#back').on('click', function () {
window.location.href = '<%= dashboard_path %>';
});
</script>