update report and inventory layout design
This commit is contained in:
@@ -198,5 +198,20 @@ section.content {
|
||||
background-color: #007d72 !important;
|
||||
}
|
||||
|
||||
.m-t-1{
|
||||
margin-top: 1px;
|
||||
}
|
||||
.m-t-2{
|
||||
margin-top: 2px;
|
||||
}
|
||||
.m-t-3{
|
||||
margin-top: 3px;
|
||||
}
|
||||
.m-t-4{
|
||||
margin-top: 4px;
|
||||
}
|
||||
.m-t-7{
|
||||
margin-top: 7px;
|
||||
}
|
||||
/* End Reset Theme */
|
||||
/* *************************************************** */
|
||||
@@ -2,18 +2,21 @@ class Reports::CommissionController < BaseReportController
|
||||
# authorize_resource :class => false
|
||||
|
||||
def index
|
||||
from_date = DateTime.now.beginning_of_day.utc.getlocal
|
||||
to_date = DateTime.now.end_of_day.utc.getlocal
|
||||
unless params[:daterange].blank?
|
||||
from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
|
||||
to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
|
||||
@daterange = params[:daterange]
|
||||
end
|
||||
# from_date = DateTime.now.beginning_of_day.utc.getlocal
|
||||
# to_date = DateTime.now.end_of_day.utc.getlocal
|
||||
# unless params[:daterange].blank?
|
||||
# from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
|
||||
# to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
|
||||
# @daterange = params[:daterange]
|
||||
# end
|
||||
from_date, to_date = get_date_range_from_params
|
||||
|
||||
commissioner = params[:commissioner].to_i
|
||||
@com_id = commissioner
|
||||
@commissioner = Commissioner.active.all
|
||||
|
||||
@transaction = ProductCommission.get_transaction(from_date, to_date, commissioner)
|
||||
|
||||
@from = from_date
|
||||
@to = to_date
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@ class Reports::StockCheckController < BaseReportController
|
||||
# authorize_resource :class => false
|
||||
|
||||
def index
|
||||
from_date = DateTime.now.beginning_of_day.utc.getlocal
|
||||
to_date = DateTime.now.end_of_day.utc.getlocal
|
||||
unless params[:daterange].blank?
|
||||
from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
|
||||
to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
|
||||
@daterange = params[:daterange]
|
||||
end
|
||||
# from_date = DateTime.now.beginning_of_day.utc.getlocal
|
||||
# to_date = DateTime.now.end_of_day.utc.getlocal
|
||||
# unless params[:daterange].blank?
|
||||
# from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
|
||||
# to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
|
||||
# @daterange = params[:daterange]
|
||||
# end
|
||||
from_date, to_date = get_date_range_from_params
|
||||
@item_code = params[:item_code]
|
||||
@inventory_definitions = InventoryDefinition.active.all
|
||||
|
||||
|
||||
@@ -1,48 +1,34 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8"><h2> Inventoy Product Lists</h2></div>
|
||||
<div class="col-md-4"><button id='new_inventory_product' class='btn bg-blue waves-effect' style='margin-top:15px;'>New Inventory Product</button></div>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Product</th>
|
||||
<th>Min Order</th>
|
||||
<th>Max Stock</th>
|
||||
<th>Created by</th>
|
||||
<th>Created Time</th>
|
||||
</tr>
|
||||
<%
|
||||
count = 0
|
||||
@products.each do |item|
|
||||
count += 1
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></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><%= 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>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Product</th>
|
||||
<th>Min Order</th>
|
||||
<th>Max Stock</th>
|
||||
<th>Created by</th>
|
||||
<th>Created Time</th>
|
||||
</tr>
|
||||
<%
|
||||
count = 0
|
||||
@products.each do |item|
|
||||
count += 1
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></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><%= 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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#new_inventory_product').on('click',function(){
|
||||
window.location.href = '/inventory/inventory_definitions/new';
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,17 +1,48 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-10 col-md-10 col-sm-10">
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">Inventory</li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<div class="m-b-10 clearfix">
|
||||
<button id="stock_check_report" type="button" class="btn bg-blue float-right waves-effect" style='margin-left:5px;'> Stock Check Report
|
||||
</button>
|
||||
<button id="stock_taking" type="button" class="btn bg-blue float-right waves-effect" style='margin-left:5px;'> New Stock Taking</button>
|
||||
<button id='new_inventory_product' class='btn btn-primary float-right waves-effect' style='margin-left:5px;'><%= t("views.btn.new") + " " + (t :inventory) %>
|
||||
</button>
|
||||
</div>
|
||||
<div class="card">
|
||||
<%= 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 bg-default waves-effect"> Back</button>
|
||||
<% end %>
|
||||
<button id="stock_taking" type="button" class="btn bg-blue waves-effect"> New Stock Taking</button>
|
||||
<button id="stock_check_report" type="button" class="btn bg-blue waves-effect"> Stock Check Report</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">list BUTTON LISTS</i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.btn.new") + " " + (t :inventory) %> - to create new inventory <br>
|
||||
</p>
|
||||
<p>
|
||||
2) New Stock Taking - to create new Stock Taking <br>
|
||||
</p>
|
||||
<p>
|
||||
3) Stock Check Report - to go Stock Check Report List <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list LINK LISTS</i> </h5>
|
||||
<p>1) Home / Back - go to dashboard</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$('#stock_taking').on('click', function () {
|
||||
window.location.href = '<%= inventory_stock_checks_path %>';
|
||||
@@ -21,8 +52,8 @@
|
||||
window.location.href = '<%= reports_stock_check_index_path %>';
|
||||
});
|
||||
|
||||
$('#back').on('click', function () {
|
||||
window.location.href = '<%= dashboard_path %>';
|
||||
});
|
||||
$('#new_inventory_product').on('click',function(){
|
||||
window.location.href = '/inventory/inventory_definitions/new';
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="p-l-10">
|
||||
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
@@ -10,8 +10,8 @@
|
||||
<% Product.order("name desc").pluck(:name, :item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-3">
|
||||
<label class="control-label"><abbr title="required">*</abbr> Item</label>
|
||||
<div class="col-md-4">
|
||||
<label class="control-label"><abbr title="required">*</abbr>Select Item</label>
|
||||
<select class="form-control item_code_place" id="item">
|
||||
<% if !@inventory_definition.item_code.nil? %>
|
||||
<% menuiteminstance = MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code) %>
|
||||
@@ -21,7 +21,7 @@
|
||||
<% code = menuiteminstance.menu_item.item_code %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<option value=""></option>
|
||||
<option value="">Select Item</option>
|
||||
<% arr.each do |a| %>
|
||||
<% if a[1] == code %>
|
||||
<option value="<%= a[1] %>" selected><%= a[0] %></option>
|
||||
@@ -48,19 +48,32 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit 'Submit', class: 'btn bg-blue waves-effect' %>
|
||||
<%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
<h5><i class="material-icons md-18">list INPUT LISTS</i> </h5>
|
||||
<p>
|
||||
1) Select Item - select to create for new inventory <br>
|
||||
</p>
|
||||
<p>
|
||||
2) Min Order Level - to write minimun number with type Integer/Numeric <br>
|
||||
</p>
|
||||
<p>
|
||||
3) Max Stock Level - to write minimun number with type Integer/Numeric for check stock<br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list BUTTON LISTS</i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.btn.submit") %> - to create new inventory <br>
|
||||
</p>
|
||||
|
||||
<h5><i class="material-icons md-18">list LINK LISTS</i> </h5>
|
||||
<p>1) Home / Back - go to dashboard</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,10 +83,10 @@
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".item_code_place").select2({
|
||||
placeholder: 'Select Item'
|
||||
});
|
||||
$("select#inventory_definition_item_code").select2();
|
||||
// $(".item_code_place").select2({
|
||||
// placeholder: 'Select Item'
|
||||
// });
|
||||
// $("select#inventory_definition_item_code").select2();
|
||||
|
||||
$(".item_code_place").on('change', function (event) {
|
||||
var ajax_url = "<%= settings_find_item_instance_path %>";
|
||||
@@ -90,7 +103,7 @@
|
||||
$("select#inventory_definition_item_code").append(itemlist);
|
||||
}
|
||||
// $("select#inventory_definition_item_code").append(itemlist);
|
||||
$("select#inventory_definition_item_code").select2();
|
||||
// $("select#inventory_definition_item_code").select2();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= inventory_path %>">Product Inventory</a></li>
|
||||
<li class="breadcrumb-item active">Edit</li>
|
||||
<li class="breadcrumb-item active">New</li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
|
||||
</span>
|
||||
|
||||
@@ -1,85 +1,95 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">Stock Check</li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<!-- <div class="m-b-10 clearfix">
|
||||
<%= link_to t("views.btn.new"),new_settings_account_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
|
||||
</div -->
|
||||
<div class="card">
|
||||
<div class="p-l-15 p-r-15 p-t-10">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
|
||||
<!-- <label for="remark">Remark</label> -->
|
||||
<input type='text' id='stock_check_reason' class='form-control' placeholder="Set Stock Check Reason" value=''/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
|
||||
<!-- <label for="password_2">Item</label> -->
|
||||
<select class='form-control' id='product_sku'>
|
||||
<option value="">Select Product</option>
|
||||
<% @inventory_definitions.each do |id| %>
|
||||
<option value="<%= id.item_code %>">
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
|
||||
<% end %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
|
||||
<!-- <label for="email_address_2">Qty</label> -->
|
||||
<input type='text' class='form-control' placeholder="Qty" id='product_qty' value=''/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-4">
|
||||
<button class="btn btn-primary form-control" id='save_to_stock_check'> Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input type='text' id='stock_check_reason' class='form-control' placeholder="Set Stock Check Reason" value=''/>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-2">
|
||||
Item
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<select class='form-control' id='product_sku'>
|
||||
<option value="">Select Product</option>
|
||||
<% @inventory_definitions.each do |id| %>
|
||||
<option value="<%= id.item_code %>">
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
|
||||
<% end %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-2">
|
||||
Qty
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<input type='text' class='form-control' placeholder="Qty" id='product_qty' value=''/>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-7">
|
||||
<button class="btn btn-primary form-control" id='save_to_stock_check'> Save</button>
|
||||
<div class="col-md-6">
|
||||
<table class="table table-striped" id='stock_item'>
|
||||
<tr>
|
||||
<!--<th>#</th>-->
|
||||
<th>Product</th>
|
||||
<th>Balance</th>
|
||||
<th><button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish</button></th>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="3">
|
||||
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish</button></td>
|
||||
</tr> -->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped" id='stock_item'>
|
||||
<tr>
|
||||
<!--<th>#</th>-->
|
||||
<th>Product</th>
|
||||
<th>Balance</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="row">
|
||||
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='back'> Back</button>
|
||||
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#product_sku').select2({
|
||||
allowClear: true,
|
||||
placeholder: 'Select Product'
|
||||
})
|
||||
});
|
||||
|
||||
var count = 0;
|
||||
|
||||
@@ -92,8 +102,8 @@
|
||||
//+ '<td>' + count + '</td>'
|
||||
+ '<td><input type=hidden value="' + product_sku + '" id="item_sku_' + count + '" name=' + count + '/>'
|
||||
+ product_name + '</td>'
|
||||
+ '<td><input type=text value="' + product_qty + '" id="item_qty_' + count + '" name=' + count + '/></td>'
|
||||
+ '<td><input type=button value="X" id="item_remove_' + count + '" name=' + count + ' onclick="remove_row('+ count +')"/></td>'
|
||||
+ '<td><input type=text value="' + product_qty + '" class="form-control col-md-9" id="item_qty_' + count + '" name=' + count + '/></td>'
|
||||
+ '<td><input type=button value="X" class="btn btn-danger p-l-15 p-r-15" id="item_remove_' + count + '" name=' + count + ' onclick="remove_row('+ count +')"/></td>'
|
||||
+ '</tr>';
|
||||
$('#stock_item').append(tr);
|
||||
// $('#product_sku').val('');
|
||||
@@ -124,10 +134,6 @@
|
||||
})
|
||||
});
|
||||
|
||||
$('#back').on('click', function () {
|
||||
window.location.href = '/inventory';
|
||||
});
|
||||
|
||||
function remove_row(row) {
|
||||
$("#item_remove_"+row).parent().parent().remove();
|
||||
}
|
||||
|
||||
@@ -1,72 +1,92 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a>Stock Check</li>
|
||||
<li class="breadcrumb-item active">Detail</li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<input type='hidden' id='stock_check_id' value='<%= @check.id %>'/>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Check by
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= Employee.find(@check.check_by).name rescue '' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Check At
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= @check.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Reason
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= @check.reason %>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<table class="table table-striped col-md-12">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Product</th>
|
||||
<th>Stock Count</th>
|
||||
<th>Stock Balance</th>
|
||||
<th>Different</th>
|
||||
<th>Remark</th>
|
||||
</tr>
|
||||
<%
|
||||
count = 0
|
||||
@check.stock_check_items.each do |item|
|
||||
count += 1
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></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.stock_count %></td>
|
||||
<td><%= item.stock_balance %></td>
|
||||
<td><%= item.different %></td>
|
||||
<td><%= item.remark %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<div class="col-xs-12 col-sm-12 col-md-10 col-lg-10">
|
||||
<div class="card">
|
||||
<input type='hidden' id='stock_check_id' value='<%= @check.id %>'/>
|
||||
<div class="p-l-20 p-t-15">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Check by
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= Employee.find(@check.check_by).name rescue '' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Check At
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= @check.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Reason
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= @check.reason %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped col-md-12">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Product</th>
|
||||
<th>Stock Count</th>
|
||||
<th>Stock Balance</th>
|
||||
<th>Different</th>
|
||||
<th>Remark</th>
|
||||
</tr>
|
||||
<%
|
||||
count = 0
|
||||
@check.stock_check_items.each do |item|
|
||||
count += 1
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></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.stock_count %></td>
|
||||
<td><%= item.stock_balance %></td>
|
||||
<td><%= item.different %></td>
|
||||
<td><%= item.remark %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button id="back" type="button" class="btn btn-block btn-primary"> Back</button>
|
||||
<button id="save_to_journal" type="button" class="btn btn-block btn-primary"> Save to Journal</button>
|
||||
<button id="print" type="button" class="btn btn-block btn-primary"> Print</button>
|
||||
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
||||
|
||||
<div class="body">
|
||||
<button id="save_to_journal" type="button" class="btn btn-block btn-primary"> Save to Journal</button>
|
||||
<button id="print" type="button" class="btn btn-block btn-primary"> Print</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$('#save_to_journal').on('click', function () {
|
||||
|
||||
@@ -1,41 +1,50 @@
|
||||
|
||||
<div class="p-l-15">
|
||||
<%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="">Select Date Range</label>
|
||||
<% if @daterange %>
|
||||
<input class="form-control" name="daterange" id="daterange" value="<%= @daterange %>" type="text" placeholder="Date Range" readonly="true">
|
||||
<% else %>
|
||||
<input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true">
|
||||
<% end %>
|
||||
<!-- <div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="">Select Date Range</label>
|
||||
<% if @daterange %>
|
||||
<input class="form-control" name="daterange" id="daterange" value="<%= @daterange %>" type="text" placeholder="Date Range" readonly="true">
|
||||
<% else %>
|
||||
<input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true">
|
||||
<% end %>
|
||||
</div> -->
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="font-14">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="font-14">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">Commissioner</label>
|
||||
<select class="form-control" name="commissioner" id="commissioner">
|
||||
<option value=""></option>
|
||||
<% @commissioner.each do |c| %>
|
||||
<% if @com_id == c.id %>
|
||||
<option value="<%= c.id %>" selected><%= c.name %></option>
|
||||
<% else %>
|
||||
<option value="<%= c.id %>"><%= c.name %></option>
|
||||
<% end %> %>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
|
||||
<br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-info wave-effects'>
|
||||
</div>
|
||||
<!-- <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
|
||||
<input type="button" value="Clear Filter" id="clear_filter" class='btn btn-danger'>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="">Commissioner</label>
|
||||
<select class="form-control" name="commissioner" id="commissioner">
|
||||
<option value=""></option>
|
||||
<% @commissioner.each do |c| %>
|
||||
<% if @com_id == c.id %>
|
||||
<option value="<%= c.id %>" selected><%= c.name %></option>
|
||||
<% else %>
|
||||
<option value="<%= c.id %>"><%= c.name %></option>
|
||||
<% end %> %>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
|
||||
<input type="button" value="Clear Filter" id="clear_filter" class='btn btn-danger'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
</div>
|
||||
<!-- <script type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
@@ -80,3 +89,4 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
-->
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- <div class="container"> -->
|
||||
<!-- <div class="row"> -->
|
||||
<div class="text-right">
|
||||
<a href="javascript:export_to('<%= reports_commission_index_path %>.xls')" class="btn btn-default">Export to
|
||||
<a href="javascript:export_to('<%= reports_commission_index_path %>.xls')" class="btn btn-info wave-effects">Export to
|
||||
Excel</a>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
@@ -30,7 +30,7 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %></th>
|
||||
<th colspan="9"> 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>
|
||||
|
||||
@@ -1,45 +1,46 @@
|
||||
<div class="p-l-15">
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-2">
|
||||
<label class="font-20">Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="">Select Period</option>
|
||||
<option value="0">Today</option>
|
||||
<option value="1">Yesterday</option>
|
||||
<option value="2">This week</option>
|
||||
<option value="3">Last week</option>
|
||||
<option value="4">Last 7 days</option>
|
||||
<option value="5">This month</option>
|
||||
<option value="6">Last month</option>
|
||||
<option value="7">Last 30 days</option>
|
||||
<option value="8">This year</option>
|
||||
<option value="9">Last year</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-2">
|
||||
<label>Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="">Select Period</option>
|
||||
<option value="0">Today</option>
|
||||
<option value="1">Yesterday</option>
|
||||
<option value="2">This week</option>
|
||||
<option value="3">Last week</option>
|
||||
<option value="4">Last 7 days</option>
|
||||
<option value="5">This month</option>
|
||||
<option value="6">Last month</option>
|
||||
<option value="7">Last 30 days</option>
|
||||
<option value="8">This year</option>
|
||||
<option value="9">Last year</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label class="">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label class="">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-1 margin-top-20">
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<div class="form-group col-md-2">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="font-20">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label class="font-20">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label class="font-20">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-1 ">
|
||||
<br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li>Credit Payment List Report</li>
|
||||
</ul>
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">Credit Payment Report</li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<!-- <div class="container"> -->
|
||||
<%= render :partial=>'shift_sale_report_filter',
|
||||
:locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_credit_payment_index_path} %>
|
||||
@@ -14,7 +16,7 @@
|
||||
<!-- <div class="container"> -->
|
||||
<!-- <div class="row"> -->
|
||||
<div class="text-right">
|
||||
<a href="javascript:export_to('<%=reports_credit_payment_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
|
||||
<a href="javascript:export_to('<%=reports_credit_payment_index_path%>.xls')" class = "btn btn-info wave-effects">Export to Excel</a>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
@@ -32,7 +34,7 @@
|
||||
<% end %>
|
||||
<tr>
|
||||
<th> Shift Name </th>
|
||||
<th> Receive No</th>
|
||||
<th> Receipt No</th>
|
||||
<th> Cashier Name</th>
|
||||
<th> Customer Name</th>
|
||||
<th> Credit Amount </th>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
<div class="p-l-15">
|
||||
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label>Select Period</label>
|
||||
<label class="font-14">Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="">Select Period</option>
|
||||
<option value="0">Today</option>
|
||||
@@ -22,14 +23,15 @@
|
||||
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="">From</label>
|
||||
<label class="font-14">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="">To</label>
|
||||
<label class="font-14">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
|
||||
<label></label><br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,7 +86,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
@@ -1,33 +1,22 @@
|
||||
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">Daily Sale Report</li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">Daily Sale Report</li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12 col-lg-12 col-sm-12 ">
|
||||
|
||||
<!-- <div class="row">
|
||||
<div class="col-md-12 col-lg-12"> -->
|
||||
<!-- <div class="container"> -->
|
||||
<%= render :partial=>'shift_sale_report_filter',
|
||||
:locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_dailysale_index_path} %>
|
||||
<hr />
|
||||
<!-- </div> -->
|
||||
<!-- </div>
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="row"> -->
|
||||
<!-- <div class="container"> -->
|
||||
<div class=" text-right">
|
||||
<a href="javascript:export_to('<%=reports_dailysale_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<%= render :partial=>'shift_sale_report_filter',
|
||||
:locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_dailysale_index_path} %>
|
||||
<hr />
|
||||
<div class=" text-right">
|
||||
<a href="javascript:export_to('<%=reports_dailysale_index_path%>.xls')" class = "btn btn-info wave-effects">Export to Excel</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12">
|
||||
|
||||
@@ -1,50 +1,52 @@
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<div class="p-l-15">
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label>Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="">Select Period</option>
|
||||
<option value="0">Today</option>
|
||||
<option value="1">Yesterday</option>
|
||||
<option value="2">This week</option>
|
||||
<option value="3">Last week</option>
|
||||
<option value="4">Last 7 days</option>
|
||||
<option value="5">This month</option>
|
||||
<option value="6">Last month</option>
|
||||
<option value="7">Last 30 days</option>
|
||||
<option value="8">This year</option>
|
||||
<option value="9">Last year</option>
|
||||
</select>
|
||||
</div>
|
||||
<% if defined? payments %>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label>Select Payments</label>
|
||||
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20">
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="">Select Period</option>
|
||||
<option value="0">Today</option>
|
||||
<option value="1">Yesterday</option>
|
||||
<option value="2">This week</option>
|
||||
<option value="3">Last week</option>
|
||||
<option value="4">Last 7 days</option>
|
||||
<option value="5">This month</option>
|
||||
<option value="6">Last month</option>
|
||||
<option value="7">Last 30 days</option>
|
||||
<option value="8">This year</option>
|
||||
<option value="9">Last year</option>
|
||||
</select>
|
||||
</div>
|
||||
<% if defined? payments %>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">Select Payments</label>
|
||||
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="font-14">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20">
|
||||
<br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- <div class="container"> -->
|
||||
<!-- <div class="row"> -->
|
||||
<div class="text-right">
|
||||
<a href="javascript:export_to('<%=reports_receipt_no_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
|
||||
<a href="javascript:export_to('<%=reports_receipt_no_index_path%>.xls')" class = "btn btn-info wave-effects">Export to Excel</a>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
@@ -30,14 +30,14 @@
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<th colspan="7"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
|
||||
<th colspan="9"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
|
||||
</tr>
|
||||
<% if @shift_from %>
|
||||
<tr>
|
||||
<% if @shift_data.employee %>
|
||||
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
|
||||
<% end %>
|
||||
<th colspan="7">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
|
||||
<th colspan="9">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,130 +1,120 @@
|
||||
<div class="p-l-15">
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="">Select Period</option>
|
||||
<option value="0">Today</option>
|
||||
<option value="1">Yesterday</option>
|
||||
<option value="2">This week</option>
|
||||
<option value="3">Last week</option>
|
||||
<option value="4">Last 7 days</option>
|
||||
<option value="5">This month</option>
|
||||
<option value="6">Last month</option>
|
||||
<option value="7">Last 30 days</option>
|
||||
<option value="8">This year</option>
|
||||
<option value="9">Last year</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <input type="hidden" name="report_type" value="sale_item" id="sel_sale_type"> -->
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="font-14">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="font-14">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
|
||||
<br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label>Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="">Select Period</option>
|
||||
<option value="0">Today</option>
|
||||
<option value="1">Yesterday</option>
|
||||
<option value="2">This week</option>
|
||||
<option value="3">Last week</option>
|
||||
<option value="4">Last 7 days</option>
|
||||
<option value="5">This month</option>
|
||||
<option value="6">Last month</option>
|
||||
<option value="7">Last 30 days</option>
|
||||
<option value="8">This year</option>
|
||||
<option value="9">Last year</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <input type="hidden" name="report_type" value="sale_item" id="sel_sale_type"> -->
|
||||
<!-- <div class="form-group col-md-2">
|
||||
<label>Select Type</label>
|
||||
<select name="sale_type" id="sel_sale_type" class="form-control">
|
||||
<option value="0">All Sale Type</option>
|
||||
<option value="1">Revenue Only</option>
|
||||
<option value="2">Discount Only</option>
|
||||
<option value="3">Void Only</option>
|
||||
<option value="4">Taxes Only</option>
|
||||
<option value="5">Other Amount Only</option>
|
||||
</select>
|
||||
</div> -->
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
|
||||
<br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#custom_excel').hide();
|
||||
|
||||
$('#custom_excel').click(function(){
|
||||
var url = $('#custom_excel').attr('data-url');
|
||||
$('#frm_report').attr('action',url)
|
||||
$('#frm_report').submit();
|
||||
$(function(){
|
||||
$('#custom_excel').hide();
|
||||
|
||||
$('#custom_excel').click(function(){
|
||||
var url = $('#custom_excel').attr('data-url');
|
||||
$('#frm_report').attr('action',url)
|
||||
$('#frm_report').submit();
|
||||
// window.location = url;
|
||||
});
|
||||
|
||||
var item = $('#item').val();
|
||||
var payment_type = $('#payment_type');
|
||||
|
||||
if(item == 'order'){
|
||||
$('#cashier').hide();
|
||||
$('#waiter').show();
|
||||
if(payment_type){
|
||||
$('#payment_type').hide();
|
||||
}
|
||||
}
|
||||
else if(item == 'sale'){
|
||||
$('#waiter').hide();
|
||||
$('#cashier').show();
|
||||
}
|
||||
else{
|
||||
$('#waiter').hide();
|
||||
$('#cashier').show();
|
||||
$("#item").val('sale');
|
||||
}
|
||||
});
|
||||
|
||||
<% if params[:shift_name].to_i > 0%>
|
||||
var item = $('#item').val();
|
||||
var payment_type = $('#payment_type');
|
||||
|
||||
if(item == 'order'){
|
||||
$('#cashier').hide();
|
||||
$('#waiter').show();
|
||||
if(payment_type){
|
||||
$('#payment_type').hide();
|
||||
}
|
||||
}
|
||||
else if(item == 'sale'){
|
||||
$('#waiter').hide();
|
||||
$('#cashier').show();
|
||||
}
|
||||
else{
|
||||
$('#waiter').hide();
|
||||
$('#cashier').show();
|
||||
$("#item").val('sale');
|
||||
}
|
||||
});
|
||||
|
||||
<% if params[:shift_name].to_i > 0%>
|
||||
shift_id = '<%= params[:shift_name] %>'
|
||||
local_date = '<%= @shift_from %> - <%= @shift_to %> '
|
||||
var shift = $('#shift_name');
|
||||
str = '<option value="'+ shift_id +'" '+ 'selected = "selected"' +'>' + local_date + '</option>';
|
||||
shift.append(str);
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
$("#from").val("<%=params[:from] rescue '-'%>");
|
||||
$("#to").val("<%=params[:to] rescue '-'%>");
|
||||
$("#sel_period").val(<%=params[:period] rescue '-'%>);
|
||||
$("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
|
||||
$("#from").val("<%=params[:from] rescue '-'%>");
|
||||
$("#to").val("<%=params[:to] rescue '-'%>");
|
||||
$("#sel_period").val(<%=params[:period] rescue '-'%>);
|
||||
$("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
|
||||
|
||||
|
||||
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
|
||||
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
|
||||
$("#rd_period_type_1").attr("checked","checked");
|
||||
<% else %>
|
||||
<% else %>
|
||||
$("#rd_period_type_0").attr("checked","checked");
|
||||
<% end %>
|
||||
$(".btn-group button").removeClass("active");
|
||||
<% report_type = params[:report_type].blank? ? "0" : params[:report_type] %>
|
||||
$("#btn_report_type_<%= report_type %>").addClass("active");
|
||||
<% end %>
|
||||
$(".btn-group button").removeClass("active");
|
||||
<% report_type = params[:report_type].blank? ? "0" : params[:report_type] %>
|
||||
$("#btn_report_type_<%= report_type %>").addClass("active");
|
||||
|
||||
$('#item').change(function(){
|
||||
var item = $('#item').val();
|
||||
var payment_type = $('#payment_type');
|
||||
$('#item').change(function(){
|
||||
var item = $('#item').val();
|
||||
var payment_type = $('#payment_type');
|
||||
|
||||
if(item == 'sale'){
|
||||
$('#waiter').hide();
|
||||
$('#cashier').show();
|
||||
if(payment_type){
|
||||
$('#payment_type').show();
|
||||
if(item == 'sale'){
|
||||
$('#waiter').hide();
|
||||
$('#cashier').show();
|
||||
if(payment_type){
|
||||
$('#payment_type').show();
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$('#cashier').hide();
|
||||
$('#waiter').show();
|
||||
if(payment_type){
|
||||
$('#payment_type').hide();
|
||||
else{
|
||||
$('#cashier').hide();
|
||||
$('#waiter').show();
|
||||
if(payment_type){
|
||||
$('#payment_type').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<!-- <div class="container"> -->
|
||||
<!-- <div class="row"> -->
|
||||
<div class="text-right">
|
||||
<a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
|
||||
<a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-info wave-effects ">Export to Excel</a>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label>Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="0">Today</option>
|
||||
<option value="1">Yesterday</option>
|
||||
<option value="2">This week</option>
|
||||
<option value="3">Last week</option>
|
||||
<option value="4">Last 7 days</option>
|
||||
<option value="5">This month</option>
|
||||
<option value="6">Last month</option>
|
||||
<option value="7">Last 30 days</option>
|
||||
<option value="8">This year</option>
|
||||
<option value="9">Last year</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"><br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-l-15">
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="0">Today</option>
|
||||
<option value="1">Yesterday</option>
|
||||
<option value="2">This week</option>
|
||||
<option value="3">Last week</option>
|
||||
<option value="4">Last 7 days</option>
|
||||
<option value="5">This month</option>
|
||||
<option value="6">Last month</option>
|
||||
<option value="7">Last 30 days</option>
|
||||
<option value="8">This year</option>
|
||||
<option value="9">Last year</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<!-- <label class="font-14">Select Shift Period</label> -->
|
||||
<label class="font-14">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="font-14">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"><br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- <div class="container"> -->
|
||||
<!-- <div class="row"> -->
|
||||
<div class="text-right">
|
||||
<a href="javascript:export_to('<%=reports_shiftsale_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
|
||||
<a href="javascript:export_to('<%=reports_shiftsale_index_path%>.xls')" class = "btn btn-info wave-effects">Export to Excel</a>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
@@ -1,86 +1,95 @@
|
||||
|
||||
<div class="p-l-15">
|
||||
<%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<!-- <div class="form-group col-md-3">
|
||||
<label class="">Select Date Range</label>
|
||||
<% if @daterange %>
|
||||
<input class="form-control" name="daterange" id="daterange" value="<%= @daterange %>" type="text" placeholder="Date Range" readonly="true">
|
||||
<% else %>
|
||||
<input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true">
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label class="">Definition Item</label>
|
||||
</div> -->
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="font-14">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="font-14">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label class="font-14">Definition Item</label>
|
||||
<select class="form-control" name="item_code" id="item_code">
|
||||
<option value="">Select Product</option>
|
||||
<% @inventory_definitions.each do |id| %>
|
||||
<option value="<%= id.item_code %>">
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
|
||||
<% end %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-2 margin-top-20">
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
<div class="form-group col-md-2 margin-top-20">
|
||||
<option value="<%= id.item_code %>">
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
|
||||
<% end %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-2 margin-top-20"><br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
<!-- <div class="form-group col-md-2 margin-top-20">
|
||||
<input type="button" value="Clear Filter" id="clear_filter" class='btn btn-danger'>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#item_code').select2({
|
||||
/* $('#item_code').select2({
|
||||
placeholder: 'Select Product',
|
||||
allowClear: true
|
||||
});
|
||||
});*/
|
||||
|
||||
$('#clear_filter').click(function () {
|
||||
$('#daterange').val('');
|
||||
$('#item_code').val('').text('');
|
||||
});
|
||||
// $('#clear_filter').click(function () {
|
||||
// $('#daterange').val('');
|
||||
// $('#item_code').val('').text('');
|
||||
// });
|
||||
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD'
|
||||
}
|
||||
},
|
||||
function (start, end, label) {
|
||||
$('input[name="daterange"]').val(start.format('YYYY-MM-DD') + ' - ' + end.format('YYYY-MM-DD'));
|
||||
});
|
||||
// $('input[name="daterange"]').daterangepicker({
|
||||
// autoUpdateInput: false,
|
||||
// ranges: {
|
||||
// 'Today': [moment(), moment()],
|
||||
// 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
// 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||
// 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
// 'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
// 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
// },
|
||||
// locale: {
|
||||
// format: 'YYYY-MM-DD'
|
||||
// }
|
||||
// },
|
||||
// function (start, end, label) {
|
||||
// $('input[name="daterange"]').val(start.format('YYYY-MM-DD') + ' - ' + end.format('YYYY-MM-DD'));
|
||||
// });
|
||||
|
||||
$('input[name="daterange"]').on('apply.daterangepicker', function (ev, picker) {
|
||||
$('input[name="daterange"]').val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
// $('input[name="daterange"]').on('apply.daterangepicker', function (ev, picker) {
|
||||
// $('input[name="daterange"]').val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
|
||||
from_date = picker.startDate.format('YYYY-MM-DD 00:00:00');
|
||||
to_date = picker.endDate.format('YYYY-MM-DD 23:59:59');
|
||||
});
|
||||
// from_date = picker.startDate.format('YYYY-MM-DD 00:00:00');
|
||||
// to_date = picker.endDate.format('YYYY-MM-DD 23:59:59');
|
||||
// });
|
||||
|
||||
$('input[name="daterange"]').on('cancel.daterangepicker', function (ev, picker) {
|
||||
$('input[name="daterange"]').val('');
|
||||
});
|
||||
// $('input[name="daterange"]').on('cancel.daterangepicker', function (ev, picker) {
|
||||
// $('input[name="daterange"]').val('');
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- <div class="container"> -->
|
||||
<!-- <div class="row"> -->
|
||||
<div class="text-right">
|
||||
<a href="javascript:export_to('<%= reports_stock_check_index_path %>.xls')" class="btn btn-default">Export to
|
||||
<a href="javascript:export_to('<%= reports_stock_check_index_path %>.xls')" class="btn btn-info wave-effects">Export to
|
||||
Excel</a>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
<div class="p-l-15">
|
||||
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||
<% if period_type != false %>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label>Select Period</label>
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-20">Select Period</label>
|
||||
<select name="period" id="sel_period" class="form-control">
|
||||
<option value="">Select Period</option>
|
||||
<option value="0">Today</option>
|
||||
@@ -19,27 +19,28 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-2">
|
||||
<!-- <label class="">Select Shift Period</label> -->
|
||||
<label class="">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
|
||||
<label class="font-20">From</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-20">To</label>
|
||||
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="">All Shift</label>
|
||||
<div class="form-group col-lg-3 col-md-3 col-sm-3">
|
||||
<label class="font-20">All Shift</label>
|
||||
<select class="form-control select" name="shift_name" id="shift_name" >
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20">
|
||||
<div class=" col-lg-1 col-md-1 col-sm-1 margin-top-20">
|
||||
<br>
|
||||
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#custom_excel').hide();
|
||||
|
||||
@@ -36,7 +36,7 @@ en:
|
||||
category: "Category"
|
||||
processed: "Processed"
|
||||
competed: "Completed"
|
||||
tax_profile: "Tad Profile"
|
||||
tax_profile: "Tax Profile"
|
||||
payment_methods: "Payment Methods"
|
||||
accounts: "Accounts"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user