update conflix sarb rb

This commit is contained in:
Aung Myo
2017-11-06 14:17:47 +06:30
29 changed files with 425 additions and 150 deletions

View File

@@ -56,7 +56,7 @@ gem 'jquery-rails'
gem 'jquery-ui-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks', '~> 2.1'
#gem 'jquery-turbolinks', '~> 2.1'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production

View File

@@ -1,39 +1,39 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.3)
actionpack (= 5.1.3)
actioncable (5.1.4)
actionpack (= 5.1.4)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.3)
actionpack (= 5.1.3)
actionview (= 5.1.3)
activejob (= 5.1.3)
actionmailer (5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.3)
actionview (= 5.1.3)
activesupport (= 5.1.3)
actionpack (5.1.4)
actionview (= 5.1.4)
activesupport (= 5.1.4)
rack (~> 2.0)
rack-test (~> 0.6.3)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.3)
activesupport (= 5.1.3)
actionview (5.1.4)
activesupport (= 5.1.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.3)
activesupport (= 5.1.3)
activejob (5.1.4)
activesupport (= 5.1.4)
globalid (>= 0.3.6)
activemodel (5.1.3)
activesupport (= 5.1.3)
activerecord (5.1.3)
activemodel (= 5.1.3)
activesupport (= 5.1.3)
activemodel (5.1.4)
activesupport (= 5.1.4)
activerecord (5.1.4)
activemodel (= 5.1.4)
activesupport (= 5.1.4)
arel (~> 8.0)
activesupport (5.1.3)
activesupport (5.1.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
@@ -43,9 +43,9 @@ GEM
bcrypt (3.1.11)
bindex (0.5.0)
builder (3.2.3)
byebug (9.0.6)
byebug (9.1.0)
cancancan (1.17.0)
carrierwave (1.1.0)
carrierwave (1.2.1)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
@@ -59,27 +59,29 @@ GEM
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
connection_pool (2.2.1)
crass (1.0.2)
cups (0.0.7)
database_cleaner (1.6.1)
database_cleaner (1.6.2)
diff-lcs (1.3)
erubi (1.6.1)
erubi (1.7.0)
execjs (2.7.0)
factory_girl (4.8.0)
factory_girl (4.9.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0)
factory_girl_rails (4.9.0)
factory_girl (~> 4.9.0)
railties (>= 3.0.0)
faker (1.7.3)
faker (1.8.4)
i18n (~> 0.5)
ffi (1.9.18)
filterrific (2.1.2)
font-awesome-rails (4.7.0.2)
railties (>= 3.2, < 5.2)
globalid (0.4.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
httparty (0.15.5)
httparty (0.15.6)
multi_xml (>= 0.5.2)
i18n (0.8.6)
i18n (0.9.0)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
@@ -87,9 +89,6 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-turbolinks (2.1.0)
railties (>= 3.1.0)
turbolinks
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
kaminari (1.0.1)
@@ -107,88 +106,94 @@ GEM
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.0.3)
loofah (2.1.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.6.6)
mime-types (>= 1.16, < 4)
mail (2.7.0)
mini_mime (>= 0.1.1)
material_icons (2.2.1)
railties (>= 3.2)
method_source (0.8.2)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.2.0)
mini_mime (0.1.4)
mini_portile2 (2.3.0)
minitest (5.10.3)
momentjs-rails (2.17.1)
railties (>= 3.1)
multi_json (1.12.1)
multi_json (1.12.2)
multi_xml (0.6.0)
mysql2 (0.4.6)
mysql2 (0.4.9)
nested_form (0.3.2)
nio4r (2.1.0)
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
pdf-core (0.7.0)
pg (0.20.0)
pg (0.21.0)
prawn (2.2.2)
pdf-core (~> 0.7.0)
ttfunk (~> 1.5)
prawn-table (0.2.2)
prawn (>= 1.3.0, < 3.0.0)
puma (3.9.1)
puma (3.10.0)
rack (2.0.3)
rack-cors (0.4.1)
rack-cors (1.0.2)
rack-protection (2.0.0)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (5.1.3)
actioncable (= 5.1.3)
actionmailer (= 5.1.3)
actionpack (= 5.1.3)
actionview (= 5.1.3)
activejob (= 5.1.3)
activemodel (= 5.1.3)
activerecord (= 5.1.3)
activesupport (= 5.1.3)
rack-test (0.7.0)
rack (>= 1.0, < 3)
rails (5.1.4)
actioncable (= 5.1.4)
actionmailer (= 5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
activemodel (= 5.1.4)
activerecord (= 5.1.4)
activesupport (= 5.1.4)
bundler (>= 1.3.0)
railties (= 5.1.3)
railties (= 5.1.4)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.1.3)
actionpack (= 5.1.3)
activesupport (= 5.1.3)
railties (5.1.4)
actionpack (= 5.1.4)
activesupport (= 5.1.4)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.0.0)
rb-fsevent (0.9.8)
rake (12.2.1)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redis (3.3.3)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
redis (4.0.1)
rspec-core (3.7.0)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-rails (3.6.0)
rspec-support (~> 3.7.0)
rspec-rails (3.7.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
ruby-ole (1.2.12.1)
sass (3.4.24)
sass (3.5.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
@@ -197,13 +202,13 @@ GEM
tilt (>= 1.1, < 3)
schema_to_scaffold (0.8.0)
activesupport (>= 3.2.1)
shoulda-matchers (3.1.1)
shoulda-matchers (3.1.2)
activesupport (>= 4.0.0)
sidekiq (5.0.3)
sidekiq (5.0.5)
concurrent-ruby (~> 1.0)
connection_pool (~> 2.2, >= 2.2.0)
rack-protection (>= 1.5.0)
redis (~> 3.3, >= 3.3.3)
redis (>= 3.3.4, < 5)
simple_form (3.5.0)
actionpack (> 4, < 5.2)
activemodel (> 4, < 5.2)
@@ -217,22 +222,22 @@ GEM
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
tether-rails (1.4.0)
rails (>= 3.1)
thor (0.19.4)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.7)
tilt (2.0.8)
to_xls-rails (1.3.1)
spreadsheet (>= 0.8.5)
ttfunk (1.5.1)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.3)
tzinfo (1.2.3)
tzinfo (1.2.4)
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
@@ -266,7 +271,6 @@ DEPENDENCIES
httparty (~> 0.15.5)
jbuilder (~> 2.5)
jquery-rails
jquery-turbolinks (~> 2.1)
jquery-ui-rails
kaminari (~> 1.0.1)
listen (~> 3.0.5)

0
app/assets/images/SX-Logo-small.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 989 B

After

Width:  |  Height:  |  Size: 989 B

0
app/assets/images/SX-logo.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -27,12 +27,10 @@
//= require custom.js
$(document).on('turbolinks:load', function() {
$('.datepicker').bootstrapMaterialDatePicker({
format: 'DD-MM-YYYY',
clearButton: true,
weekStart: 1,
time: false
});
});

View File

@@ -79,7 +79,6 @@ $(function(){
$(".menu_category").on("click", function(){
var menu_id = $(this).find(".menu-id").text();
var url = "get_menu_category/"+menu_id;
console.log(url)
show_menu_item_list(url);
});
//End menu category Click

View File

@@ -37,7 +37,6 @@
//= require BSBMaterial/demo.js
//= require custom.js
$(document).ready(function() {
$('.count-to').countTo();
@@ -120,5 +119,234 @@ function export_to(path)
window.location = path+"?"+ form_params;
}
/*Oqs Js file */
$(document).ready(function(){
$(".nav-completed").on("click", function(){
$("#completed").removeClass('hide')
$(".oqs_append").addClass('hide')
});
$(".oqs_click").on("click", function(){
$(".oqs_click").removeClass('oqs_active');
$(".queue_station").removeClass('queue_station_box');
$("#completed").addClass('hide');
$(".oqs_append").removeClass('hide');
$(this).addClass('oqs_active');
$(".queue_station").addClass('queue_station_box');
var oqs_id = $(this).find(".oqs-id").text();
var url = 'oqs/get_items/'+oqs_id;
show_details(url);
}); //End Click
function show_details(url){
var oqs_append = $('.oqs_append');
oqs_append.empty();
var filter = $('.filter').text();
//Start Ajax
$.ajax({
type: "GET",
url: url,
data: {'filter':filter},
dataType: "json",
success: function(data) {
for(var field in data) {
var price = parseFloat(data[field].price).toFixed(2);
if (data[field]["options"] == "[]" || data[field]["options"] == "") {
var options = "";
}else{
var options = data.options;
}
var date = new Date(data[field]["created_at"]);
var show_date = date.getDate() + "-" + date.getMonth() + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes();
row ='<div class="card queue_station" data-date="'+data[field]["order_id"]+'">'
+'<div class="card-block">'
+'<h4 class="card-title">'
+'<span class="order-zone-type">'+data[field]["table_type"]+'- </span>'
+'<span class="order-zone">'+ data[field]["zone"] +'</span>'
+'<small class="pull-right">'+ data[field]["order_id"] +'- </small>'
+'</h4>'
+'<h4>'
+'<span class="order-item">'+ data[field]["item_name"] +'- </span>'
+'<span class="order-qty">'+ data[field]["qty"] +'- </span>'
+'</h4>'
+'<p class="card-text item-options">'+ options +'</p>'
+'<p class="card-text">'
+'<small class="text-muted">Order at'
+'<span class="order-at">'+ show_date +'</span> - '
+'<span class="order-by">'+ data[field]["item_order_by"] +'</span> '
+'</small> '
+'</p>'
+'<p class="hidden order-customer">'+ data[field]["customer_name"] +'</p> '
+'<p class="hidden assigned-order-item">'+ data[field]["assigned_order_item_id"] +'</p> '
+'</div>'
+'<div class="card-footer">'
+'<button id="edit_'+ data[field]["assigned_order_item_id"]+'" class="btn btn-warning order-item order-item-edit">EDIT</button>'
+' <button id="assigned_queue_' + data[field]["assigned_order_item_id"] +'" class="btn btn-primary order-item order-complete">COMPLETE</button>'
+'</div>'
+'</div>';
$('.oqs_append').append(row);
}
}
});
//end Ajax
}
$(document).on('click', '.queue_station', function(event){
var orderZone=$(this).children().children().children('.order-zone').text().trim();
// var orderItem=$(this).children().children().children('.order-item').text();
var assigned_item_id = $(this).children().find(".assigned-order-item").text();
var orderQty = $(this).children().children().children('.order-qty').text();
var orderBy = $(this).children().children().children().children('.order-by').text();
var orderAt = $(this).children().children().children().children('.order-at').text();
var orderCustomer = $(this).children().children('.order-customer').text();
var order_status = $(this).children().children('.order-status').text();
$('#order-title').text("ORDER DETAILS - " + orderZone);
$('#order-by').text(orderBy);
$('#order-at').text(orderAt);
$('#order-customer').text(orderCustomer);
$('#order-from').text(orderZone);
// clear order items
$("#oqs-order-details-table").children("tbody").empty();
// Call get_order_items() for Order Items by dining
$.ajax({
type: 'GET',
url: '/oqs/' + orderZone,
data: { 'status' : order_status },
success: function(res){
for (i = 0; i < res.length; i++) {
var data = JSON.stringify(res[i]);
var parse_data = JSON.parse(data);
var order_item_row = "<tr>" +
"<td class='order-items' style='width:80%; text-align:left'>" + parse_data.item_name + "</td>" +
"<td class='order-qty' style='width:20%; text-align:right'>" + parse_data.qty + "</td>" +
"</tr>";
$("#oqs-order-details-table").children("tbody").append(order_item_row);
}
}
})
// $('#order-items').text(orderItem);
// $('#order-qty').text(orderQty);
$('.queue_station').removeClass('selected-item');
$(this).addClass('selected-item');
});
$(document).on('click', '.order-item-edit', function(event){
var _self = $(this); // To know in ajax return
var assigned_item_id=$(this).attr('id').substr(5);
window.location.href = '/oqs/'+ assigned_item_id + "/edit"
});
// complete for queue item
$(document).on('click', '.order-complete', function(event){
//e.preventDefault();
var _self = $(this); // To know in ajax return
var assigned_item_id=$(this).attr('id').substr(15);
var params = { 'id':assigned_item_id };
// Call update_delivery_status() for changed delivery and move to delivery
$.ajax({
type: 'POST',
url: '/oqs/update_delivery',
data: params,
dataType: 'json',
success: function(data){
for (i = 0; i < data.length; i++) {
var queue_station = $('#assigned_queue_' + data[i]).parent().parent(".queue_station");
var station = queue_station.parent().parent().attr('id');
// Remove a queue card from current station
queue_station.remove();
// Remove a queue card from current station
queue_station.children('.card-footer').remove();
// Add removed queue card from station to completed
$("#completed").children('.card-columns').append(queue_station);
// update queue item count in each station
var station_count=parseInt($("#"+station+"_count").text()) - 1;
$("#"+station+"_count").text(station_count);
}
// update queue item count in completed station
$("#completed_count").text(parseInt($("#completed_count").text()) + data.length);
alert("updated!");
// Page reload
location.reload();
}
});
});
// Print Order Item
$(document).on('click', '#print_order_item', function(event){
var assigned_item_id = $('.selected-item').children('.card-block').children('.assigned-order-item').text();
var options = $('.selected-item').children('.card-block').find('.item-options').text();
var params = { 'options':options };
$.ajax({
type: 'GET',
url: '/oqs/print/print/'+assigned_item_id,
success: function(data){ }
});
});
// Print Order Summary
// $('#print_order_summary').on('click',function(){
$(document).on('click', '#print_order_summary', function(event){
var table_name=$('.selected-item').children().children().children('.order-zone').text().trim();
var assigned_item_id=$('.selected-item').children('.card-block').children('.assigned-order-item').text();
var params = { 'table_name':table_name };
$.ajax({
type: 'GET',
url: '/oqs/print/print_order_summary/'+assigned_item_id,
data: params,
success: function(data){ }
});
});
// Qty update for OQS Edit Controller
$('#qty-update').on('click', function(){
var qty_weight = $("input[name='qty_weight']").val();
var remarks = $("textarea[name='remarks']").val();
var order_items_id = $(this).attr('data-id');
var params = { 'order_items_id': order_items_id, 'qty_weight': qty_weight, 'remarks': remarks }
$.ajax({
type: 'POST',
url: '/oqs/' + order_items_id,
data: params,
success: function(result){
alert("Updated!");
window.location.href = '/oqs';
}
});
});
});

View File

@@ -46,7 +46,6 @@
margin-left:-40px !important
}
#sxModal {
display: none;
overflow: auto;

View File

@@ -150,4 +150,8 @@ section.content{
filter: alpha(opacity=100); /* ie */
-moz-opacity: 1; /* mozilla */
}
#count {
text-align: center;
}

View File

@@ -13,6 +13,24 @@
/* Reset */
.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: 5px;
padding-right: 5px;
}
.col-lg-1, .col-md-1, .col-sm-1,col-xl-1{
padding-left: 1px ;
padding-right: 1px ;
}
.ls-closed section.content {
margin-left: 5px;
}
section.content {
margin: 70px 5px 0 225px;
}
.table {
margin-bottom: 0px;
}
@@ -29,8 +47,18 @@ select.form-control {
font-size: 18px !important;
}
@media (min-width:769px) and (max-width:1024px) {
.btn-block {
font-size: 11px !important;
}
}
/* End Reset */
#back {
padding: 0px 0px 7px 0px;
}
.order-info {
min-height:300px;
max-height:500px;

View File

@@ -1,8 +1,8 @@
/* Show it is fixed to the top */
// body {
// min-height: 75rem;
// padding-top: 4.5rem;
// }
/* body {
min-height: 75rem;
padding-top: 4.5rem;
}*/
.setting_nav{
background-color: #2f5663;
@@ -14,8 +14,8 @@ ul.navbar-nav li a{
}
ul.dropdown-menu li a{
text-decoration :none;
color :#525252;
text-decoration:none;
color:#525252;
}
.setting_breadcrumb{
@@ -181,16 +181,16 @@ ul.dropdown-menu li a{
@media (min-width: 62em) {
.card-columns {
-webkit-column-count: 4;
-moz-column-count: 4;
column-count: 4;
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
}
}
@media (min-width: 75em) {
.card-columns {
-webkit-column-count: 5;
-moz-column-count: 5;
column-count: 5;
-webkit-column-count: 4;
-moz-column-count: 4;
column-count: 4;
}
}

View File

@@ -3666,7 +3666,7 @@ textarea.input-group-sm > .input-group-btn > .btn {
}
.navbar-brand {
float: left;
padding: 15px 15px;
padding: 0px 0px;
font-size: 18px;
line-height: 20px;
}

View File

@@ -1,4 +1,4 @@
class Origami::AddordersController < BaseOrigamiController
class Origami::AddordersController < ApplicationController#BaseOrigamiController
# before_action :set_dining, only: [:detail]
def index

View File

@@ -614,8 +614,8 @@ def self.get_item_query()
" JOIN shift_sales sh ON sh.`id` = sales.shift_sale_id" +
" JOIN menu_categories mc ON mc.id = mi.menu_category_id ")
# "JOIN employee_accesses ea ON ea.`employee_id` = sales.cashier_id ")
query = query.where("i.unit_price > 0")
query = query.joins(" JOIN accounts acc ON acc.id = mi.account_id")
query = query.where("i.unit_price > 0")
query = query.group('i.product_code ').order("mi.account_id, mi.menu_category_id")
end

View File

@@ -12,16 +12,24 @@ class SeedGenerator < ApplicationRecord
return saleOrderId
end
# Generate Receipt No
# Generate Receipt No for number order (1,2,3) Don't touch
def self.new_receipt_no
# Only return seed no
cur_val, next_val = self.update_seed("sale")
seed = SeedGenerator.find_by_model("sale")
new_receipt_no = 0
if (seed.nil?)
seed = SeedGenerator.new()
seed.model = "sale"
new_receipt_no = seed.next
seed.save
if (cur_val == 0)
cur_val, next_val = self.execute_query("sale")
end
else
current_no = seed.next
seed.next = seed.next
seed.current = current_no
seed.save
end
return cur_val
return seed.current
end
# Generate for 4 digit Code

View File

@@ -91,7 +91,7 @@ class ReceiptBillPdf < Prawn::Document
bounding_box([0,y_position], :width =>self.description_width, :height => self.item_height) do
text "Receipt No: #{sale_data.receipt_no}", :size => self.item_font_size,:align => :left
end
bounding_box([self.description_width,y_position], :width => self.price_num_width, :height => self.item_height) do
bounding_box([self.description_width - 2,y_position], :width => self.price_num_width, :height => self.item_height) do
text "#{ sale_data.bookings[0].dining_facility.type } - #{ sale_data.bookings[0].dining_facility.name }" , :size => self.item_font_size,:align => :right
end
move_down 5
@@ -100,7 +100,7 @@ class ReceiptBillPdf < Prawn::Document
bounding_box([0, y_position], :width =>self.label_width, :height => self.item_height) do
text "W: #{sale_data.requested_by}" , :size => self.item_font_size, :align => :left
end
bounding_box([self.label_width,y_position], :width =>self.label_width, :height => self.item_height) do
bounding_box([self.label_width - 2,y_position], :width =>self.label_width, :height => self.item_height) do
text "C: #{sale_data.cashier_name}", :size => self.item_font_size,:align => :right
end
move_down 5

View File

@@ -95,7 +95,6 @@
<% end %>
</div>
<!-- <script src="js/Chart.js"></script> -->
<script>
$(document).ready(function(){
var top_products = JSON.parse('<%= @top_products.to_json.html_safe %>');

View File

@@ -21,8 +21,6 @@
</a>
</div>
<!-- Start Delete confirrm text !-->
<div class="navbar-right">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<% if current_login_employee %>

View File

@@ -7,6 +7,7 @@
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<title>SmartSales : Restaurant</title>
<%= csrf_meta_tags %>
<!-- Favicon-->
<link rel="icon" href="/favicon.ico" type="image/x-icon">

View File

@@ -187,6 +187,7 @@
</div>
</div>
</div>
<!-- <script type="text/javascript">
$(document).ready(function(){
@@ -414,3 +415,4 @@
});
});
</script> -->
>>>>>>> 01c4eeca81e1eac7bf7fe5854142a9663e104249

View File

@@ -26,7 +26,11 @@
</div>
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10">
<button type="button" class="btn btn-default btn-md float-right" id="back"><i class="fa fa-arrow-left"></i> BACK </button> <br>
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
<i class="material-icons">reply</i>
Back
</button>
<br>
<div class="card-header">
<div>
<strong id="order-title">ORDER DETAILS </strong>| Table<%=@table.name%>

View File

@@ -52,7 +52,10 @@
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-block" id='back' >Back</button>
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
<i class="material-icons">reply</i>
Back
</button>
</div>
</div>
<script>

View File

@@ -314,36 +314,39 @@
<div class="col-lg-1 col-md-1 col-sm-1">
<!-- Waiter Buttons -->
<button type="button" class="btn btn-block btn-default waves-effect" id='back'><i class="fa fa-arrow-left"></i> Back</button>
<button type="button" id="add_order" class="btn btn-block btn- bg-blue waves-effect">Add Order</button>
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
<i class="material-icons">reply</i>
Back
</button>
<button type="button" id="add_order" class="btn btn-block bg-blue waves-effect">Add Order</button>
<% if @dining.status != "available" %>
<% if @status_order == 'order' %>
<button type="button" id="customer" class="btn btn-block btn- bg-blue waves-effect" disabled>Customer</button>
<button type="button" class="btn btn-block btn- bg-blue waves-effect" disabled>Edit</button>
<button type="button" id="discount" class="btn btn-block btn- bg-blue waves-effect" disabled>Discount</button>
<button type="button" id="other-charges" class="btn btn-block btn- bg-blue waves-effect" disabled>Charges</button>
<button type="button" class="btn btn-block btn- bg-blue waves-effect" id='move'>Move</button>
<button type="button" id="request_bills" class="btn btn-block btn- bg-blue waves-effect">Req.Bill</button>
<button type="button" id="first_bill" class="btn btn-block btn- bg-blue waves-effect" disabled>First Bill</button>
<button type="button" id="pay" class="btn btn-block btn- bg-blue waves-effect" disabled>Pay</button>
<button type="button" class="btn btn-block btn- bg-blue waves-effect" disabled> Void</button>
<button type="button" id="customer" class="btn btn-block bg-blue waves-effect" disabled>Customer</button>
<button type="button" class="btn btn-block bg-blue waves-effect" disabled>Edit</button>
<button type="button" id="discount" class="btn btn-block bg-blue waves-effect" disabled>Discount</button>
<button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect" disabled>Charges</button>
<button type="button" class="btn btn-block bg-blue waves-effect" id='move'>Move</button>
<button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect">Req.Bill</button>
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect" disabled>First Bill</button>
<button type="button" id="pay" class="btn btn-block bg-blue waves-effect" disabled>Pay</button>
<button type="button" class="btn btn-block bg-blue waves-effect" disabled> Void</button>
<% end %>
<% if @status_sale == 'sale' %>
<button type="button" id="customer" class="btn btn-block btn- bg-blue waves-effect">Customer</button>
<button type="button" class="btn btn-block btn- bg-blue waves-effect" id='edit'>Edit</button>
<button type="button" id="discount" class="btn btn-block btn- bg-blue waves-effect">Discount</button>
<button type="button" id="other-charges" class="btn btn-block btn- bg-blue waves-effect">Charges</button>
<button type="button" id="commissions" class="btn btn-block btn- bg-blue waves-effect">Commissions</button>
<button type="button" id="in_duties" class="btn btn-block btn- bg-blue waves-effect">In Duties</button>
<button type="button" class="btn btn-block btn- bg-blue waves-effect" id='move' disabled="">Move</button>
<button type="button" id="request_bills" class="btn btn-block btn- bg-blue waves-effect" disabled> Req.Bill</button>
<button type="button" id="first_bill" class="btn btn-block btn- bg-blue waves-effect">First Bill</button>
<button type="button" id="pay" class="btn btn-block btn- bg-blue waves-effect">Pay</button>
<button type="button" id="void" class="btn btn-block btn- bg-blue waves-effect"> Void</button>
<button type="button" id="customer" class="btn btn-block bg-blue waves-effect">Customer</button>
<button type="button" class="btn btn-block bg-blue waves-effect" id='edit'>Edit</button>
<button type="button" id="discount" class="btn btn-block bg-blue waves-effect">Discount</button>
<button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect">Charges</button>
<button type="button" id="commissions" class="btn btn-block bg-blue waves-effect">Commissions</button>
<button type="button" id="in_duties" class="btn btn-block bg-blue waves-effect">In Duties</button>
<button type="button" class="btn btn-block bg-blue waves-effect" id='move' disabled="">Move</button>
<button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect" disabled> Req.Bill</button>
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button>
<button type="button" id="pay" class="btn btn-block bg-blue waves-effect">Pay</button>
<button type="button" id="void" class="btn btn-block bg-blue waves-effect"> Void</button>
<% end %>
<!-- Cashier Buttons -->
<!-- <button type="button" id="re-print" class="btn btn-block btn- bg-blue waves-effect" >Re.Print</button> -->
<!-- <button type="button" id="re-print" class="btn btn-block bg-blue waves-effect" >Re.Print</button> -->
<% end %>
</div>
</div>

View File

@@ -30,7 +30,7 @@
</div>
<div class='col-md-8'>
<div class="row">
<div class="col-lg-6 col-md-1 col-sm-1">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="row bottom">
<div class=" cashier_number " data-value="1" data-type="num">1</div>
<div class=" cashier_number left" data-value="2" data-type="num">2</div>

View File

@@ -31,8 +31,8 @@ Rails.application.config.assets.precompile += %w( CRM.css )
Rails.application.config.assets.precompile += %w( CRM.js )
# --- Customer/ Customer - Crm ----
Rails.application.config.assets.precompile += %w( jquery-confirm.css )
Rails.application.config.assets.precompile += %w( jquery-confirm.js )
# Rails.application.config.assets.precompile += %w( jquery-confirm.css )
# Rails.application.config.assets.precompile += %w( jquery-confirm.js )
# --- Image Uploader ----
Rails.application.config.assets.precompile += %w( fileinput.min.js )

View File

@@ -21,7 +21,6 @@ en:
products: "Products"
promotions: "Promotions"
commissions: "Commissions"
commissioner: "Commissioner"
commissioners: "Commissioners"
printer: "Printer"
logout: "Logout"
@@ -101,7 +100,6 @@ en:
discount: "DISCOUNT"
charges: "CHARGES"
commissions: "COMMISSIONS"
commissioners: "COMMISSIONERS"
in_duties: "IN DUTIES"
move: "MOVE"
req_bill: "REQ BILL"
@@ -580,10 +578,8 @@ en:
stock_check_txt: "stock check"
detail_txt: "detail"
no_data_txt: "There is no data for search"
assign_txt: "to assign "
remove_txt: "to remove "
cancel_btn_txt: "to cancel "
image_btn_txt: "to upload "
create_btn_txt: "to create "

View File

@@ -14,6 +14,7 @@ namespace :clear do
ShiftSale.delete_all
PaymentJournal.delete_all
DiningFacility.update_all(status:'available')
CashierTerminal.update_all(is_currently_login: 1)
puts "Clear Data Done."
end
end