From 0fef2d5ba25f405d2a4bb3a8033593cc51b7f622 Mon Sep 17 00:00:00 2001 From: code2lab Date: Wed, 29 May 2019 18:37:58 +0630 Subject: [PATCH] wt updated --- app/assets/images/online_order_icon.png | Bin 0 -> 376 bytes app/assets/images/user_icon.png | Bin 0 -> 819 bytes app/assets/stylesheets/CRM.scss | 61 +++++++++- app/assets/stylesheets/OQS.scss | 53 ++++++++- app/assets/stylesheets/application.scss | 51 ++++++++ .../stylesheets/inventory_definitions.scss | 53 ++++++++- app/assets/stylesheets/origami.scss | 75 ++++++++++-- .../reports/dailysale_controller.rb | 8 +- app/models/sale.rb | 11 -- app/views/home/dashboard.html.erb | 95 +++++++++------ app/views/home/index.html.erb | 10 +- app/views/layouts/_header.html.erb | 64 +++++----- app/views/reports/dailysale/index.html.erb | 110 ++++++++---------- app/views/reports/shiftsale/index.html.erb | 14 +-- config/initializers/action_controller.rb | 10 +- 15 files changed, 439 insertions(+), 176 deletions(-) create mode 100644 app/assets/images/online_order_icon.png create mode 100644 app/assets/images/user_icon.png diff --git a/app/assets/images/online_order_icon.png b/app/assets/images/online_order_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b9e74994e2a0562238abbafa33302aae28fb83cc GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ zFzyCnMyofE9{~j=OI#yLg7ec#$`gxH8OqDc^)mCai<1)zQuXqS(r3T3kpe3E>gnPb z;?a3`if!H@2LZSAW&zy}J@p06#SG;q6pNUp{3d8QY3^XL7ZnPb)1ai`biu)y(Us-m z;txs!+Y*mwi$Bp`d-MA<_f04Ea~PM>*&tQ4NOb<_5k zrb;8O3oOqLmdNRWq-MF)+T zZ)Wx*B+$di8wZV;x1oU^MqWB-#Jma(^f2SxM=J#Y7qtt^map!)hq+{Qm>E8(<>80&fJc4fvYC#CM?Iqi>fQ zi7~TJlHMl>`DkXd9(}tSiSSy8NJJJ!o+LQ8{puqISPR@)Mt$4_dh*V93BW$!RJ3ov zFmMBy0e(l@3~(JNR>hqF_U4!QzeEOstH7V=N?!t6&WM3cz~v}rG1Azx5;<2V(M4qy z{T@)RGi<&@hK>RQROVwn(f$Z<1(>fBR|Xyc#{kb|rX>c}1LuGb%cz00%mU|u4W0%J zIMd)NX3acsmbBkcfL>rM2LrW?(c~LSQ x(lS`vP`5^?Oy+)Oo=!T}wDrFyI&^3={sL$jF$kuj;i&)s002ovPDHLkV1l~&SzZ7D literal 0 HcmV?d00001 diff --git a/app/assets/stylesheets/CRM.scss b/app/assets/stylesheets/CRM.scss index de416831..2febb6d0 100755 --- a/app/assets/stylesheets/CRM.scss +++ b/app/assets/stylesheets/CRM.scss @@ -69,11 +69,11 @@ z-index: 1100; } -#sxModal-Content { +#sxModal-Content { position: relative; left: 42%; top: 30%; - background-color: #32ad1a; + background-color: #32ad1a; color: #fff; text-align: center; width: 200px; @@ -92,7 +92,7 @@ #videoElement { width: 480px; height: 375px; - + } .cashier_number{ @@ -243,7 +243,7 @@ i.logout_icon{ span.round-tab:hover{ color: white; border: 1px solid #fff; - background-color:#2196F3; + background-color:#2196F3; } .wizard .nav-tabs > li { width: 25%; @@ -268,4 +268,55 @@ i.logout_icon{ font-size: 14px; color: #FFFFFF; } -/*customer modal UI */ \ No newline at end of file +/*customer modal UI */ + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/assets/stylesheets/OQS.scss b/app/assets/stylesheets/OQS.scss index 6a97bdcb..11fa7952 100755 --- a/app/assets/stylesheets/OQS.scss +++ b/app/assets/stylesheets/OQS.scss @@ -120,4 +120,55 @@ i.logout_icon{ .table-width{ width: 100%; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index f3cd1157..6c5f0821 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -130,3 +130,54 @@ i.logout_icon{ #setting{ display: none;} .menu-up{ display: none;} } + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/assets/stylesheets/inventory_definitions.scss b/app/assets/stylesheets/inventory_definitions.scss index aa02f08d..e9eb5d80 100755 --- a/app/assets/stylesheets/inventory_definitions.scss +++ b/app/assets/stylesheets/inventory_definitions.scss @@ -279,4 +279,55 @@ tr.discount-item-row:hover { i.logout_icon{ position: relative; top: 5px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 2558d846..5d933f39 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -62,8 +62,8 @@ select.form-control { /* .order-info { - min-height:300px; - max-height:500px; + min-height:300px; + max-height:500px; overflow:auto } */ @@ -222,7 +222,7 @@ select.form-control { margin-right: 15px; color:#fff !important; # background-color: green !important; -} +} /* Reciept Style */ #order-charges-table td { @@ -336,11 +336,11 @@ tr.discount-item-row:hover { z-index: 1100; } -#sxModal-Content { +#sxModal-Content { position: relative; left: 42%; top: 30%; - background-color: #32ad1a; + background-color: #32ad1a; color: #fff; text-align: center; width: 200px; @@ -373,7 +373,7 @@ tr.discount-item-row:hover { opacity: 1; filter: alpha(opacity=100); /* ie */ -moz-opacity: 1; /* mozilla */ - + } /* For Payment Page */ @@ -465,7 +465,7 @@ iframe { } .tax-btn-box { - width: 230px; + width: 230px; height: 80px; } @@ -518,12 +518,12 @@ nav.pagination .page a:hover, opacity: 1; z-index: 101; filter: alpha(opacity=100); /* ie */ - -moz-opacity: 1; /* mozilla */ + -moz-opacity: 1; /* mozilla */ } .existing_invoice{ background-color:#ffab51; color:#fff; - + } @@ -628,7 +628,7 @@ nav.pagination .page a:hover, span.round-tab:hover{ color: white; border: 1px solid #fff; - background-color:#2196F3; + background-color:#2196F3; } .wizard .nav-tabs > li { width: 25%; @@ -656,6 +656,57 @@ nav.pagination .page a:hover, /*customer modal UI */ .payment-btn-box { - width: 130px; + width: 130px; height: 50px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/controllers/reports/dailysale_controller.rb b/app/controllers/reports/dailysale_controller.rb index 838536a7..6fb7fe3f 100755 --- a/app/controllers/reports/dailysale_controller.rb +++ b/app/controllers/reports/dailysale_controller.rb @@ -1,6 +1,6 @@ class Reports::DailysaleController < BaseReportController authorize_resource :class => false - + def index from, to = get_date_range_from_params @sale_data = Sale.daily_sales_list(from,to) @@ -16,9 +16,9 @@ class Reports::DailysaleController < BaseReportController format.xls end end - + def show - + end - + end diff --git a/app/models/sale.rb b/app/models/sale.rb index 761492b1..21836a6f 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -879,7 +879,6 @@ def self.daily_sales_list(from,to) total_sale.each do |sale| grand_total = sale.grand_total - amount_received = sale.amount_received old_grand_total = sale.old_grand_total total_discount = sale.total_discount void_amount = sale.void_amount @@ -952,7 +951,6 @@ def self.get_by_shiftsales(from,to,shift) end shift_sale_data[shift_sale.id] = { - :shift_id => shift_sale.id, :cashier_terminal_name => shift_sale.cashier_terminal.name, :employee_name => shift_sale.employee.name, :shift_started_at => shift_sale.shift_started_at, @@ -1127,15 +1125,6 @@ def self.get_by_shift_items(shift_sale_range, shift, from, to, status,type,accou return query,other_charges, product, discount_query , total_cash_amount , total_card_amount , total_credit_amount , total_foc_amount , total_grand_total , change_amount end -def self.get_shift_sale_items(sh_id) - query = Sale.select("sales.shift_sale_id as shift_sale_id, i.account_id as account_id, acc.title as account_name, i.item_instance_code as item_code, i.menu_category_name, i.menu_category_code as menu_category_id, i.product_name as product_name, i.unit_price, i.price as price, i.qty as qty, SUM(i.qty) as total_item, SUM(i.qty * i.unit_price) as grand_total, i.status as status_type, i.remark as remark") - .joins("JOIN sale_items i on i.sale_id = sales.sale_id") - .joins("JOIN accounts acc on acc.id = i.account_id") - .where("sales.shift_sale_id=?", sh_id) - .group("acc.title,i.account_id,i.menu_category_code,i.item_instance_code,i.product_name,i.unit_price") - .order("acc.title desc, i.account_id desc, i.menu_category_code desc, i.unit_price asc") -end - def self.get_product_sale() query = Sale.select("i.account_id as account_id, " + "SUM(i.qty * i.unit_price) as grand_total,SUM(i.qty) as total_item," + diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index a65ac631..3dd2c92a 100755 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -14,10 +14,10 @@ else delimiter = "" end - %> + %>
-
+
help @@ -30,7 +30,7 @@
-
+
attach_money @@ -44,7 +44,7 @@
-
+
person_add @@ -57,7 +57,7 @@
-
+
credit_card @@ -99,27 +99,27 @@ to_time = '' end %> -
+
-
+
-
+
-
+
-
+

@@ -131,26 +131,29 @@
<% if current_user.role == 'administrator' || current_user.role == 'manager' || current_user.role == 'account' %>
-
-
-
-
-

dashboard<%= (t :top) + " " + (t :products) %>

- - <%= pie_chart @top_products %> + <% isMobile = request.user_agent %> + <% if !isMobile.include? "Mobile" %> +
+
+
+
+

dashboard<%= (t :top) + " " + (t :products) %>

+ + <%= pie_chart @top_products %> +
+
+
+
+
+
+

dashboard<%= (t :bottom) + " " + (t :products) %>

+ + <%= pie_chart @bottom_products %> +
-
-
-
-

dashboard<%= (t :bottom) + " " + (t :products) %>

- - <%= pie_chart @bottom_products %> -
-
-
-
+ <% end %> + <%= pie_chart @top_products %> +
+
+
+
+
+
+

dashboard<%= (t :bottom) + " " + (t :products) %>

+ + <%= pie_chart @bottom_products %> +
+
+
+
+ <% end %>
\ No newline at end of file + diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index a8a6d85c..acb35329 100755 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -154,7 +154,7 @@ $(".collapse.in").each(function () { $(this).siblings(".panel-heading").find(".glyphicon").addClass("glyphicon-minus").removeClass("glyphicon-plus"); }); - + // Toggle plus minus icon on show hide of collapse element $(".collapse").on('show.bs.collapse', function () { $(this).parent().find(".glyphicon").removeClass("glyphicon-plus").addClass("glyphicon-minus"); @@ -164,11 +164,3 @@ }); - - - - - - - - diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 164b6c4f..415e8f2c 100755 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -18,19 +18,19 @@ <%if current_login_employee.role !="waiter" %> <% if current_login_employee.role == "administrator" || current_login_employee.role == "manager" || current_login_employee.role == "account" %> - + <% elsif current_login_employee.role == "supervisor" || current_login_employee.role == "cashier" || current_login_employee.role == "waiter" %> - + <%else%> - + <% end %> <% else %> - + <%end%> Logo SX Restaurant - + @@ -40,11 +40,17 @@ <%= shop_detail.name %>
- + \ No newline at end of file +
diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb index 8c4a113f..2db05f6e 100755 --- a/app/views/reports/shiftsale/index.html.erb +++ b/app/views/reports/shiftsale/index.html.erb @@ -56,10 +56,10 @@ <%= t("views.right_panel.detail.credit_payment") %> <%= t("views.btn.other_payment") %> <%= t("views.btn.foc") %> <%= t :payment %> - + + - @@ -109,8 +109,8 @@ - <%= number_with_precision(result[:other_sales].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> - + <%= number_with_precision(result[:other_sales].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= number_with_precision(result[:foc_sales].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <%= number_with_precision(result[:grand_total].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> @@ -138,8 +138,8 @@ <%= number_with_precision(credit, precision:precision.to_i,delimiter:delimiter) rescue '-'%> - <%= number_with_precision(card, precision:precision.to_i,delimiter:delimiter) rescue '-'%> - <%= number_with_precision(foc, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= number_with_precision(card, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= number_with_precision(foc, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <%= number_with_precision(g_total, precision:precision.to_i,delimiter:delimiter) rescue '-'%> diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index 628875b9..a292a543 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -21,11 +21,11 @@ class ActionController::Base end else # check for license file - if check_license - current_license(ENV["SX_PROVISION_URL"]) - else - redirect_to activate_path - end + # if check_license + #current_license(ENV["SX_PROVISION_URL"]) + #else + #redirect_to activate_path + #end end end