Merge branch 'r-1902001-01' of gitlab.com:code2lab/SXRestaurant into r-1902001-01
This commit is contained in:
@@ -135,8 +135,6 @@
|
||||
<div class="pin_pad left" data-value="0">0</div>
|
||||
<div class="pin_pad bg-blue-grey" data-value="CLR">CLR</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css"> -->
|
||||
|
||||
<%= stylesheet_link_tag 'login', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
|
||||
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> -->
|
||||
<%= javascript_include_tag 'login', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'login', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body class="login_dashboard">
|
||||
@@ -39,8 +39,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<% flash.each do |type, message| %>
|
||||
<%
|
||||
if type == "notice"
|
||||
<%
|
||||
if type == "notice"
|
||||
color = "alert-success"
|
||||
elsif type == "error"
|
||||
color = "alert-danger"
|
||||
@@ -49,11 +49,11 @@
|
||||
else
|
||||
color = "bg-black"
|
||||
end %>
|
||||
|
||||
|
||||
<p id="noti" class="hidden noti" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
|
||||
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<!-- #END# Page Loader -->
|
||||
<div class="container">
|
||||
@@ -62,25 +62,25 @@
|
||||
<img src="/image/SX-logo.png" width="150px" height="150px">
|
||||
<p>
|
||||
<small>Version - 1.0.1</small>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12_ col-md-12 col-sm-12 col-xs-12 text-center">
|
||||
<div class="current-shop-name">
|
||||
<span><%= shop_detail.name %></span>
|
||||
<span><%= shop_detail.name %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-white box">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 p-t-20 p-l-10 p-r-10 p-b-50 bg-white">
|
||||
<div class="row justify-content-center form-group">
|
||||
<div class="row bg-white box">
|
||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 p-t-20 p-l-10 p-r-10 p-b-50 bg-white">
|
||||
<div class="row justify-content-center form-group">
|
||||
<input type="text" class="form-control col-4" id="emp_id" placeholder="Employee ID">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="card padding-10">
|
||||
<div class="card-content">
|
||||
<div class="card-content card-btn">
|
||||
<div class='col-md-12'>
|
||||
<div class='row bottom'>
|
||||
<div class="pin_pad " data-value="1">1</div>
|
||||
@@ -103,14 +103,14 @@
|
||||
<div class="pin_pad left bg-indigo" data-value="ENT">ENT</div> -->
|
||||
<div class="pin_pad bg-blue-grey" data-value="BAC">BACK</div>
|
||||
<div class="pin_pad left" data-value="0">0</div>
|
||||
<div class="pin_pad bg-grey left" data-value="CLR">CLR</div>
|
||||
</div>
|
||||
<div class="pin_pad bg-grey left" data-value="CLR">CLR</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 p-t-20 p-l-10 p-r-10 p-b-50 bg-white">
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 p-t-20 p-l-10 p-r-10 p-b-50 bg-white">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<% @roles.each do |role| %>
|
||||
<%if role != "administrator" %>
|
||||
@@ -119,8 +119,8 @@
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style="max-height:650px; overflow:auto">
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<div class="tab-pane" id="<%=role%>" role="tabpanel" style="max-height:; overflow:auto">
|
||||
<% @employees.each do |employee| %>
|
||||
<%if employee.role == role %>
|
||||
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 empBtn" data-formid="#form_<%= employee.emp_id %>" style="float: left;">
|
||||
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 empBtn mbl-btn-usrgp" data-formid="#form_<%= employee.emp_id %>" style="float: left;">
|
||||
<form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH">
|
||||
</form>
|
||||
<%if employee.image_path.present? %>
|
||||
@@ -138,20 +138,20 @@
|
||||
<div class="p-name"><b><%= employee.name%></b>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% else %>
|
||||
<div class="login_dashboard p-card">
|
||||
<i class="material-icons style_icon">person</i>
|
||||
<div class="p-name"><b><%= employee.name%></b>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-xs-12 col-sm-12 col-md-2 col-lg-2"> </div> -->
|
||||
</div>
|
||||
@@ -159,7 +159,7 @@
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
@@ -172,7 +172,7 @@
|
||||
var text = $("#noti").attr('data-message');
|
||||
|
||||
if (text != null || colorName != null){
|
||||
showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
|
||||
showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
|
||||
}
|
||||
|
||||
$(".empBtn").click(function (event) {
|
||||
@@ -181,15 +181,15 @@
|
||||
$(item).submit();
|
||||
});
|
||||
|
||||
$('ul.nav.nav-tabs li a').click(function() {
|
||||
var bb = $('.nav-item').children()[0];
|
||||
$('ul.nav.nav-tabs li a').click(function() {
|
||||
var bb = $('.nav-item').children()[0];
|
||||
$(bb).removeClass('active_tab');
|
||||
$(this).parent().addClass('active_tab').siblings().removeClass('active_tab');
|
||||
});
|
||||
|
||||
$("#emp_id").focus();
|
||||
$(".pin_pad").click(function (event) {
|
||||
event.preventDefault();
|
||||
event.preventDefault();
|
||||
var value = $(this).data("value");
|
||||
|
||||
if (value == "CLR") {
|
||||
@@ -213,11 +213,11 @@
|
||||
|
||||
$('#emp_id').keyup(function(e) {
|
||||
e.preventDefault();
|
||||
var txtVal = this.value;
|
||||
|
||||
var txtVal = this.value;
|
||||
|
||||
if(txtVal!=''){
|
||||
if ($.isNumeric(txtVal)) {
|
||||
if( txtVal.length === 3 ) {
|
||||
if ($.isNumeric(txtVal)) {
|
||||
if( txtVal.length === 3 ) {
|
||||
window.location.href = '/auth/'+txtVal;
|
||||
}
|
||||
}else{
|
||||
@@ -228,10 +228,10 @@
|
||||
|
||||
var aa = $('.nav-item').children().attr('href').replace('#','');
|
||||
$('#'+aa).addClass('active');
|
||||
var bb = $('.nav-item').children()[0];
|
||||
var bb = $('.nav-item').children()[0];
|
||||
$(bb).parent().addClass('active_tab').siblings().removeClass('active_tab');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
function showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit) {
|
||||
if (colorName === null || colorName === '') { colorName = 'bg-black'; }
|
||||
@@ -268,6 +268,3 @@
|
||||
}
|
||||
//end Notificaiotn message
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<hr />
|
||||
|
||||
<div class="text-right">
|
||||
<%= link_to "Print", reports_print_sale_items_path(:type => params[:sale_type], :period => params[:period], :account => params[:account_type], :from => @from, :to => @to, :shift_name => params[:shift_name], :shift_from => @shift_from, :shift_to => @shift_to, :menu_cate_count => @menu_cate_count, :sale_items => @sale_data.to_json), :method => 'post', class:"btn btn-info wave-effects" %>
|
||||
<button class="btn btn-info wave-effects" onclick="print_sale_items()">Print</button>
|
||||
<a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a>
|
||||
</div>
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
<% other_sub_total = 0 %>
|
||||
<% product_sub_total = 0 %>
|
||||
<% count = 0 %>
|
||||
<% row_count = 0 %>
|
||||
<% total_price = 0 %>
|
||||
<% cate_count = 0 %>
|
||||
<% acc_count = 0 %>
|
||||
@@ -78,6 +79,7 @@
|
||||
<% total_tax = 0 %>
|
||||
<% unless @sale_data.blank? %>
|
||||
<% @sale_data.each do |sale| %>
|
||||
<% row_count += 1 %>
|
||||
<!-- all total qty sum -->
|
||||
|
||||
<% if sale.status_type != "Discount" && sale.status_type != "foc" && sale.status_type != "promotion"
|
||||
@@ -285,6 +287,7 @@
|
||||
<%end%>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -293,10 +296,7 @@
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
|
||||
var check_arr = [];
|
||||
|
||||
var search = '<%= params[:period_type] %>';
|
||||
|
||||
if(search){
|
||||
@@ -309,7 +309,7 @@
|
||||
}
|
||||
}else{
|
||||
search_by_period();
|
||||
}
|
||||
}
|
||||
|
||||
$('#sel_period').change(function(){
|
||||
search_by_period();
|
||||
@@ -407,4 +407,29 @@
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function print_sale_items(){
|
||||
var period = $('#sel_period').val();
|
||||
var type = $('#sel_sale_type').val();
|
||||
var account = $('#account_type').val();
|
||||
var from = $('#from').val();
|
||||
var to = $('#to').val();
|
||||
var shift = $('#shift_name').val();
|
||||
// var flag = false;
|
||||
// alert($('#row_count').val())
|
||||
|
||||
// if (flag == true) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%= reports_print_sale_items_path %>",
|
||||
data: "period="+period+"&period_type="+type+"&account_type="+account+"&from="+from+"&to="+to+"&shift_name="+shift,
|
||||
success: function(data){
|
||||
if (data != null){
|
||||
location.reload();
|
||||
}
|
||||
$("#loader").hide();
|
||||
}
|
||||
});
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user