Merge branch 'foodcourt' of gitlab.com:code2lab/SXRestaurant into foodcourt
This commit is contained in:
@@ -44,7 +44,7 @@ $.AdminBSB.options = {
|
||||
|
||||
/* Left Sidebar - Function =================================================================================================
|
||||
* You can manage the left sidebar menu options
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.leftSideBar = {
|
||||
activate: function () {
|
||||
@@ -157,7 +157,7 @@ $.AdminBSB.leftSideBar = {
|
||||
|
||||
/* Right Sidebar - Function ================================================================================================
|
||||
* You can manage the right sidebar menu options
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.rightSideBar = {
|
||||
activate: function () {
|
||||
@@ -189,7 +189,7 @@ $.AdminBSB.rightSideBar = {
|
||||
|
||||
/* Searchbar - Function ================================================================================================
|
||||
* You can manage the search bar
|
||||
*
|
||||
*
|
||||
*/
|
||||
var $searchBar = $('.search-bar');
|
||||
$.AdminBSB.search = {
|
||||
@@ -226,7 +226,7 @@ $.AdminBSB.search = {
|
||||
|
||||
/* Navbar - Function =======================================================================================================
|
||||
* You can manage the navbar
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.navbar = {
|
||||
activate: function () {
|
||||
@@ -256,7 +256,7 @@ $.AdminBSB.navbar = {
|
||||
|
||||
/* Input - Function ========================================================================================================
|
||||
* You can manage the inputs(also textareas) with name of class 'form-control'
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.input = {
|
||||
activate: function () {
|
||||
@@ -293,7 +293,7 @@ $.AdminBSB.input = {
|
||||
|
||||
/* Form - Select - Function ================================================================================================
|
||||
* You can manage the 'select' of form elements
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.select = {
|
||||
activate: function () {
|
||||
@@ -304,7 +304,7 @@ $.AdminBSB.select = {
|
||||
|
||||
/* DropdownMenu - Function =================================================================================================
|
||||
* You can manage the dropdown menu
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$.AdminBSB.dropdownMenu = {
|
||||
@@ -382,7 +382,7 @@ $.AdminBSB.dropdownMenu = {
|
||||
|
||||
/* Browser - Function ======================================================================================================
|
||||
* You can manage browser
|
||||
*
|
||||
*
|
||||
*/
|
||||
var edge = 'Microsoft Edge';
|
||||
var ie10 = 'Internet Explorer 10';
|
||||
@@ -454,5 +454,8 @@ $(document).ready(function() {
|
||||
$.AdminBSB.select.activate();
|
||||
$.AdminBSB.search.activate();
|
||||
|
||||
setTimeout(function () { $('.page-loader-wrapper').fadeOut(); }, 50);
|
||||
});
|
||||
if (window.location.href.substring(window.location.href.lastIndexOf('/') + 1) == "food_court#") {
|
||||
}else{
|
||||
setTimeout(function () { $('.page-loader-wrapper').fadeOut(); }, 50);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ $.AdminBSB.options = {
|
||||
|
||||
/* Left Sidebar - Function =================================================================================================
|
||||
* You can manage the left sidebar menu options
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.leftSideBar = {
|
||||
activate: function () {
|
||||
@@ -157,7 +157,7 @@ $.AdminBSB.leftSideBar = {
|
||||
|
||||
/* Right Sidebar - Function ================================================================================================
|
||||
* You can manage the right sidebar menu options
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.rightSideBar = {
|
||||
activate: function () {
|
||||
@@ -189,7 +189,7 @@ $.AdminBSB.rightSideBar = {
|
||||
|
||||
/* Searchbar - Function ================================================================================================
|
||||
* You can manage the search bar
|
||||
*
|
||||
*
|
||||
*/
|
||||
var $searchBar = $('.search-bar');
|
||||
$.AdminBSB.search = {
|
||||
@@ -226,7 +226,7 @@ $.AdminBSB.search = {
|
||||
|
||||
/* Navbar - Function =======================================================================================================
|
||||
* You can manage the navbar
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.navbar = {
|
||||
activate: function () {
|
||||
@@ -256,7 +256,7 @@ $.AdminBSB.navbar = {
|
||||
|
||||
/* Input - Function ========================================================================================================
|
||||
* You can manage the inputs(also textareas) with name of class 'form-control'
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.input = {
|
||||
activate: function () {
|
||||
@@ -293,7 +293,7 @@ $.AdminBSB.input = {
|
||||
|
||||
/* Form - Select - Function ================================================================================================
|
||||
* You can manage the 'select' of form elements
|
||||
*
|
||||
*
|
||||
*/
|
||||
$.AdminBSB.select = {
|
||||
activate: function () {
|
||||
@@ -304,7 +304,7 @@ $.AdminBSB.select = {
|
||||
|
||||
/* DropdownMenu - Function =================================================================================================
|
||||
* You can manage the dropdown menu
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$.AdminBSB.dropdownMenu = {
|
||||
@@ -382,7 +382,7 @@ $.AdminBSB.dropdownMenu = {
|
||||
|
||||
/* Browser - Function ======================================================================================================
|
||||
* You can manage browser
|
||||
*
|
||||
*
|
||||
*/
|
||||
var edge = 'Microsoft Edge';
|
||||
var ie10 = 'Internet Explorer 10';
|
||||
@@ -455,4 +455,4 @@ $(document).on('turbolinks:load', function() {
|
||||
$.AdminBSB.search.activate();
|
||||
|
||||
setTimeout(function () { $('.page-loader-wrapper').fadeOut(); }, 50);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -481,7 +481,7 @@ $(function() {
|
||||
parent = $('.set-item').attr('data-parent');
|
||||
total = qty * price ;
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' 'data-instance ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' data-instance ='"
|
||||
+name+ "' data-code='"+item_code+"' data-instance-code='"
|
||||
+code+"' data-attributes='"
|
||||
+attribute_arr+"' data-options ='"
|
||||
@@ -506,7 +506,7 @@ $(function() {
|
||||
total = qty * price ;
|
||||
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' 'data-instance ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' data-instance ='"
|
||||
+name+ "' data-code='"+item_code+"' data-instance-code='"
|
||||
+code+"' data-attributes='"
|
||||
+attribute_arr+"' data-options ='"
|
||||
@@ -832,48 +832,65 @@ $(function() {
|
||||
}
|
||||
show_item_detail(item_data,"add_to_order");
|
||||
calculate_sub_total();
|
||||
code = $('#item_code').text()
|
||||
autoScrollToItem(code);
|
||||
|
||||
}); //End add order Click
|
||||
|
||||
// click plus icon for add
|
||||
$(document).on('click', '.add_icon', function(event){
|
||||
var item_data = $(this);
|
||||
code = $(this).data('item-code');
|
||||
|
||||
if ($('#server_mode').val() != "cloud" && second_display_lookup == 2) {
|
||||
item = get_item(item_data,"add_icon");
|
||||
customer_display_view(item,"add");
|
||||
}
|
||||
|
||||
show_item_detail(item_data,"add_icon");
|
||||
code = $(this).data('item-code');
|
||||
element = $('#order-detail-slimscroll').find(`[data-code='${code}']`);
|
||||
item_qty = element.find('#item_qty').text()
|
||||
calculate_sub_total();
|
||||
autoScrollToItem(code)
|
||||
}); //End Add Icon Click
|
||||
|
||||
// scroll to element
|
||||
function autoScrollToItem(code) {
|
||||
console.log(code)
|
||||
element = $('.summary-items').find(`[data-code='${code}']`);
|
||||
item_qty = element.find('#item_qty').text()
|
||||
parent = element.parents('.card-text')
|
||||
|
||||
// auto scroll to last order item
|
||||
if (item_qty == 1) {
|
||||
$('#order-detail-slimscroll').animate({
|
||||
$(parent).animate({
|
||||
scrollTop: $('.summary-items tbody tr:last').position().top - $('.summary-items tbody tr:first').position().top
|
||||
})
|
||||
}
|
||||
// set border to current item
|
||||
$('.summary-items tbody tr').css('background-color', '')
|
||||
|
||||
element.css({'background-color': '#2091F3'})
|
||||
$('.summary-items tbody tr').css({
|
||||
'background-color': '',
|
||||
'color': ''
|
||||
})
|
||||
|
||||
setTimeout(function() {
|
||||
element.css('background-color', '');
|
||||
}, 500);
|
||||
|
||||
calculate_sub_total();
|
||||
|
||||
if (isNotInView(element)) {
|
||||
element.css({
|
||||
'background-color': '#2091F3',
|
||||
'color': '#fff'
|
||||
})
|
||||
|
||||
if (isNotInView(element, parent)) {
|
||||
element.css({'background-color': '#2091F3'});
|
||||
scrollToELement(element);
|
||||
}
|
||||
}); //End Add Icon Click
|
||||
}
|
||||
|
||||
function isNotInView(elem){
|
||||
$(document.body).on('click', function() {
|
||||
$('.summary-items tbody tr').css({
|
||||
'background-color': '',
|
||||
'color': ''
|
||||
})
|
||||
})
|
||||
|
||||
function isNotInView(elem, parent){
|
||||
// for scroll up | for scroll down
|
||||
result = (($(elem).offset().top - 100) < $(elem).height() || $('#order-detail-slimscroll').height() < (elem.position().top + elem.outerHeight(true)));
|
||||
result = (($(elem).offset().top - 100) < $(elem).height() || $(parent).height() < (elem.position().top + elem.outerHeight(true)));
|
||||
console.log(result)
|
||||
return result // reutn boolean
|
||||
}
|
||||
@@ -931,7 +948,7 @@ $(function() {
|
||||
});
|
||||
if (append===0) {
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ " 'data-toggle='modal' data-target='#sx_itemModal' 'data-instance ='"
|
||||
+price+ " 'data-toggle='modal' data-target='#sx_itemModal' data-instance ='"
|
||||
+instance+ "' data-qty='"+qty +"' data-code='"+data.attr('data-item-code')+"' data-instance-code='"
|
||||
+data.attr('data-instance-code')+"' data-attributes='"
|
||||
+data.attr('data-attributes')+"' data-options ='"
|
||||
@@ -1082,7 +1099,8 @@ $(function() {
|
||||
window.location.href = "/foodcourt/sale/"+result.data["sale_id"]+"/"+type+"/payment";
|
||||
}
|
||||
else{
|
||||
window.location.href = "/origami/sale/"+result.data["sale_id"]+"/"+type+"/payment";
|
||||
module_name = window.location.pathname.includes('origami') ? 'origami' : 'foodcourt'
|
||||
window.location.href = "/"+module_name+"/sale/"+result.data["sale_id"]+"/"+type+"/payment";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1096,7 +1114,7 @@ $(function() {
|
||||
name = $(this).children('#item_name').text();
|
||||
qty = $(this).children('#item_qty').text();
|
||||
$('#modal-item-name').text(name);
|
||||
$('#modal-qty').val(qty);
|
||||
$(this).addClass('set-bg-color')
|
||||
});
|
||||
|
||||
//click remove buttom in modal box
|
||||
@@ -1123,11 +1141,15 @@ $(function() {
|
||||
$("#sx_item_set_detailModal").css({ 'display': "none" });
|
||||
});
|
||||
//click save buttom after change qty
|
||||
$('#sx_itemModal').on('click','#save', function(){
|
||||
$(document).on('click','#save', function(){
|
||||
if ($('#modal-qty').val()>0) {
|
||||
summary_items_filter();
|
||||
calculate_sub_total();
|
||||
|
||||
$('.set-bg-color').css({
|
||||
'background-color': '#2091F3',
|
||||
'color': '#fff'
|
||||
})
|
||||
$('.summary-items tbody tr').removeClass('set-bg-color');
|
||||
}else{
|
||||
swal("Opps", "Please enter number for qty ","warning");
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ $(document).ready(function() {
|
||||
clearButton: true,
|
||||
date: false
|
||||
});
|
||||
|
||||
|
||||
// Image Upload
|
||||
$("#simple_menu_item_image_path").fileinput({
|
||||
previewFileType: "image",
|
||||
@@ -148,7 +148,7 @@ $(document).ready(function() {
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#commissioner_image_path").fileinput({
|
||||
previewFileType: "image",
|
||||
allowedFileExtensions: ["jpg", "gif", "png"],
|
||||
@@ -167,7 +167,7 @@ $(document).ready(function() {
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#employee_image_path").fileinput({
|
||||
previewFileType: "image",
|
||||
@@ -187,7 +187,7 @@ $(document).ready(function() {
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#shop_image").fileinput({
|
||||
previewFileType: "image",
|
||||
@@ -227,7 +227,7 @@ $(document).ready(function() {
|
||||
' <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" style="width: 200px;height: 200px;">\n' +
|
||||
'</div>\n',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// first input focus for all form
|
||||
$('form:first *input[data-behaviour!=datepicker]:input[type!=hidden]:first').focus();
|
||||
@@ -252,4 +252,4 @@ Chart.scaleService.updateScaleDefaults('linear', {
|
||||
}
|
||||
}
|
||||
});
|
||||
/* chartkick js YAxis value override */
|
||||
/* chartkick js YAxis value override */
|
||||
|
||||
@@ -13,6 +13,37 @@ $(document).ready(function() {
|
||||
touchScrollStep : 50
|
||||
});
|
||||
|
||||
$('#foodcourt-slimscroll').slimScroll({
|
||||
height: '100%',
|
||||
size: '5px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0',
|
||||
touchScrollStep : 50
|
||||
});
|
||||
|
||||
$('#foodcourt-order-slimscroll').slimScroll({
|
||||
height: '100%',
|
||||
size: '5px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0',
|
||||
touchScrollStep : 50
|
||||
});
|
||||
|
||||
|
||||
$('#foodcourt-menu-slimscroll').slimScroll({
|
||||
height: '100%',
|
||||
size: '5px',
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
alwaysVisible: false,
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0',
|
||||
touchScrollStep : 50
|
||||
});
|
||||
|
||||
$('#table-slimscroll').slimScroll({
|
||||
height: height,
|
||||
size: '5px',
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
}
|
||||
|
||||
section.content {
|
||||
margin: 70px 5px 0 225px;
|
||||
margin: 0 5px 0 5px;
|
||||
padding: 64px 0 0 0;
|
||||
}
|
||||
|
||||
.table {
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.slimScrollDiv {
|
||||
flex: 1 1 0!important;
|
||||
}
|
||||
|
||||
.flex-grow-1 {
|
||||
flex-grow: 1 !important;
|
||||
}
|
||||
.flex-1 {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
table.fixed-header {
|
||||
position: relative;
|
||||
|
||||
thead th{
|
||||
background: white;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
@@ -93,7 +122,8 @@
|
||||
}
|
||||
|
||||
section.content {
|
||||
margin: 70px 15px 0 225px;
|
||||
margin: 0 5px 0 5px;
|
||||
padding: 64px 0 0 0;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
@@ -123,7 +153,7 @@ section.content {
|
||||
.card .body {
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
padding: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.card .card-header {
|
||||
@@ -150,15 +180,15 @@ section.content {
|
||||
}
|
||||
|
||||
.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
|
||||
position: relative;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
position: relative;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
margin: 5px 5px 0 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
opacity: 1;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -178,8 +208,8 @@ section.content {
|
||||
}
|
||||
.btn:not(.btn-link):not(.btn-circle) span {
|
||||
position: relative;
|
||||
top: 0px;
|
||||
margin-left: 0px;
|
||||
top: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.nav {
|
||||
padding-left: 0;
|
||||
@@ -199,7 +229,7 @@ section.content {
|
||||
}
|
||||
|
||||
.nav-tabs li a.active {
|
||||
color: #000 !important;
|
||||
color: #000 !important;
|
||||
border-bottom: 2px solid #2196F3 !important;
|
||||
}
|
||||
|
||||
@@ -330,4 +360,4 @@ div.online-order-margin > div > span {
|
||||
}*/
|
||||
/* order-no color */
|
||||
|
||||
/* *************************************************** */
|
||||
/* *************************************************** */
|
||||
|
||||
@@ -7,8 +7,7 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
@product = Product.all
|
||||
def index
|
||||
if params[:sale_id].present?
|
||||
sale =Sale.find(params[:sale_id])
|
||||
if sale
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<%= javascript_include_tag 'addorder', 'data-turbolinks-track': 'reload' %>
|
||||
<% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%>
|
||||
<% modify_order = request.path_info.include?('modify_order')%>
|
||||
<div class="container-fluid " style="padding:0px 3px 0px 3px;">
|
||||
<div class="container-fluid h-100" style="padding:0px 3px 0px 3px;">
|
||||
<div id="oqs_loading_wrapper" style="display:none;">
|
||||
<div id="oqs_loading"></div>
|
||||
</div>
|
||||
@@ -10,8 +10,8 @@
|
||||
<input type="hidden" name="cashier_type" id="cashier_type" value="<%= type%>">
|
||||
<input type="hidden" name="link_type" id="link_type" value="<%= @cashier_type %>">
|
||||
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
|
||||
<div class="row m-t--20">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 hidden" id="menu_data">
|
||||
<div class="row m-t--10 h-100">
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 hidden d-flex flex-column h-100" id="menu_data">
|
||||
<li class="list-menu">
|
||||
<a href="javascript:void(0);" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<%end%>
|
||||
</ul>
|
||||
</li>
|
||||
<div id="menu1-slimscroll" data-height="0">
|
||||
<div id="menu1-slimscroll" class="flex-grow-1">
|
||||
<ul class="nav nav-tabs flex-column category_list" role="tablist" id="ul-navbar">
|
||||
<li class="nav-item product" data-ref="<%= foodcourt_get_all_product_path %>">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
|
||||
@@ -79,30 +79,37 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 hidden" id="menu_cache">
|
||||
<li class="list-menu">
|
||||
<a href="javascript:void(0);" id="menu_dropdown" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
||||
<span class="main_menu menu_cache_name" id="main_menu menu_cache_name"></span>
|
||||
</a>
|
||||
<ul class="ml-menu menu_list aria-hidden menu_cache_list" style="border-top: 1px solid #fff">
|
||||
</ul>
|
||||
</li>
|
||||
<div id="menu-slimscroll" data-height="0">
|
||||
<ul class="nav nav-tabs flex-column category_list category_cache_list" role="tablist" id="ul-navbar">
|
||||
<%if @product%>
|
||||
<li class="nav-item product" data-ref="<%= foodcourt_get_all_product_path %>">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
|
||||
</li>
|
||||
<%end%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2 hidden h-100 d-flex flex-column m-t-10" id="menu_cache">
|
||||
<div class="card h-100">
|
||||
<div class="card-header">
|
||||
<li class="list-menu" style="background: none">
|
||||
<a href="javascript:void(0);" id="menu_dropdown" class="menu-toggle dropdown-toggle toggled my-toggle ">
|
||||
<span class="main_menu menu_cache_name" id="main_menu menu_cache_name"></span>
|
||||
</a>
|
||||
<ul class="ml-menu menu_list aria-hidden menu_cache_list" style="border-top: 1px solid #fff">
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
<div class="card-block h-100 d-flex flex-column">
|
||||
<div id="foodcourt-menu-slimscroll" class="flex-grow-1 card-text">
|
||||
<ul class="nav nav-tabs flex-column category_list category_cache_list" role="tablist" id="ul-navbar">
|
||||
<%if Product.any? %>
|
||||
<li class="nav-item product" data-ref="<%= foodcourt_get_all_product_path %>">
|
||||
<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
|
||||
</li>
|
||||
<%end%>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-7 col-lg-7 col-sm-7 m-t-10" >
|
||||
<div class="card">
|
||||
<div class="card-block" style="">
|
||||
<div class="card-text" id="custom-slimscroll">
|
||||
<div class="col-md-7 col-lg-7 col-sm-7 m-t-10 d-flex flex-column h-100" >
|
||||
<div class="card h-100">
|
||||
<div class="card-block d-flex flex-column h-100" style="">
|
||||
<div class="card-text" id="foodcourt-slimscroll">
|
||||
<div class="row menu_items_list" style="margin:0px 1px 0px 1px ;">
|
||||
<!-- append data -->
|
||||
<% @menu.each do |menu| %>
|
||||
@@ -113,8 +120,8 @@
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
<p><%=menu.name%> </p>
|
||||
<p><%=menu.code%> </p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
@@ -124,16 +131,16 @@
|
||||
<% if !menu.code.include? "SPL" %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
<p><%=menu.name%> </p>
|
||||
<p><%=menu.code%> </p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
<% else %>
|
||||
<div class="card custom-card testimonial-card animated fadeInRight menu_category sub_click" data-id="<%=menu.id%>">
|
||||
<div class='card-block custom-card-block'>
|
||||
<p><%=menu.name%> <p>
|
||||
<p><%=menu.code%> <p>
|
||||
<p><%=menu.name%> </p>
|
||||
<p><%=menu.code%> </p>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
@@ -147,59 +154,65 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10">
|
||||
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-12" id='app_order'>
|
||||
Mobile Orders <span class="badge badge-danger" style="font-size: 0.75rem;border-radius: 5px;"><%= @app_order_new_count %></span>
|
||||
</button>
|
||||
<br>
|
||||
<div class="card-header" style="padding: 0.12rem 0.25rem">
|
||||
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10 d-flex flex-column h-100 ">
|
||||
<div class="card h-100">
|
||||
<div class="card-header" style="padding: 0.12rem 0.25rem">
|
||||
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-12" id='app_order'>
|
||||
Mobile Orders <span class="badge badge-danger" style="font-size: 0.75rem;border-radius: 5px;"><%= @app_order_new_count %></span>
|
||||
</button>
|
||||
<div class="row ">
|
||||
<div class="col-md-9 col-lg-9 col-sm-9 ">
|
||||
<strong id="order-title" class="font-14 p-l-10">ORDER DETAILS </strong>
|
||||
<p class="hidden" id="booking_id"><%=@booking_id%></p>
|
||||
<p class="hidden" id="sale_id"><%=@sale_id%></p>
|
||||
</div>
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">
|
||||
<button type="button" class="btn btn-xs btn-danger waves-effect" id='clear_all'> Clear
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-9 col-lg-9 col-sm-9 ">
|
||||
<strong id="order-title" class="font-14 p-l-10">ORDER DETAILS </strong>
|
||||
<p class="hidden" id="booking_id"><%=@booking_id%></p>
|
||||
<p class="hidden" id="sale_id"><%=@sale_id%></p>
|
||||
</div>
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">
|
||||
<button type="button" class="btn btn-xs btn-danger waves-effect" id='clear_all'>Clear
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-block d-flex flex-column h-100">
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="append-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Items</th>
|
||||
<th class="text-nowrap text-right">QTY</th>
|
||||
<th class="text-nowrap text-right">Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-text h-100" id="foodcourt-order-slimscroll">
|
||||
<table class="table table-striped summary-items fixed-header" id="order-items-table" >
|
||||
<tbody class="font-13" >
|
||||
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||
<table class="table table-striped summary-items" id="order-items-table" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th class="item-name">Items</th>
|
||||
<th class="item-qty">QTY</th>
|
||||
<th class="item-attr">Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="font-13" >
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer custom-card-footer" style="padding: 0.35rem 0.15rem !important;">
|
||||
|
||||
<table class="table" id="order-charges-table" border="0">
|
||||
<tr>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name" width="25%"><strong>Total:</strong></td>
|
||||
<td style="padding:2px;" width="15%"><strong id="total_qty">0</strong></td>
|
||||
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total">0.00</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% if @sale_id.nil?%>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
|
||||
<% else %>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-11" id="add_to_existing_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card-footer-placeholder"></div>
|
||||
<div class="card-footer flex-grow-1 custom-card-footer" id="orders-footer">
|
||||
<table class="table" id="order-charges-table" border="0">
|
||||
<tr>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name"><strong>Total:</strong></td>
|
||||
<td style="padding:2px; text-align: center;"><strong id="total_qty">0</strong></td>
|
||||
<td style="padding:2px; text-align:" class="item-attr float-right"><strong id="sub_total">0.00</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% if @sale_id.nil?%>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-12" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
|
||||
<% else %>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-12" id="add_to_existing_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class=" modal" id="sx_itemModal" tabindex="-1" role="dialog" aria-labelledby="sx_itemModalLabel" aria-hidden="true" style="">
|
||||
@@ -413,6 +426,9 @@ var cashier_type = $('#cashier_type').val();
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
footerHeight = $('#orders-footer').innerHeight() + 30
|
||||
$('#card-footer-placeholder').css('height', footerHeight)
|
||||
|
||||
if (window.location.href.indexOf('#') != -1) {
|
||||
getAllMenu();
|
||||
}
|
||||
@@ -472,8 +488,9 @@ function getAllMenu(){
|
||||
localStorage.setItem("menus", menus);
|
||||
if (result != null ) {
|
||||
menu_cache_append(result);
|
||||
$( "#loading_wrapper").hide();
|
||||
$("#loading_wrapper").hide();
|
||||
$("#oqs_loading_wrapper").css("display", "none");
|
||||
$(".page-loader-wrapper").css("display", "none");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -481,11 +498,7 @@ function getAllMenu(){
|
||||
|
||||
function menu_cache_append(menus){
|
||||
$("#menu_cache").removeClass("hidden");
|
||||
if(menus.length == 1){
|
||||
$("#menu_dropdown").remove();
|
||||
$(".list-menu").append("<span class='main_menu menu_cache_name' id='main_menu menu_cache_name' style='margin-left:10px;font-weight:bold'>"+menus[0]["name"]+"</span>")
|
||||
}
|
||||
else{
|
||||
if(menus.length != 1){
|
||||
$(".menu_cache_name").text(menus[0]["name"])
|
||||
}
|
||||
for(var i in menus) {
|
||||
|
||||
@@ -8,37 +8,36 @@
|
||||
</style>
|
||||
<%= javascript_include_tag 'custom', 'data-turbolinks-track': 'reload' %>
|
||||
|
||||
<button type="button" class="btn btn-block btn-default waves-effect float-right m-t-10" id='back' style="width: 112px; margin-right: -10px">
|
||||
<!-- <button type="button" class="btn btn-block btn-default waves-effect float-right" id='back' style="width: 112px; margin-right: -10px">
|
||||
<i class="material-icons">reply</i>
|
||||
Back
|
||||
</button>
|
||||
</button> -->
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs tab-col-teal m-t--10" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= 'active' if params[:active].blank? %>" data-toggle="tab" href="#mobile_orders" role="tab">Mobile Orders</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= params[:active] ? 'active' : '' %>" data-toggle="tab" href="#complete" role="tab"><%= t :competed %></a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Nav tabs - End -->
|
||||
|
||||
<div class="container-fluid " style="padding:0px 3px 0px 3px;margin-top:20px">
|
||||
<div class="container-fluid h-100" style="padding:0px 3px 0px 3px;margin-top:20px">
|
||||
<div id="oqs_loading_wrapper" style="display:none;">
|
||||
<div id="oqs_loading"></div>
|
||||
</div>
|
||||
|
||||
<div class="row m-t--10">
|
||||
<div class="row m-t--20 h-100">
|
||||
<% if !@booking.nil?%>
|
||||
<div class="col-md-8 col-lg-8 col-sm-12 float-left">
|
||||
<div class="col-md-7 col-lg-7 col-sm-12 float-left h-100 d-flex flex-column m-l-5 m-r-10" style="padding-right: 10px;">
|
||||
<% else %>
|
||||
<div class="col-md-12 col-lg-12 col-sm-12">
|
||||
<div class="col-md-11 col-lg-11 col-sm-12 h-100 d-flex flex-column" style="padding: 0 !important;">
|
||||
<% end %>
|
||||
<div class="tab-content" id="custom-slimscroll">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs tab-col-teal m-t--10" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= 'active' if params[:active].blank? %>" data-toggle="tab" href="#mobile_orders" role="tab">Mobile Orders</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <%= params[:active] ? 'active' : '' %>" data-toggle="tab" href="#complete" role="tab"><%= t :competed %></a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Nav tabs - End -->
|
||||
<div class="tab-content h-100">
|
||||
<!-- Panel 0 - Mobile Orders -->
|
||||
<div class="tab-pane <%= 'active' if params[:active].blank? %>" id='mobile_orders' role='tabpanel'>
|
||||
<div id="custom-slimscroll">
|
||||
<div id="foodcourt-slimscroll" class="flex-grow-1">
|
||||
<div class="card-columns">
|
||||
<% bk_color ='' %>
|
||||
<% @bookings.each do |bk|
|
||||
@@ -56,8 +55,9 @@
|
||||
<%= link_to foodcourt_app_order_by_booking_path(booking_id:bk.booking_id), class: 'item-card' do %>
|
||||
<div class="card <%= bk_color %> text-white" data-id ="<%= bk.booking_id %>">
|
||||
<div class="card-block">
|
||||
Cus Ph: <%= bk.contact_no %><span style="font-size:12px;float:right;line-height:inherit;">Order Time: <%= bk.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span><br>
|
||||
Order No: <%= bk.orders.first.try(:order_id) %><span style="font-size:12px;float:right;line-height:inherit;"><%= bk_status %></span> </div>
|
||||
<%= bk.contact_no %><span style="font-size:12px;float:right;line-height:inherit;"> <%= bk.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span><br>
|
||||
<%= bk.orders.first.try(:order_id) %><span style="font-size:12px;float:right;line-height:inherit;"><%= bk_status %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -84,8 +84,9 @@
|
||||
<%= link_to foodcourt_app_order_by_booking_path(booking_id: c.booking_id, active: 'completed'), class: 'item-card' do %>
|
||||
<div class="card <%= bk_color %> text-white" data-id ="<%= c.booking_id %>">
|
||||
<div class="card-block">
|
||||
Cus Ph: <%= c.contact_no %><span style="font-size:12px;float:right;line-height:inherit;">Order Time: <%= c.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span><br>
|
||||
Order No: <%= c.orders.first.try(:order_id) %><span style="font-size:12px;float:right;line-height:inherit;">competed</span> </div>
|
||||
<%= c.contact_no %><span style="font-size:12px;float:right;line-height:inherit;"> <%= c.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span><br>
|
||||
<%= c.orders.first.try(:order_id) %><span style="font-size:12px;float:right;line-height:inherit;">competed</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -95,51 +96,53 @@
|
||||
</div>
|
||||
|
||||
<% if !@booking.nil?%>
|
||||
<div class="col-md-3 col-lg-3 col-sm-12">
|
||||
<div class="col-md-4 col-lg-4 col-sm-12 h-100 d-flex flex-column m-l--15">
|
||||
<span id="sale_id" style="display:none"><%= @booking.sale_id %></span>
|
||||
<div class="card">
|
||||
<div class="card h-100" style="margin-bottom: 10px !important">
|
||||
<div class="card-header" style="padding: 0.12rem 0.25rem">
|
||||
<div class="row" style="margin:auto">
|
||||
<div class="col-md-12 col-lg-12 col-sm-12">
|
||||
<strong id="order-title" class="font-14 p-l-10">ORDER DETAILS </strong>| <span class="font-14">Table-<%=@booking.dining_facility.try(:name)%></span><br>
|
||||
<span class="font-14 p-l-10"><b>Booking</b> - <%=@booking.booking_id%></span><br>
|
||||
<span class="font-14 p-l-10"><b>Order No</b> - <%=@booking.order_id%></span>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12 col-sm-12" style="padding: 10px 10px">
|
||||
<strong id="order-title" class="font-18 p-l-10">ORDER DETAILS |</strong> <span class="font-18">Table-<%=@booking.dining_facility.try(:name)%></span><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="335">
|
||||
<table class="table table-striped summary-items">
|
||||
<thead>
|
||||
<div class="card-block h-100 d-flex flex-column">
|
||||
<div>
|
||||
<span class="font-14 float-left d-inline"><b>Booking</b> - <%=@booking.booking_id%></span>
|
||||
<span class="font-14 float-right d-inline"><b>Order No</b> - <%=@booking.order_id%></span>
|
||||
</div>
|
||||
<div class="card-text h-100" id="foodcourt-order-slimscroll" style="overflow-y: auto">
|
||||
<table class="table table-striped summary-items fixed-header">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-nowrap">#</th>
|
||||
<th class="item-name">Items</th>
|
||||
<th class="item-qty text-nowrap">Qty</th>
|
||||
<th class="item-attr text-nowrap">Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="font-13">
|
||||
<%
|
||||
sub_total = 0
|
||||
count = 0
|
||||
%>
|
||||
<% @sale_data.sale_items.each do |sale_item|
|
||||
count += 1
|
||||
%>
|
||||
<% sub_total += sale_item.price%>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th class="item-name">Items</th>
|
||||
<th class="item-qty">Qty</th>
|
||||
<th class="item-attr">Price</th>
|
||||
<td class="text-nowrap"><%= count %></td>
|
||||
<td class="item-name"><%=sale_item.product_name%>@<%=number_with_precision( sale_item.unit_price, precision: precision.to_i )%></td>
|
||||
<td class="text-nowrap"><%=sale_item.qty%></td>
|
||||
<td class="item-attr text-nowrap"><%=(number_with_precision(sale_item.price, precision: precision.to_i ))%></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="font-13">
|
||||
<%
|
||||
sub_total = 0
|
||||
count = 0
|
||||
%>
|
||||
<% @sale_data.sale_items.each do |sale_item|
|
||||
count += 1
|
||||
%>
|
||||
<% sub_total += sale_item.price%>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
<td class="item-name"><%=sale_item.product_name%>@<%=number_with_precision( sale_item.unit_price, precision: precision.to_i )%></td>
|
||||
<td class=""><%=sale_item.qty%></td>
|
||||
<td class="item-attr"><%=(number_with_precision(sale_item.price, precision: precision.to_i ))%></td>
|
||||
</tr>
|
||||
<%end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer custom-card-footer" style="padding: 0.35rem 0.15rem !important;">
|
||||
<table class="table" id="order-charges-table" border="0">
|
||||
<div class="card-footer flex-grow-1 custom-card-footer">
|
||||
<table class="table" id="order-charges-table" border="0" cellpadding = "10">
|
||||
<tr>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name" width="25%"><strong>Sub Total</strong></td>
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total"><%=number_with_precision(sub_total, precision: precision.to_i)%></strong></td>
|
||||
@@ -161,14 +164,23 @@
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total"><%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i )%></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-12" id="done_order" style="padding-top:4px !important;padding-bottom:4px !important;">DONE</button>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-12" id="done_order" style="margin: 10px 0 -2px 12px; width: 95%; font-size: 1.3rem">
|
||||
DONE
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 col-lg-1 col-sm-12">
|
||||
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="col-md-1 col-lg-1 col-sm-12 h-100 d-flex flex-column" style="padding-right: 10px;">
|
||||
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
|
||||
<i class="material-icons">reply</i>
|
||||
<%= t("views.btn.back") %>
|
||||
</button>
|
||||
<% if !@booking.nil?%>
|
||||
<a class="btn btn-block bg-red waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal fade" id="voidModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid h-100">
|
||||
<div id="loading_wrapper" style="display:none;">
|
||||
<div id="loading"></div>
|
||||
</div>
|
||||
@@ -17,9 +17,9 @@
|
||||
%>
|
||||
<% end %>
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<div class="card">
|
||||
<div class="row clearfix h-100">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 d-flex flex-column h-100">
|
||||
<div class="card h-100">
|
||||
<div class="card-header m-l-5 m-r-5">
|
||||
<div id="order-title">
|
||||
<div class="row p-l-5 p-r-5">
|
||||
@@ -48,9 +48,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-block m-l-5 m-r-5 m-t--10">
|
||||
<div class="card-block m-l-5 m-r-5 m-t--10 d-flex flex-column h-100">
|
||||
<div class="card-title">
|
||||
<div id="table-details" class="card-text" >
|
||||
<div id="table-details" class="card-text">
|
||||
<table class="table" id="append-table">
|
||||
<tr>
|
||||
<!-- <tr> -->
|
||||
@@ -63,7 +63,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="order-detail-slimscroll" data-height="300">
|
||||
<div id="foodcourt-slimscroll" class="h-100">
|
||||
<!-- <div id="table-details" class="card-text" style="min-height:400px; max-height:400px; overflow-x:scroll"> -->
|
||||
<div id="table-details" class="card-text m-t--10" >
|
||||
<table class="table" id="append-table">
|
||||
@@ -159,11 +159,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row m-l-5 m-r-5">
|
||||
<div class="col-md-8"><strong class='amount_balance'>Amount Due <% if !@sale_payment.nil? %>( Credit )<% end %></strong></div>
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-5 d-flex flex-column h-100">
|
||||
<div class="card h-100">
|
||||
<div class="card-header" style="margin-bottom: 20%;">
|
||||
<div class="row m-l-5 m-r-5 m-t-20" style="padding-bottom: 14px;">
|
||||
<div class="col-md-8"><strong class='amount_balance' style="font-size: 30px">Amount Due: <% if !@sale_payment.nil? %>( Credit )<% end %></strong></div>
|
||||
<div class="col-md-4">
|
||||
<strong>
|
||||
<span id="grand_total" class="hidden">
|
||||
@@ -173,7 +173,7 @@
|
||||
<%= number_with_precision(@sale_payment[0].payment_amount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i)%>
|
||||
<% end %>
|
||||
</span>
|
||||
<span id="amount_due">
|
||||
<span id="amount_due" style="font-size: 30px">
|
||||
<% if @sale_payment.nil? %>
|
||||
<%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
|
||||
<% else %>
|
||||
@@ -183,211 +183,17 @@
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
<% if @cash_exist %>
|
||||
<div class="row payment cash-color p-l-5 p-r-5">
|
||||
<div class="col-md-8">Cash</div>
|
||||
<div class="col-md-4" id="cash" >
|
||||
<%= number_with_precision(@cash, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
|
||||
</div>
|
||||
</div>
|
||||
<%else%>
|
||||
<div class="col-md-4" id="cash" style="display:none;">
|
||||
<%= number_with_precision(@cash, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
|
||||
</div>
|
||||
<%end%>
|
||||
<%if @credit_exist%>
|
||||
<div class="row payment credit-color p-l-5 p-r-5" id="credit_payment" >
|
||||
<div class="col-md-8">Credit</div>
|
||||
<div class="col-md-4" id="credit"><%= number_with_precision(@credit, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
</div>
|
||||
<%else%>
|
||||
<div class="col-md-4" id="credit" style="display:none;"><%= number_with_precision(@credit, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<%end%>
|
||||
<div class="row payment other-payment-color btn_paymal_member">
|
||||
<div class="col-md-8">Other Payments</div>
|
||||
<div class="col-md-4" id="other_payment_amount">
|
||||
<%= number_with_precision(@other_payment, precision: precision.to_i) rescue number_with_precision(0, precision: precision.to_i) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-block">
|
||||
<div class="card-title m-l-5 m-r-5">
|
||||
<!-- mpu -->
|
||||
<div class="row <%= @other!=0.0 ? 'payment others-color' : 'hidden' %>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">MPU</div>
|
||||
<% if @other != 0.0 %>
|
||||
<div class="col-md-4 mpu is_card" id="others"><%= number_with_precision(@other, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="others"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
|
||||
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
|
||||
|
||||
<!-- paypar -->
|
||||
<div class="row <%= @ppamount!=0.0 ? 'payment others-color' : 'hidden' %>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">Redeem</div>
|
||||
<% if @ppamount != 0.0 %>
|
||||
<div class="col-md-4" id="ppamount"><%= number_with_precision(@ppamount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="ppamount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- Visa -->
|
||||
<div class="row <%= @visacount!=0.0 ? 'payment others-color' : 'hidden' %>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">VISA</div>
|
||||
<% if @visacount != 0.0 %>
|
||||
<div class="col-md-4 visa is_card" id="visacount"><%= number_with_precision(@visacount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="visacount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- JCB -->
|
||||
<div class="row <%= @jcbcount!=0.0 ? 'payment others-color' : 'hidden' %>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">JCB</div>
|
||||
<% if @jcbcount != 0.0 %>
|
||||
<div class="col-md-4 jcb is_card" id="jcbcount"><%= number_with_precision(@jcbcount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="jcbcount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- Master -->
|
||||
<div class="row <%= @mastercount!=0.0 ? 'payment others-color' : 'hidden' %>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">MASTER</div>
|
||||
<% if @mastercount != 0.0 %>
|
||||
<div class="col-md-4 master is_card" id="mastercount"><%= number_with_precision(@mastercount, precision: precision.to_i) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="mastercount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- <br> -->
|
||||
|
||||
<!-- UNIONPAY -->
|
||||
<div class="row <%= @unionpaycount!=0.0 ? 'payment others-color' : 'hidden' %>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">UNIONPAY</div>
|
||||
<% if @unionpaycount != 0.0 %>
|
||||
<div class="col-md-4 master is_card" id="unionpaycount"><%= number_with_precision(@unionpaycount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="unionpaycount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- Alipay -->
|
||||
<div class="row <%= @alipaycount!=0.0 ? 'payment others-color' : 'hidden' %>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">Alipay</div>
|
||||
<% if @alipaycount != 0.0 %>
|
||||
<div class="col-md-4 alipay is_card" id="alipaycount"><%= number_with_precision(@alipaycount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="alipaycount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- PAYMAL -->
|
||||
<div class="row <%= @paymalcount!=0.0 ? 'payment others-color' : 'hidden'%>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">PAYMAL</div>
|
||||
<% if @paymalcount != 0.0 %>
|
||||
<div class="col-md-4 master is_card" id="paymalcount"><%= number_with_precision(@paymalcount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="paymalcount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- DINGA -->
|
||||
<div class="row <%= @dingacount!=0.0 ? 'payment others-color' : 'hidden'%>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">DINGA</div>
|
||||
<% if @dingacount != 0.0 %>
|
||||
<div class="col-md-4 master is_card" id="dingacount"><%= number_with_precision(@dingacount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="dingacount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- Junction Pay -->
|
||||
<div class="row <%= @junctionpaycount!=0.0 ? 'payment others-color' : 'hidden'%>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">JUNCTION PAY</div>
|
||||
<% if @junctionpaycount != 0.0 %>
|
||||
<div class="col-md-4 master is_card" id="junctionpaycount"><%= number_with_precision(@junctionpaycount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="junctionpaycount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- Gift Voucher -->
|
||||
<div class="row <%= @giftvouchercount!=0.0 ? 'payment others-color' : 'hidden'%>">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-3">GIFT VOUCHER</div>
|
||||
<% if @giftvouchercount != 0.0 %>
|
||||
<div class="col-md-4 master is_card" id="giftvouchercount"><%= number_with_precision(@giftvouchercount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% else %>
|
||||
<div class="col-md-4" id="giftvouchercount"><%= number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="row m-l-5 m-r-5">
|
||||
<div class="col-md-8"><strong class='amount_balance'>Balance</strong></div>
|
||||
<div class="col-md-4"><strong><span id='balance'><%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></span></strong></div>
|
||||
</div>
|
||||
<!-- <br> -->
|
||||
<div class="btn_paymal_member pay border-top border- border-left purple payment-left" style="border-radius: 50%; width: 45%; height: 220px; margin: 0 auto; line-height: 210px;">
|
||||
Pay
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row m-l-5 m-r-5">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="row bottom">
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="1" data-type="num">1</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="2" data-type="num">2</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="3" data-type="num">3</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="4" data-type="num">4</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="5" data-type="num">5</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="6" data-type="num">6</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="7" data-type="num">7</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="8" data-type="num">8</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="9" data-type="num">9</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="0" data-type="num">0</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="." data-type="num">.</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left" data-value="00" data-type="num">00</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<div class="col-md-4 cashier_number border-top border- border-left green" data-type="nett">Nett</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left red" data-type="del">Del</div>
|
||||
<div class="col-md-4 cashier_number border-top border- border-left orange" data-type="clr">Clr</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="row bottom">
|
||||
<div class="cashier_number border-top border- border-left payment-long payment-left" data-value="1000" data-type="add">1000</div>
|
||||
<div class="cashier_number border-top border- border-left payment-long" data-value="3000" data-type="add">3000</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<div class="cashier_number border-top border- border-left payment-long payment-left" data-value="5000" data-type="add">5000</div>
|
||||
<div class="cashier_number border-top border- border-left payment-long" data-value="10000" data-type="add">10000</div>
|
||||
</div>
|
||||
<div class="row bottom">
|
||||
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
|
||||
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
|
||||
<div class="btn_paymal_member pay border-top border- border-left purple payment-left">Pay</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
|
||||
<button type="button" class="btn btn-block btn-default waves-effect" id='refresh'>
|
||||
|
||||
Reference in New Issue
Block a user