diff --git a/app/assets/javascripts/CRM.js b/app/assets/javascripts/CRM.js
index 4b5baba8..e9c764fe 100755
--- a/app/assets/javascripts/CRM.js
+++ b/app/assets/javascripts/CRM.js
@@ -9,14 +9,16 @@
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
-//
+
//= require jquery
//= require tether
-//= require bootstrap
+//= require bootstrap/js/popper.min
+//= require bootstrap/js/bootstrap-material-design.min
//= require jquery_ujs
//= require turbolinks
-//= require cable
-//= require jquery-ui
-//= require bootstrap-datepicker
-//= require bootstrap/modal
-
+//= require jquery-slimscroll/jquery.slimscroll.js
+//= require node-waves/waves.js
+//= require sweetalert/sweetalert.min.js
+//= require BSBMaterial/admin.js
+//= require BSBMaterial/demo.js
+//= require custom.js
diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js
index c48807b3..bd59ffad 100755
--- a/app/assets/javascripts/OQS.js
+++ b/app/assets/javascripts/OQS.js
@@ -12,10 +12,17 @@
//
//= require jquery
//= require tether
-//= require bootstrap
+//= require bootstrap/js/popper.min
+//= require bootstrap/js/bootstrap-material-design.min
//= require jquery_ujs
//= require turbolinks
//= require cable
+//= require jquery-slimscroll/jquery.slimscroll.js
+//= require node-waves/waves.js
+//= require sweetalert/sweetalert.min.js
+//= require BSBMaterial/admin.js
+//= require BSBMaterial/demo.js
+//= require custom.js
$(document).ready(function(){
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index ae6d1c12..28a1d23d 100755
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -34,54 +34,11 @@
//= require BSBMaterial/admin.js
//= require BSBMaterial/pages/index.js
//= require BSBMaterial/demo.js
-
-
-$(document).on('turbolinks:load', function() {
-
- $('.datetimepicker').bootstrapMaterialDatePicker({
- format: 'DD-MM YYYY - HH:mm',
- clearButton: true,
- weekStart: 1
- });
-
- $('.datepicker').bootstrapMaterialDatePicker({
- format: 'DD-MM-YYYY',
- clearButton: true,
- weekStart: 1,
- time: false
- });
-
- $('.timepicker').bootstrapMaterialDatePicker({
- format: 'HH:mm',
- clearButton: true,
- date: false
- });
-
-});
+//= require select2
+//= require custom.js
$(function(){
- $('body').bootstrapMaterialDesign();
- var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
-
- $('#custom-slimscroll').slimScroll({
- height: height,
- size: '5px',
- color: 'rgba(0,0,0,0.5)',
- alwaysVisible: false,
- borderRadius: '0',
- railBorderRadius: '0'
- });
-
- $('#order-detail-slimscroll').slimScroll({
- height: height-180,
- size: '5px',
- color: 'rgba(0,0,0,0.5)',
- alwaysVisible: false,
- borderRadius: '0',
- railBorderRadius: '0'
- });
-
// Image Upload
$("#simple_menu_item_image_path").fileinput({
previewFileType: "image",
@@ -123,54 +80,6 @@ $(function(){
}
});
- $('.delete').click(function(){
- var method = $(this).attr('data-method');
- var url = $(this).attr('data-ref');
- var html_text = $( this ).siblings( "#delete_text" ).html();
- swal({
- title: "Confirmation",
- text: html_text,
- type: "warning",
- showCancelButton: true,
- confirmButtonColor: "#DD6B55",
- html: true
- }, function (isConfirm) {
- if (isConfirm) {
- $.ajax({
- type: method,
- url: url ,
- success: function(data) {
- }
- });
- } else {
- swal("Cancelled", "Your imaginary file is safe :)", "error");
- }
- });
- });
-
- $('.dddddddd').click(function(){
- var currentForm = $(this).closest("form");
- bootbox.confirm({
- title: 'Confirmation',
- message: $('#delete_text').html(),
- buttons: {
- 'cancel': {
- label: 'No',
- className: 'btn green col-md-4 pull-left'
- },
- 'confirm': {
- label: 'Yes',
- className: 'btn red col-md-4 pull-right'
- }
- },
- callback: function(result) {
- if (result) {
- currentForm.submit();
- }
- }
- });
- });
-
});
$(document).on("focus", "[data-behaviour~='datepicker']", function(e){
diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js
new file mode 100644
index 00000000..e5b09e92
--- /dev/null
+++ b/app/assets/javascripts/custom.js
@@ -0,0 +1,50 @@
+
+$(function(){
+
+ $('body').bootstrapMaterialDesign();
+ var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
+
+ $('#custom-slimscroll').slimScroll({
+ height: height,
+ size: '5px',
+ color: 'rgba(0,0,0,0.5)',
+ alwaysVisible: false,
+ borderRadius: '0',
+ railBorderRadius: '0'
+ });
+
+ $('#order-detail-slimscroll').slimScroll({
+ height: height-180,
+ size: '5px',
+ color: 'rgba(0,0,0,0.5)',
+ alwaysVisible: false,
+ borderRadius: '0',
+ railBorderRadius: '0'
+ });
+
+ $('.delete').click(function(){
+ var method = $(this).attr('data-method');
+ var url = $(this).attr('data-ref');
+ var html_text = $( this ).siblings( "#delete_text" ).html();
+ swal({
+ title: "Confirmation",
+ text: html_text,
+ type: "warning",
+ showCancelButton: true,
+ confirmButtonColor: "#DD6B55",
+ html: true
+ }, function (isConfirm) {
+ if (isConfirm) {
+ $.ajax({
+ type: method,
+ url: url ,
+ success: function(data) {
+ }
+ });
+ } else {
+ swal("Cancelled", "Your imaginary file is safe :)", "error");
+ }
+ });
+ });
+
+});
diff --git a/app/assets/javascripts/inventory.js b/app/assets/javascripts/inventory.js
new file mode 100644
index 00000000..1e789598
--- /dev/null
+++ b/app/assets/javascripts/inventory.js
@@ -0,0 +1,13 @@
+//= require jquery
+//= require tether
+//= require bootstrap/js/popper.min
+//= require bootstrap/js/bootstrap-material-design.min
+//= require jquery_ujs
+//= require turbolinks
+//= require jquery-slimscroll/jquery.slimscroll.js
+//= require node-waves/waves.js
+//= require sweetalert/sweetalert.min.js
+//= require BSBMaterial/admin.js
+//= require BSBMaterial/demo.js
+//= require custom.js
+//= require select2
diff --git a/app/assets/javascripts/origami.js b/app/assets/javascripts/origami.js
index 6b2af56b..2f9fcee4 100755
--- a/app/assets/javascripts/origami.js
+++ b/app/assets/javascripts/origami.js
@@ -1,12 +1,15 @@
//= require jquery
//= require tether
-//= require bootstrap
+//= require bootstrap/js/popper.min
+//= require bootstrap/js/bootstrap-material-design.min
//= require jquery_ujs
//= require turbolinks
-//= require cable
-//= require jquery-ui
-//= require bootstrap-datepicker
-//= require jquery.datetimepicker
+//= require jquery-slimscroll/jquery.slimscroll.js
+//= require node-waves/waves.js
+//= require sweetalert/sweetalert.min.js
+//= require BSBMaterial/admin.js
+//= require BSBMaterial/demo.js
+//= require custom.js
$(document).ready(function(){
// auto refresh every 60 seconds
@@ -19,7 +22,7 @@ $(document).ready(function(){
order_status = $(".selected-item").children().find(".orders-order-status").text().substr(0,6).trim();
// Enable/Disable Button
- control_button(order_status);
+ //control_button(order_status);
$(".orders").on('click', function(){
$("#order-sub-total").text('');
@@ -35,7 +38,7 @@ $(document).ready(function(){
var order_status=$(this).find(".orders-order-status").text().trim();
// Enable/Disable Button
- control_button(order_status);
+ //control_button(order_status);
var customer_id=$(this).find(".customer-id").text();
show_customer_details(customer_id);
@@ -110,7 +113,7 @@ $(document).ready(function(){
});
// Bill Request
- $('#request_bills').click(function() {
+ /*$('#request_bills').click(function() {
var order_id=$(".selected-item").find(".orders-id").text().substr(0,16);
if(order_id!=""){
window.location.href = '/origami/' + order_id + '/request_bills'
@@ -119,52 +122,52 @@ $(document).ready(function(){
alert("Please select an order!");
}
return false;
- });
+ });*/
// Discount for Payment
- $('#discount').click(function() {
- var order_id=$(".selected-item").find(".orders-id").text().substr(0,16);
+ // $('#discount').click(function() {
+ // var order_id=$(".selected-item").find(".orders-id").text().substr(0,16);
- if(order_id!=""){
- window.location.href = '/origami/' + order_id + '/discount'
- }
- else {
- alert("Please select an order!");
- }
+ // if(order_id!=""){
+ // window.location.href = '/origami/' + order_id + '/discount'
+ // }
+ // else {
+ // alert("Please select an order!");
+ // }
- return false;
- });
+ // return false;
+ // });
// Pay Discount for Payment
- $("#pay-discount").on('click', function(e){
- e.preventDefault();
- var sale_id = $('#sale-id').text();
- var sale_item_id = $('.selected-item').attr('id').substr(0,16);
- var sub_total = $('#order-sub-total').text();
- var grand_total = $('#order-grand-total').text();
- var discount_type = $('#discount-type').val();
- var discount_value = $('#discount-amount').val();
- var discount_amount = discount_value;
- var ajax_url = "/origami/" + sale_id + "/discount";
+ // $("#pay-discount").on('click', function(e){
+ // e.preventDefault();
+ // var sale_id = $('#sale-id').text();
+ // var sale_item_id = $('.selected-item').attr('id').substr(0,16);
+ // var sub_total = $('#order-sub-total').text();
+ // var grand_total = $('#order-grand-total').text();
+ // var discount_type = $('#discount-type').val();
+ // var discount_value = $('#discount-amount').val();
+ // var discount_amount = discount_value;
+ // var ajax_url = "/origami/" + sale_id + "/discount";
- if(sale_item_id != null){
- ajax_url = "/origami/" + sale_item_id + "/discount";
- sub_total = $("#"+sale_item_id).children().find("#item-total-price").text();
- }
+ // if(sale_item_id != null){
+ // ajax_url = "/origami/" + sale_item_id + "/discount";
+ // sub_total = $("#"+sale_item_id).children().find("#item-total-price").text();
+ // }
- // For Percentage Discount
- if(discount_type == 1){
- discount_amount=(sub_total*discount_value)/100;
- }
+ // // For Percentage Discount
+ // if(discount_type == 1){
+ // discount_amount=(sub_total*discount_value)/100;
+ // }
- var params = {'sale_id': sale_id, 'sale_item_id': sale_item_id, 'grand_total' : grand_total, 'discount_type':discount_type, 'discount_value':discount_value, 'discount_amount':discount_amount};
- $.ajax({
- type: "POST",
- url: ajax_url,
- data: params,
- success:function(result){ }
- });
- });
+ // var params = {'sale_id': sale_id, 'sale_item_id': sale_item_id, 'grand_total' : grand_total, 'discount_type':discount_type, 'discount_value':discount_value, 'discount_amount':discount_amount};
+ // $.ajax({
+ // type: "POST",
+ // url: ajax_url,
+ // data: params,
+ // success:function(result){ }
+ // });
+ // });
// Payment for Bill
@@ -180,118 +183,118 @@ $(document).ready(function(){
return false;
});
- $('#customer').click(function() {
- var sale = $(".selected-item").find(".orders-id").text().substr(0,16);
- if (sale.substring(0, 3)=="SAL") {
- var sale_id = sale
- }else{
- var sale_id = $(".selected-item").find(".order-cid").text();
- }
- window.location.href = '/origami/'+ sale_id + "/customers"
+ // $('#customer').click(function() {
+ // var sale = $(".selected-item").find(".orders-id").text().substr(0,16);
+ // if (sale.substring(0, 3)=="SAL") {
+ // var sale_id = sale
+ // }else{
+ // var sale_id = $(".selected-item").find(".order-cid").text();
+ // }
+ // window.location.href = '/origami/'+ sale_id + "/customers"
- return false;
- });
+ // return false;
+ // });
- $('#re-print').click(function() {
- var sale_id = $(".selected-item").find(".orders-id").text().substr(0,16);
+ // $('#re-print').click(function() {
+ // var sale_id = $(".selected-item").find(".orders-id").text().substr(0,16);
- window.location.href = '/origami/'+ sale_id + "/reprint"
+ // window.location.href = '/origami/'+ sale_id + "/reprint"
- return false;
- });
+ // return false;
+ // });
- function show_customer_details(customer_id){
+ // function show_customer_details(customer_id){
- if(window.location.pathname.substring(0, 12) == "/origami/SAL"){
- var url = customer_id+"/get_customer/"
- }else{
- var url = "origami/"+customer_id+"/get_customer/"
- }
+ // if(window.location.pathname.substring(0, 12) == "/origami/SAL"){
+ // var url = customer_id+"/get_customer/"
+ // }else{
+ // var url = "origami/"+customer_id+"/get_customer/"
+ // }
- $('.customer_detail').removeClass('hide');
+ // $('.customer_detail').removeClass('hide');
- //Start Ajax
- $.ajax({
- type: "GET",
- url: url,
- data: {},
- dataType: "json",
- success: function(data) {
- $("#customer_name").text(data["customer"].name);
- if (data["response_data"]["data"].length) {
- $.each(data["response_data"]["data"], function (i) {
- if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
- var balance = data["response_data"]["data"][i]["balance"];
- if (data["response_data"]["status"]==true) {
- $('.rebate_amount').removeClass('hide');
- row =
- '
' + data["response_data"]["data"][i]["accountable_type"] +' | '
- +'' + balance + ' | ';
+ // //Start Ajax
+ // $.ajax({
+ // type: "GET",
+ // url: url,
+ // data: {},
+ // dataType: "json",
+ // success: function(data) {
+ // $("#customer_name").text(data["customer"].name);
+ // if (data["response_data"]["data"].length) {
+ // $.each(data["response_data"]["data"], function (i) {
+ // if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){
+ // var balance = data["response_data"]["data"][i]["balance"];
+ // if (data["response_data"]["status"]==true) {
+ // $('.rebate_amount').removeClass('hide');
+ // row =
+ // '' + data["response_data"]["data"][i]["accountable_type"] +' | '
+ // +'' + balance + ' | ';
- $(".rebate_amount").html(row);
- }
+ // $(".rebate_amount").html(row);
+ // }
- }
- });
- }else{
- $('.rebate_amount').addClass('hide');
- }
- }
- });
- //End Ajax
- }
+ // }
+ // });
+ // }else{
+ // $('.rebate_amount').addClass('hide');
+ // }
+ // }
+ // });
+ // //End Ajax
+ // }
/* For Receipt - Calculate discount or tax */
- $('.cashier_number').on('click', function(event){
- if(event.handled !== true) {
- var original_value=0;
- original_value = $('#discount-amount').val();
+ // $('.cashier_number').on('click', function(event){
+ // if(event.handled !== true) {
+ // var original_value=0;
+ // original_value = $('#discount-amount').val();
- var input_type = $(this).attr("data-type");
+ // var input_type = $(this).attr("data-type");
- switch (input_type) {
- case 'num':
- var input_value = $(this).attr("data-value");
- if (original_value == "0.0"){
- $('#discount-amount').val(input_value);
- update_balance();
- }
- else{
- $('#discount-amount').val(original_value + '' + input_value);
- update_balance();
- }
- break;
+ // switch (input_type) {
+ // case 'num':
+ // var input_value = $(this).attr("data-value");
+ // if (original_value == "0.0"){
+ // $('#discount-amount').val(input_value);
+ // update_balance();
+ // }
+ // else{
+ // $('#discount-amount').val(original_value + '' + input_value);
+ // update_balance();
+ // }
+ // break;
- case 'add':
- var input_value = $(this).attr("data-value");
- amount = parseInt(input_value);
- $('#discount-amount').val(amount);
- $('#discount-type').val(1);
- update_balance();
- break;
+ // case 'add':
+ // var input_value = $(this).attr("data-value");
+ // amount = parseInt(input_value);
+ // $('#discount-amount').val(amount);
+ // $('#discount-type').val(1);
+ // update_balance();
+ // break;
- case 'del' :
- var discount_text=$('#discount-amount').val();
- $('#discount-amount').val(discount_text.substr(0,discount_text.length-1));
- update_balance();
- break;
+ // case 'del' :
+ // var discount_text=$('#discount-amount').val();
+ // $('#discount-amount').val(discount_text.substr(0,discount_text.length-1));
+ // update_balance();
+ // break;
- case 'clr':
- $('#discount-amount').val("0.0");
- update_balance();
- break;
- }
+ // case 'clr':
+ // $('#discount-amount').val("0.0");
+ // update_balance();
+ // break;
+ // }
- event.handled = true;
- } else {
- return false;
- }
- });
+ // event.handled = true;
+ // } else {
+ // return false;
+ // }
+ // });
- $('.discount-item-row').on('click',function(){
- $('.discount-item-row').removeClass('selected-item');
- $(this).addClass('selected-item');
- });
+ // $('.discount-item-row').on('click',function(){
+ // $('.discount-item-row').removeClass('selected-item');
+ // $(this).addClass('selected-item');
+ // });
// $(".orders").on('click', function(){
// var dining_id = $(this).attr("data-id");
diff --git a/app/assets/stylesheets/CRM.scss b/app/assets/stylesheets/CRM.scss
index df008329..6d70c162 100755
--- a/app/assets/stylesheets/CRM.scss
+++ b/app/assets/stylesheets/CRM.scss
@@ -1,15 +1,20 @@
-@import "bootstrap";
-@import "font-awesome";
-@import "theme";
-@import "jquery-ui";
-@import "bootstrap-datepicker3";
-@import "bootstrap/modal";
-
-/* Show it is fixed to the top */
-// body {
-// min-height: 75rem;
-// padding-top: 4.5rem;
-// }
+//@import "bootstrap";
+//@import "font-awesome";
+//@import "theme";
+//@import "jquery-ui";
+//@import "bootstrap-datepicker3";
+//@import "bootstrap/modal";
+@import "tether";
+@import "bootstrap/css/bootstrap-material-design.min";
+@import "node-waves/waves";
+@import "animate-css/animate";
+@import "sweetalert/sweetalert.css";
+@import "multi-select/css/multi-select.css";
+@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
+@import "morrisjs/morris";
+@import "BSBMaterial/style";
+@import "BSBMaterial/themes/all-themes";
+@import "reset";
.selected-item {
color: #fff !important;
@@ -45,14 +50,7 @@
.jconfirm-box-container{
margin-left:-40px !important
}
-.card-columns {
- @include media-breakpoint-only(lg) {
- column-count: 5;
- }
- @include media-breakpoint-only(xl) {
- column-count: 5;
- }
-}
+
#sxModal {
display: none;
@@ -93,4 +91,5 @@
width: 480px;
height: 375px;
-}
\ No newline at end of file
+}
+
diff --git a/app/assets/stylesheets/OQS.scss b/app/assets/stylesheets/OQS.scss
index 108c7541..93b922bc 100755
--- a/app/assets/stylesheets/OQS.scss
+++ b/app/assets/stylesheets/OQS.scss
@@ -1,12 +1,13 @@
-@import "bootstrap";
-@import "font-awesome";
-@import "theme";
-
-/* Show it is fixed to the top */
-// body {
-// min-height: 75rem;
-// padding-top: 4.5rem;
-// }
+@import "tether";
+@import "bootstrap/css/bootstrap-material-design.min";
+@import "node-waves/waves";
+@import "animate-css/animate";
+@import "sweetalert/sweetalert.css";
+@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
+@import "morrisjs/morris";
+@import "BSBMaterial/style";
+@import "BSBMaterial/themes/all-themes";
+@import "reset";
.order-completed {
background-color: #CCFFDD;
}
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 481ba20e..cbe882dd 100755
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -9,476 +9,7 @@
@import "fileinput.min";
@import "BSBMaterial/style";
@import "BSBMaterial/themes/all-themes";
-
-/* Start Reset Theme */
-.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col-auto, .col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-auto, .col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md-auto, .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-auto {
- padding-left: 10px;
- padding-right: 10px;
-}
-.col-lg-1, .col-md-1, .col-sm-1,col-xl-1{
- padding-left: 5px ;
- padding-right: 5px ;
-}
-
-.navbar {
- padding: 0.1rem 1rem;
-}
-
-.navbar-header {
- padding: 0px;
-}
-
-.navbar-brand {
- padding-top: 0rem;
- padding-bottom: 0rem;
-}
-
-.navbar-brand-txt {
- position: relative;
- top: 5px;
-}
-
-.navbar-right a {
- color: #fff;
-}
-
-.navbar-right a.dropdown-toggle {
- position: relative;
- top: -5px;
-}
-
-.dropdown-menu {
- margin-top: 0px !important;
-}
-
-.switch label {
- color: #070707 !important;
-}
-
-.ls-closed .bars:after, .ls-closed .bars:before {
- position: absolute;
- top: 8px;
-}
-
-section.content {
- margin: 60px 15px 0 225px;
-}
-
-.sidebar {
- width: 210px;
- height: calc(100vh - 50px);
- position: fixed;
- top: 50px;
- right: 250px;
-}
-
-.right-sidebar {
- width: 240px;
- height: calc(100vh - 50px);
- position: fixed;
- right: -260px;
- top: 50px;
-}
-
-.info-box {
- margin-bottom: 20px;
-}
-
-.card {
- margin-bottom: 20px;
-}
-
-.card .card-header {
- padding: 0.5rem;
-}
-
-.card .card-title{
- margin-bottom:0.5rem;
-}
-
-.card .card-block {
- padding: 0.5rem;
-}
-
-.btn {
- padding: .46875rem 0.25rem;
- color : #fff !important;
-}
-.btn-default, .bg-default{
- color : #111 !important;
-}
-.checkbox label, label.checkbox-inline {
- padding-left: 0;
-}
-
-.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
- position: relative;
- left: 0;
- z-index: -1;
- width: 13px;
- height: 13px;
- margin: 5px 5px 0 0;
- overflow: hidden;
- pointer-events: none;
- opacity: 1;
-}
-
-
-.sidebar .menu .list .header {
- background: #eee;
- font-size: 12px;
- font-weight: bold;
- padding: 8px 16px;
-}
-
-.breadcrumb {
- font-size:0.87rem;
-}
-
-.list-group-item{
- padding:0.75rem 1rem;
-}
-.btn:not(.btn-link):not(.btn-circle) span {
- position: relative;
- top: 0px;
- margin-left: 0px;
-}
-.nav {
- padding-left: 0;
- margin-bottom: 0;
- list-style: none;
-}
-
-.nav > li > a {
- position: relative;
- display: block;
- padding: 10px 15px;
-}
-
-.nav-tabs > li {
- float: left;
- margin-bottom: -1px;
-}
-
-.nav-tabs li a.active {
- color: #000 !important;
- border-bottom: 2px solid #2196F3 !important;
-}
-
-.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
- color: #555;
- cursor: default;
- background-color: #fff;
- border: 1px solid #ddd;
- border-bottom-color: transparent;
-}
-.nav-tabs > li > a {
- margin-right: 2px;
- line-height: 1.42857143;
- text-decoration:none;
-}
-.nav-tabs .nav-link {
- padding: 0.7286em .8575em;
-}
-
-.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
- opacity:0 !important;
- margin-right:15px;
-}
-/* End Reset Theme */
-/* *************************************************** */
-
-.hidden{
- display: none !important;
-}
-
-/***************** Start Origami CSS *************************/
-/* Reset */
-.table {
- margin-bottom: 0px;
-}
-
-select.form-control {
- height: inherit !important;
-}
-
-.form-horizontal .form-group {
- margin-right: 0px !important;
-}
-
-.card-columns {
- font-size: 18px !important;
-}
-
-/* End Reset */
-/*
-.dining {
- min-height:470px;
- max-height:570px;
- overflow:auto
-}
-
-.order-info {
- min-height:300px;
- max-height:500px;
- overflow:auto
-}
-*/
-.others-payment{
- line-height:100px;
- text-align:center;
- color:white;
- width:300px;
- height:100px;
- font-size:18px;
-}
-
-.orders-table {
- cursor: pointer;
-}
-
-.cashier_number{
- width: 33%;
- height:70px;
- line-height:70px;
- text-align:center;
- background:#54A5AF;
- // float:left;
- // margin:2px;
- font-size:20px;
- color:white;
- // cursor:pointer;
-}
-
-.border-left{
- border-left:1px solid #fff;
-}
-
-.del_cashier_number{
- opacity:0.6,
-}
-
-.pay{
- width: 98%;
- height:211px;
- line-height:211px;
- text-align:center;
- font-size:20px;
- color:white;
-}
-
-.payment{
- height:70px;line-height:70px;
- align:center;
- color:white;
- font-size:16px;
- margin-top:5px;
-}
-
-.font-12 {
- font-size: 12px;
-}
-
-.cash-color{
- background-color:#80CBC4;
-}
-
-.credit-color{
- background-color:#FFCCBC;
-}
-
-.other-payment-color{
- background-color:#E1BEE7;
-}
-
-.cashier_number:hover{
- background:#A9F5F2;
-}
-
-.action-btn {
- white-space: normal !important;
- height: 60px;
- margin-bottom: 5px;
-}
-
-.radius-btn {
- border-radius:5px;
- color:#fff;
- background-color:red;
-}
-
-.bottom-5 {
- margin-bottom: 5px;
-}
-
-.fluid {
- width: 100%;
-}
-
-.style2 {
- border-top: 3px double #8c8b8b;
-}
-
-.long{
- width:49%;
-}
-
-.sold {
- background-color: red;
-}
-
-.paid {
- background-color: green;
-}
-
-.selected-item {
- color: #fff !important;
- background-color: blue !important;
-}
-
-.selected-account {
- color: #fff !important;
- background-color: blue !important;
-}
-
-/* Reciept Style */
-#order-charges-table td {
- border-top: none !important;
-}
-
-.charges-name {
- width: 80%;
- text-align: left;
-}
-
-.item-name {
- width: 60%;
- text-align: left;
-}
-
-.item-attr {
- width: 20%;
- text-align: right;
-}
-
-.item-attr-edit{
- width: 10%;
- text-align: left;
-}
-
-.display-none{
- display: none;
-}
-
-.text-white{
- color: #fff;
-}
-
-/* Colors */
-.purple {
- background-color:#7a62d3;
-}
-
-.orange{
- background-color:#FF7F50;
-}
-
-.red {
- background-color:#ff0000;
-}
-
-.green{
- background-color: #009900;
-}
-
-.orange{
- background-color: #FF8C00;
-}
-
-.blue{
- background-color: blue;
-}
-
-/* End Colors */
-
-.left{
- margin-left:1px;
-}
-
-.bottom{
- margin-bottom: 1px;
- margin-left:-10px ;
- margin-right:-10px;
-}
-
-/* Discount */
-
-.discount-item-row {
- cursor: pointer;
-}
-
-tr.discount-item-row:hover {
- background-color: #e3e3e3 !important;
-}
-.required abbr{
- color: red !important;
-}
-
-#sxModal {
- display: none;
- overflow: auto;
- width: 100%;
- height: 100%;
- background-color: #000;
- background-color: rgba(0,0,0,0.4);
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 1100;
-}
-
-#sxModal-Content {
- position: relative;
- left: 42%;
- top: 30%;
- background-color: #d9534f;
- color: #fff;
- text-align: center;
- width: 200px;
- height: 200px;
- padding-top: 5%;
- border-radius: 100px;
- z-index: 1101;
-}
-
-/*Loading gif for payment*/
-
-#loading_wrapper{
- position: fixed;
- background-color: #C8C8C8 ;
- height: 100%;
- width: 100%;
- left: 0;
- opacity: 0.6;
- top: 0;
- z-index: 9999999;
-}
-
-#loading{
- position: relative;
- height: 100%;
- width: 100%;
- background-image: url('../../../image/loading-ajax.gif');
- background-position: center center;
- background-repeat: no-repeat;
- opacity: 1;
- filter: alpha(opacity=100); /* ie */
- -moz-opacity: 1; /* mozilla */
-
-}
-/***********************End Origami CSS ************************/
+@import "reset";
/*----- Order Processing Items -----*/
.opi_ul {
diff --git a/app/assets/stylesheets/inventory_definitions.scss b/app/assets/stylesheets/inventory_definitions.scss
index e7fc208e..0a113e90 100755
--- a/app/assets/stylesheets/inventory_definitions.scss
+++ b/app/assets/stylesheets/inventory_definitions.scss
@@ -1,10 +1,16 @@
-@import "bootstrap";
-@import "font-awesome";
-@import "theme";
-@import "jquery-ui";
-@import "bootstrap-datepicker3";
+@import "tether";
+@import "bootstrap/css/bootstrap-material-design.min";
+@import "node-waves/waves";
+@import "animate-css/animate";
+@import "sweetalert/sweetalert.css";
+@import "multi-select/css/multi-select.css";
+@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
+@import "morrisjs/morris";
+@import "BSBMaterial/style";
+@import "BSBMaterial/themes/all-themes";
+@import "reset";
@import "select2";
-@import "jquery.datetimepicker";
+
/* Show it is fixed to the top */
// body {
diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss
index f0db5df8..d0819198 100755
--- a/app/assets/stylesheets/origami.scss
+++ b/app/assets/stylesheets/origami.scss
@@ -1,16 +1,24 @@
+/*
@import "bootstrap";
@import "font-awesome";
@import "theme";
@import "jquery-ui";
@import "bootstrap-datepicker3";
-
@import "jquery.datetimepicker";
+*/
+
+@import "tether";
+@import "bootstrap/css/bootstrap-material-design.min";
+@import "node-waves/waves";
+@import "animate-css/animate";
+@import "sweetalert/sweetalert.css";
+@import "multi-select/css/multi-select.css";
+@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
+@import "morrisjs/morris";
+@import "BSBMaterial/style";
+@import "BSBMaterial/themes/all-themes";
+@import "reset";
-/* Show it is fixed to the top */
-// body {
-// min-height: 75rem;
-// padding-top: 4.5rem;
-// }
/* Reset */
.table {
@@ -237,11 +245,8 @@ tr.discount-item-row:hover {
color: red !important;
}
-/* Jquery Confirm */
-
-.jconfirm-box-container{
- margin-left:-40px !important;
- margin-top:-40px !important;
+.border-left{
+ border-left:1px solid #fff;
}
#sxModal {
diff --git a/app/assets/stylesheets/reset.css b/app/assets/stylesheets/reset.css
new file mode 100644
index 00000000..0556a5b6
--- /dev/null
+++ b/app/assets/stylesheets/reset.css
@@ -0,0 +1,182 @@
+/* Start Reset Theme */
+.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col-auto, .col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-auto, .col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md-auto, .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-auto {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+.col-lg-1, .col-md-1, .col-sm-1,col-xl-1{
+ padding-left: 5px ;
+ padding-right: 5px ;
+}
+
+.navbar {
+ padding: 0.1rem 1rem;
+}
+
+.navbar-header {
+ padding: 0px;
+}
+
+.navbar-brand {
+ padding-top: 0rem;
+ padding-bottom: 0rem;
+}
+
+.navbar-brand-txt {
+ position: relative;
+ top: 5px;
+}
+
+.navbar-right a {
+ color: #fff;
+}
+
+.navbar-right a.dropdown-toggle {
+ position: relative;
+ top: -5px;
+}
+
+.dropdown-menu {
+ margin-top: 0px !important;
+}
+
+.switch label {
+ color: #070707 !important;
+}
+
+.ls-closed .bars:after, .ls-closed .bars:before {
+ position: absolute;
+ top: 8px;
+}
+
+section.content {
+ margin: 70px 15px 0 225px;
+}
+
+.sidebar {
+ width: 210px;
+ height: calc(100vh - 50px);
+ position: fixed;
+ top: 50px;
+ right: 250px;
+}
+
+.right-sidebar {
+ width: 240px;
+ height: calc(100vh - 50px);
+ position: fixed;
+ right: -260px;
+ top: 50px;
+}
+
+.info-box {
+ margin-bottom: 20px;
+}
+
+.card {
+ margin-bottom: 20px;
+}
+
+.card .card-header {
+ padding: 0.5rem;
+}
+
+.card .card-title{
+ margin-bottom:0.5rem;
+}
+
+.card .card-block {
+ padding: 0.5rem;
+}
+
+.btn {
+ padding: .46875rem 0.25rem;
+ color : #fff !important;
+}
+.btn-default, .bg-default{
+ color : #111 !important;
+}
+.checkbox label, label.checkbox-inline {
+ padding-left: 0;
+}
+
+.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
+ position: relative;
+ left: 0;
+ z-index: -1;
+ width: 13px;
+ height: 13px;
+ margin: 5px 5px 0 0;
+ overflow: hidden;
+ pointer-events: none;
+ opacity: 1;
+}
+
+
+.sidebar .menu .list .header {
+ background: #eee;
+ font-size: 12px;
+ font-weight: bold;
+ padding: 8px 16px;
+}
+
+.breadcrumb {
+ font-size:0.87rem;
+}
+
+.list-group-item{
+ padding:0.75rem 1rem;
+}
+.btn:not(.btn-link):not(.btn-circle) span {
+ position: relative;
+ top: 0px;
+ margin-left: 0px;
+}
+.nav {
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+}
+
+.nav > li > a {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+}
+
+.nav-tabs > li {
+ float: left;
+ margin-bottom: -1px;
+}
+
+.nav-tabs li a.active {
+ color: #000 !important;
+ border-bottom: 2px solid #2196F3 !important;
+}
+
+.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
+ color: #555;
+ cursor: default;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-bottom-color: transparent;
+}
+.nav-tabs > li > a {
+ margin-right: 2px;
+ line-height: 1.42857143;
+ text-decoration:none;
+}
+.nav-tabs .nav-link {
+ padding: 0.7286em .8575em;
+}
+
+.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
+ opacity:0 !important;
+ margin-right:15px;
+}
+
+.hidden{
+ display: none !important;
+}
+
+/* End Reset Theme */
+/* *************************************************** */
\ No newline at end of file
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 33ee425c..949276cd 100755
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base
#all token authentication must be done here
#response format must be set to JSON
+ #change locallization
def set_locale
I18n.locale = params[:locale] || I18n.default_locale
end
diff --git a/app/controllers/base_crm_controller.rb b/app/controllers/base_crm_controller.rb
index 38f0df3d..e66c67b9 100755
--- a/app/controllers/base_crm_controller.rb
+++ b/app/controllers/base_crm_controller.rb
@@ -10,6 +10,16 @@ class BaseCrmController < ActionController::Base
redirect_to root_path
end
+ #change locallization
+ def set_locale
+ I18n.locale = params[:locale] || I18n.default_locale
+ end
+
+ # RESTful url for localize
+ def default_url_options
+ { locale: I18n.locale }
+ end
+
def current_user
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end
diff --git a/app/controllers/base_oqs_controller.rb b/app/controllers/base_oqs_controller.rb
index 50d7bd55..db9f8231 100755
--- a/app/controllers/base_oqs_controller.rb
+++ b/app/controllers/base_oqs_controller.rb
@@ -10,6 +10,16 @@ class BaseOqsController < ActionController::Base
redirect_to root_path
end
+ #change locallization
+ def set_locale
+ I18n.locale = params[:locale] || I18n.default_locale
+ end
+
+ # RESTful url for localize
+ def default_url_options
+ { locale: I18n.locale }
+ end
+
def current_user
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end
diff --git a/app/controllers/crm/bookings_controller.rb b/app/controllers/crm/bookings_controller.rb
index d712f66f..efaa5419 100755
--- a/app/controllers/crm/bookings_controller.rb
+++ b/app/controllers/crm/bookings_controller.rb
@@ -1,4 +1,4 @@
-class Crm::BookingsController < ApplicationController
+class Crm::BookingsController < BaseCrmController
load_and_authorize_resource
def update_booking
booking = Booking.find(params[:booking_id])
diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb
index 02ce9148..2a0626dd 100755
--- a/app/controllers/crm/customers_controller.rb
+++ b/app/controllers/crm/customers_controller.rb
@@ -1,4 +1,4 @@
-class Crm::CustomersController < ApplicationController #BaseCrmController
+class Crm::CustomersController < BaseCrmController
load_and_authorize_resource except: [:create]
before_action :set_crm_customer, only: [:show, :edit, :update, :destroy]
diff --git a/app/controllers/crm/dining_queues_controller.rb b/app/controllers/crm/dining_queues_controller.rb
index 91e833bd..a48e03a7 100755
--- a/app/controllers/crm/dining_queues_controller.rb
+++ b/app/controllers/crm/dining_queues_controller.rb
@@ -1,4 +1,4 @@
-class Crm::DiningQueuesController < ApplicationController #BaseCrmController
+class Crm::DiningQueuesController < BaseCrmController
load_and_authorize_resource
before_action :set_dining_queue, only: [:show, :edit, :update, :destroy]
diff --git a/app/controllers/crm/home_controller.rb b/app/controllers/crm/home_controller.rb
index 92b31261..012f2bc6 100755
--- a/app/controllers/crm/home_controller.rb
+++ b/app/controllers/crm/home_controller.rb
@@ -1,4 +1,4 @@
-class Crm::HomeController < ApplicationController
+class Crm::HomeController < BaseCrmController
def index
@booking = Booking.all
diff --git a/app/controllers/inventory/inventory_controller.rb b/app/controllers/inventory/inventory_controller.rb
index 3bf3c84c..673cf943 100755
--- a/app/controllers/inventory/inventory_controller.rb
+++ b/app/controllers/inventory/inventory_controller.rb
@@ -1,4 +1,4 @@
-class Inventory::InventoryController < ApplicationController#BaseInventoryController
+class Inventory::InventoryController < BaseInventoryController
def index
@products = InventoryDefinition.all.active.order('created_at desc')
diff --git a/app/controllers/inventory/inventory_definitions_controller.rb b/app/controllers/inventory/inventory_definitions_controller.rb
index cc9eecd8..33b7dd75 100755
--- a/app/controllers/inventory/inventory_definitions_controller.rb
+++ b/app/controllers/inventory/inventory_definitions_controller.rb
@@ -1,4 +1,4 @@
-class Inventory::InventoryDefinitionsController < ApplicationController#BaseInventoryController
+class Inventory::InventoryDefinitionsController < BaseInventoryController
before_action :set_inventory_definition, only: [:show, :edit, :update, :destroy]
# GET /inventory_definitions
diff --git a/app/controllers/inventory/stock_check_items_controller.rb b/app/controllers/inventory/stock_check_items_controller.rb
index 43782767..18980f29 100755
--- a/app/controllers/inventory/stock_check_items_controller.rb
+++ b/app/controllers/inventory/stock_check_items_controller.rb
@@ -1,4 +1,4 @@
-class Inventory::StockCheckItemsController < ApplicationController#BaseInventoryController
+class Inventory::StockCheckItemsController < BaseInventoryController
before_action :set_stock_check_item, only: [:show, :edit, :update, :destroy]
# GET /stock_check_items
diff --git a/app/controllers/inventory/stock_checks_controller.rb b/app/controllers/inventory/stock_checks_controller.rb
index f7a9e7fe..52d183de 100755
--- a/app/controllers/inventory/stock_checks_controller.rb
+++ b/app/controllers/inventory/stock_checks_controller.rb
@@ -1,4 +1,4 @@
-class Inventory::StockChecksController < ApplicationController#BaseInventoryController
+class Inventory::StockChecksController < BaseInventoryController
def index
@check = StockCheck.new
@inventory_definitions = InventoryDefinition.active.all
diff --git a/app/controllers/oqs/edit_controller.rb b/app/controllers/oqs/edit_controller.rb
index 1e8011e7..33ffd8a6 100755
--- a/app/controllers/oqs/edit_controller.rb
+++ b/app/controllers/oqs/edit_controller.rb
@@ -1,4 +1,4 @@
-class Oqs::EditController < ApplicationController#BaseOqsController
+class Oqs::EditController < BaseOqsController
def index
assigned_item_id = params[:id]
assigned_item = AssignedOrderItem.find(assigned_item_id)
diff --git a/app/controllers/oqs/home_controller.rb b/app/controllers/oqs/home_controller.rb
index 561b0552..af843c7e 100755
--- a/app/controllers/oqs/home_controller.rb
+++ b/app/controllers/oqs/home_controller.rb
@@ -1,4 +1,4 @@
-class Oqs::HomeController < ApplicationController#BaseOqsController
+class Oqs::HomeController < BaseOqsController
def index
@queue_stations = OrderQueueStation.all
diff --git a/app/controllers/origami/card_payments_controller.rb b/app/controllers/origami/card_payments_controller.rb
index 8ea44d3f..e0c56971 100755
--- a/app/controllers/origami/card_payments_controller.rb
+++ b/app/controllers/origami/card_payments_controller.rb
@@ -1,4 +1,4 @@
-class Origami::CardPaymentsController < ApplicationController #BaseOrigamiController
+class Origami::CardPaymentsController < BaseOrigamiController
def index
@membership_rebate_balance = 0
@membership_id = 0
diff --git a/app/controllers/origami/cash_ins_controller.rb b/app/controllers/origami/cash_ins_controller.rb
index 4ea4f6de..36860b85 100755
--- a/app/controllers/origami/cash_ins_controller.rb
+++ b/app/controllers/origami/cash_ins_controller.rb
@@ -1,4 +1,4 @@
-class Origami::CashInsController < ApplicationController #BaseOrigamiController
+class Origami::CashInsController < BaseOrigamiController
def new
end
diff --git a/app/controllers/origami/credit_payments_controller.rb b/app/controllers/origami/credit_payments_controller.rb
index 43fe97f9..a4978a6f 100755
--- a/app/controllers/origami/credit_payments_controller.rb
+++ b/app/controllers/origami/credit_payments_controller.rb
@@ -1,4 +1,4 @@
-class Origami::CreditPaymentsController < ApplicationController #BaseOrigamiController
+class Origami::CreditPaymentsController < BaseOrigamiController
def index
@sale_id = params[:sale_id]
diff --git a/app/controllers/origami/customers_controller.rb b/app/controllers/origami/customers_controller.rb
index 4bd69c76..72597613 100755
--- a/app/controllers/origami/customers_controller.rb
+++ b/app/controllers/origami/customers_controller.rb
@@ -1,4 +1,4 @@
-class Origami::CustomersController < ApplicationController #BaseOrigamiController
+class Origami::CustomersController < BaseOrigamiController
load_and_authorize_resource
def index
end
diff --git a/app/controllers/origami/discounts_controller.rb b/app/controllers/origami/discounts_controller.rb
index db9eb9a6..8fddfa0f 100755
--- a/app/controllers/origami/discounts_controller.rb
+++ b/app/controllers/origami/discounts_controller.rb
@@ -1,4 +1,4 @@
-class Origami::DiscountsController < ApplicationController #BaseOrigamiController
+class Origami::DiscountsController < BaseOrigamiController
authorize_resource :class => false
#discount page show from origami index with selected order
diff --git a/app/controllers/origami/home_controller.rb b/app/controllers/origami/home_controller.rb
index c2356cae..27b9cc52 100755
--- a/app/controllers/origami/home_controller.rb
+++ b/app/controllers/origami/home_controller.rb
@@ -1,4 +1,4 @@
-class Origami::HomeController < ApplicationController #BaseOrigamiController
+class Origami::HomeController < BaseOrigamiController
before_action :set_dining, only: [:show]
def index
diff --git a/app/controllers/origami/in_duties_controller.rb b/app/controllers/origami/in_duties_controller.rb
index d26f4050..eaf23c5a 100755
--- a/app/controllers/origami/in_duties_controller.rb
+++ b/app/controllers/origami/in_duties_controller.rb
@@ -1,4 +1,4 @@
-class Origami::InDutiesController < ApplicationController #BaseOrigamiController
+class Origami::InDutiesController < BaseOrigamiController
before_action :set_in_duty, only: %i[show edit update edit_in_duty update_for_in_duty destroy destroy_in_duty]
# GET /in_duties
diff --git a/app/controllers/origami/jcb_controller.rb b/app/controllers/origami/jcb_controller.rb
index 124a3837..a8b77861 100755
--- a/app/controllers/origami/jcb_controller.rb
+++ b/app/controllers/origami/jcb_controller.rb
@@ -1,4 +1,4 @@
-class Origami::JcbController < ApplicationController #BaseOrigamiController
+class Origami::JcbController < BaseOrigamiController
def index
@sale_id = params[:sale_id]
diff --git a/app/controllers/origami/master_controller.rb b/app/controllers/origami/master_controller.rb
index 5a1868bc..ba97cad9 100755
--- a/app/controllers/origami/master_controller.rb
+++ b/app/controllers/origami/master_controller.rb
@@ -1,4 +1,4 @@
-class Origami::MasterController < ApplicationController #BaseOrigamiController
+class Origami::MasterController < BaseOrigamiController
def index
@sale_id = params[:sale_id]
diff --git a/app/controllers/origami/moveroom_controller.rb b/app/controllers/origami/moveroom_controller.rb
index 60f476fd..47a9fec9 100755
--- a/app/controllers/origami/moveroom_controller.rb
+++ b/app/controllers/origami/moveroom_controller.rb
@@ -1,4 +1,4 @@
-class Origami::MoveroomController < ApplicationController #BaseOrigamiController
+class Origami::MoveroomController < BaseOrigamiController
authorize_resource :class => false
diff --git a/app/controllers/origami/movetable_controller.rb b/app/controllers/origami/movetable_controller.rb
index ac5e8c88..4bec80a8 100755
--- a/app/controllers/origami/movetable_controller.rb
+++ b/app/controllers/origami/movetable_controller.rb
@@ -1,4 +1,4 @@
-class Origami::MovetableController < ApplicationController #BaseOrigamiController
+class Origami::MovetableController < BaseOrigamiController
authorize_resource :class => false
diff --git a/app/controllers/origami/mpu_controller.rb b/app/controllers/origami/mpu_controller.rb
index 42a67068..8e62ecda 100755
--- a/app/controllers/origami/mpu_controller.rb
+++ b/app/controllers/origami/mpu_controller.rb
@@ -1,4 +1,4 @@
-class Origami::MpuController < ApplicationController #BaseOrigamiController
+class Origami::MpuController < BaseOrigamiController
def index
@sale_id = params[:sale_id]
diff --git a/app/controllers/origami/orders_controller.rb b/app/controllers/origami/orders_controller.rb
index 71420c2b..85047ef0 100755
--- a/app/controllers/origami/orders_controller.rb
+++ b/app/controllers/origami/orders_controller.rb
@@ -1,4 +1,4 @@
-class Origami::OrdersController < ApplicationController #BaseOrigamiController
+class Origami::OrdersController < BaseOrigamiController
def show
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
diff --git a/app/controllers/origami/other_charges_controller.rb b/app/controllers/origami/other_charges_controller.rb
index 142a9dee..b0e6472c 100755
--- a/app/controllers/origami/other_charges_controller.rb
+++ b/app/controllers/origami/other_charges_controller.rb
@@ -1,4 +1,4 @@
-class Origami::OtherChargesController < ApplicationController #BaseOrigamiController
+class Origami::OtherChargesController < BaseOrigamiController
authorize_resource :class => false
def index
diff --git a/app/controllers/origami/others_payments_controller.rb b/app/controllers/origami/others_payments_controller.rb
index e5a5b127..ed3fc93c 100755
--- a/app/controllers/origami/others_payments_controller.rb
+++ b/app/controllers/origami/others_payments_controller.rb
@@ -1,4 +1,4 @@
-class Origami::OthersPaymentsController < ApplicationController #BaseOrigamiController
+class Origami::OthersPaymentsController < BaseOrigamiController
def index
@membership_rebate_balance = 0
@sale_id = params[:sale_id]
diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb
index 7d3cdbd3..965d6a4c 100755
--- a/app/controllers/origami/payments_controller.rb
+++ b/app/controllers/origami/payments_controller.rb
@@ -1,4 +1,4 @@
-class Origami::PaymentsController < ApplicationController #BaseOrigamiController
+class Origami::PaymentsController < BaseOrigamiController
authorize_resource :class => false
def index
end
diff --git a/app/controllers/origami/product_commissions_controller.rb b/app/controllers/origami/product_commissions_controller.rb
index b236c44d..74dd8095 100755
--- a/app/controllers/origami/product_commissions_controller.rb
+++ b/app/controllers/origami/product_commissions_controller.rb
@@ -1,4 +1,4 @@
-class Origami::ProductCommissionsController < ApplicationController #BaseOrigamiController
+class Origami::ProductCommissionsController < BaseOrigamiController
before_action :set_product_commission, only: [:show, :edit, :update, :destroy]
# GET /product_commissions
diff --git a/app/controllers/origami/redeem_payments_controller.rb b/app/controllers/origami/redeem_payments_controller.rb
index 0cc3506f..802ba51b 100755
--- a/app/controllers/origami/redeem_payments_controller.rb
+++ b/app/controllers/origami/redeem_payments_controller.rb
@@ -1,4 +1,4 @@
-class Origami::RedeemPaymentsController < ApplicationController #BaseOrigamiController
+class Origami::RedeemPaymentsController < BaseOrigamiController
def index
@sale_id = params[:sale_id]
payment_method = params[:payment_method]
diff --git a/app/controllers/origami/room_invoices_controller.rb b/app/controllers/origami/room_invoices_controller.rb
index 2d50de5e..8d805771 100755
--- a/app/controllers/origami/room_invoices_controller.rb
+++ b/app/controllers/origami/room_invoices_controller.rb
@@ -1,4 +1,4 @@
-class Origami::RoomInvoicesController < ApplicationController #BaseOrigamiController
+class Origami::RoomInvoicesController < BaseOrigamiController
def index
@room = DiningFacility.find(params[:room_id])
puts "room bookig lenght"
diff --git a/app/controllers/origami/rooms_controller.rb b/app/controllers/origami/rooms_controller.rb
index b4a306d2..f235aee3 100755
--- a/app/controllers/origami/rooms_controller.rb
+++ b/app/controllers/origami/rooms_controller.rb
@@ -1,4 +1,4 @@
-class Origami::RoomsController < ApplicationController #BaseOrigamiController
+class Origami::RoomsController < BaseOrigamiController
def index
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
diff --git a/app/controllers/origami/sale_edit_controller.rb b/app/controllers/origami/sale_edit_controller.rb
index aafaafe9..61c8b00f 100755
--- a/app/controllers/origami/sale_edit_controller.rb
+++ b/app/controllers/origami/sale_edit_controller.rb
@@ -1,4 +1,4 @@
-class Origami::SaleEditController < ApplicationController #BaseOrigamiController
+class Origami::SaleEditController < BaseOrigamiController
authorize_resource class: false
# Index for sale item void OR edit
def edit
diff --git a/app/controllers/origami/table_invoices_controller.rb b/app/controllers/origami/table_invoices_controller.rb
index 5f77eb04..4571ba87 100755
--- a/app/controllers/origami/table_invoices_controller.rb
+++ b/app/controllers/origami/table_invoices_controller.rb
@@ -1,4 +1,4 @@
-class Origami::TableInvoicesController < ApplicationController #BaseOrigamiController
+class Origami::TableInvoicesController < BaseOrigamiController
def index
@table = DiningFacility.find(params[:table_id])
puts "table bookig lenght"
diff --git a/app/controllers/origami/visa_controller.rb b/app/controllers/origami/visa_controller.rb
index 831dbf0f..4f750fb5 100755
--- a/app/controllers/origami/visa_controller.rb
+++ b/app/controllers/origami/visa_controller.rb
@@ -1,4 +1,4 @@
-class Origami::VisaController < ApplicationController #BaseOrigamiController
+class Origami::VisaController < BaseOrigamiController
def index
@sale_id = params[:sale_id]
diff --git a/app/controllers/origami/voucher_controller.rb b/app/controllers/origami/voucher_controller.rb
index 5dfed585..f71bcf4c 100755
--- a/app/controllers/origami/voucher_controller.rb
+++ b/app/controllers/origami/voucher_controller.rb
@@ -1,4 +1,4 @@
-class Origami::VoucherController < ApplicationController #BaseOrigamiController
+class Origami::VoucherController < BaseOrigamiController
def index
@sale_id = params[:sale_id]
diff --git a/app/controllers/settings/cashier_terminals_controller.rb b/app/controllers/settings/cashier_terminals_controller.rb
index 0808c0a7..3f87de5f 100755
--- a/app/controllers/settings/cashier_terminals_controller.rb
+++ b/app/controllers/settings/cashier_terminals_controller.rb
@@ -70,6 +70,6 @@ class Settings::CashierTerminalsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def settings_cashier_terminal_params
- params.require(:cashier_terminal).permit(:name, :is_active, :is_currently_login, :auto_print_receipt, :printer_name, :header, :footer, :font, :font_size, :show_tax, :show_cashier, :show_guest_info)
+ params.require(:cashier_terminal).permit(:name, :is_active, :is_currently_login, :auto_print_receipt, :printer_name, :header, :footer, :font, :font_size, :show_tax, :show_cashier, :show_guest_info,{ zone_ids: [] })
end
end
diff --git a/app/controllers/settings/order_queue_stations_controller.rb b/app/controllers/settings/order_queue_stations_controller.rb
index 72f910bc..73dea1f9 100755
--- a/app/controllers/settings/order_queue_stations_controller.rb
+++ b/app/controllers/settings/order_queue_stations_controller.rb
@@ -73,11 +73,6 @@ class Settings::OrderQueueStationsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def settings_order_queue_station_params
-# <<<<<<< HEAD
-# params.require(:order_queue_station).permit(:station_name, :is_active, :auto_print, :processing_items, :print_copy, :printer_name, :font_size, :cut_per_item, :use_alternate_name, :created_by)
-# =======
-# Don't Know { zone_ids: [] }
params.require(:order_queue_station).permit(:station_name, :is_active, :processing_items, :auto_print, :print_copy, :printer_name, :font_size, :cut_per_item, :use_alternate_name, :created_by,{ zone_ids: [] })
-# >>>>>>> b093a993ba002c92659bbb34338c55c031c11d87
end
end
diff --git a/app/models/cashier_terminal.rb b/app/models/cashier_terminal.rb
index d99b84a0..4f642d0a 100755
--- a/app/models/cashier_terminal.rb
+++ b/app/models/cashier_terminal.rb
@@ -1,2 +1,4 @@
class CashierTerminal < ApplicationRecord
+ has_many :cashier_terminal_by_zones
+ has_many :zones, through: :cashier_terminal_by_zones
end
diff --git a/app/models/cashier_terminal_by_zone.rb b/app/models/cashier_terminal_by_zone.rb
new file mode 100644
index 00000000..0f991d52
--- /dev/null
+++ b/app/models/cashier_terminal_by_zone.rb
@@ -0,0 +1,4 @@
+class CashierTerminalByZone < ApplicationRecord
+ belongs_to :zone
+ belongs_to :cashier_terminal
+end
diff --git a/app/models/seed_generator.rb b/app/models/seed_generator.rb
index a5bf5976..e620472d 100755
--- a/app/models/seed_generator.rb
+++ b/app/models/seed_generator.rb
@@ -2,6 +2,7 @@ class SeedGenerator < ApplicationRecord
# Generate ID for Tables
def self.generate_id(model, prefix)
seed = SeedGenerator.find_by_model(model)
+ next_no = seed.next
new_receipt_no = 0
if (seed.nil?)
@@ -9,18 +10,33 @@ class SeedGenerator < ApplicationRecord
seed.model = model
new_receipt_no = seed.next
seed.save
-
else
- current_no = seed.next
- seed.next = seed.next + seed.increase_by
- seed.current = current_no
- seed.save
+ # current_no = seed.next
+ # seed.next = seed.next + seed.increase_by
+ # seed.current = current_no
+ # seed.save
+ cur_val, next_val = self.update_seed(model, seed.next, seed.increase_by)
+
+ if next_no == cur_val
+ puts "SSS"
+ puts next_val
+ cur_val2, next_val2 = self.update_seed(model, next_val, seed.increase_by)
+ puts next_val2
+ padding_len = 15 - prefix.length
+ saleOrderId = prefix +"-"+ cur_val2.to_s.to_s.rjust((14-prefix.length)+1,'0')
+ puts saleOrderId
+ return saleOrderId
+ end
+
+ padding_len = 15 - prefix.length
+ saleOrderId = prefix +"-"+ cur_val.to_s.to_s.rjust((14-prefix.length)+1,'0')
+ return saleOrderId
+
end
padding_len = 15 - prefix.length
saleOrderId = prefix +"-"+ seed.current.to_s.to_s.rjust((14-prefix.length)+1,'0')
return saleOrderId
-
end
# Generate Receipt No
@@ -71,4 +87,24 @@ class SeedGenerator < ApplicationRecord
next_code = prefix + seed.current.to_s.to_s.rjust((count)+1,'0')
return next_code
end
+
+ def self.update_seed(model, current, inc)
+ cur_val = 0
+ next_val = 0
+ nex = current + inc
+
+ update_sql = "update seed_generators set current= #{current}, next= #{nex} where model='#{model}';";
+ select_sql = "select * from seed_generators where model='#{model}';"
+ update_result = ActiveRecord::Base.connection.execute(update_sql);
+
+ select_result = ActiveRecord::Base.connection.execute(select_sql);
+
+ select_result.each do |row|
+ p row
+ cur_val = row [3]
+ next_val = row[4]
+ end
+
+ return cur_val, next_val
+ end
end
diff --git a/app/models/zone.rb b/app/models/zone.rb
index 164b80f4..daef0c8b 100755
--- a/app/models/zone.rb
+++ b/app/models/zone.rb
@@ -3,6 +3,7 @@ class Zone < ApplicationRecord
has_many :tables, dependent: :destroy
has_many :rooms, dependent: :destroy
has_many :order_queue_stations
+ has_many :cashier_terminals
# validations
validates_presence_of :name, :created_by
diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb
index a1b797a5..b74f33a9 100755
--- a/app/views/crm/customers/index.html.erb
+++ b/app/views/crm/customers/index.html.erb
@@ -1,15 +1,15 @@
-
-->
diff --git a/app/views/inventory/inventory_definitions/_form.html.erb b/app/views/inventory/inventory_definitions/_form.html.erb
index f5149fee..7a5f06ff 100755
--- a/app/views/inventory/inventory_definitions/_form.html.erb
+++ b/app/views/inventory/inventory_definitions/_form.html.erb
@@ -1,4 +1,7 @@
-<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
+
+
+
+ <%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
<%= f.error_notification %>
@@ -45,12 +48,25 @@
- <%= link_to 'Back', inventory_path, class: 'btn bg-default waves-effect' %>
- <%= f.button :submit, class: 'btn bg-blue wave' %>
+ <%= f.submit 'Submit', class: 'btn bg-blue waves-effect' %>
<% end %>
+
+
+
+
+
+ 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
+
+
+
+
+