diff --git a/app/assets/stylesheets/CRM.scss b/app/assets/stylesheets/CRM.scss index 50529aea..18bdca31 100755 --- a/app/assets/stylesheets/CRM.scss +++ b/app/assets/stylesheets/CRM.scss @@ -87,3 +87,29 @@ } +.cashier_number{ + width: 33%; + height:58px; + line-height:58px; + text-align:center; + background:#54A5AF; + // float:left; + // margin:2px; + font-size:20px; + color:white; + // cursor:pointer; +} + +.red { + background-color:#F44336; +} + +.green{ + background-color: #009900; +} +.left{ + margin-left:1px; +} +.bottom{ + margin-bottom:1px; +} diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index d8ee10fb..2a277144 100755 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -33,7 +33,7 @@ class Crm::CustomersController < BaseCrmController end end end - @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50) + @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(15) @crm_customer = Customer.new @count_customer = Customer.count_customer @@ -70,7 +70,7 @@ class Crm::CustomersController < BaseCrmController #get customer amount @customer = Customer.find(params[:id]) @response = Customer.get_membership_transactions(@customer) - + puts @response.to_json # @response = "" #end customer amount diff --git a/app/controllers/crm/dining_queues_controller.rb b/app/controllers/crm/dining_queues_controller.rb index a48e03a7..480ad08e 100755 --- a/app/controllers/crm/dining_queues_controller.rb +++ b/app/controllers/crm/dining_queues_controller.rb @@ -7,6 +7,7 @@ class Crm::DiningQueuesController < BaseCrmController def index today = DateTime.now.strftime('%Y-%m-%d') @dining_queues = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc") + @complete_queue = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status = 'Assign' ", today).order("queue_no asc") end # GET /crm/dining_queues/1 diff --git a/app/controllers/origami/discounts_controller.rb b/app/controllers/origami/discounts_controller.rb index 82e878bd..c1319bfe 100755 --- a/app/controllers/origami/discounts_controller.rb +++ b/app/controllers/origami/discounts_controller.rb @@ -215,7 +215,7 @@ class Origami::DiscountsController < BaseOrigamiController else response = {"status": false, "message": "You have no selected discount item" } end - puts "discount" + puts "discountttttttttttt" puts response.to_json # Re-calc All Amount in Sale if response["status"] == true diff --git a/app/views/crm/customers/_new_form.html.erb b/app/views/crm/customers/_new_form.html.erb index 300603a3..992512f2 100755 --- a/app/views/crm/customers/_new_form.html.erb +++ b/app/views/crm/customers/_new_form.html.erb @@ -22,7 +22,7 @@ str="[\"#{msg['name']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end -%> @@ -45,7 +45,7 @@ <% str="[\"#{msg['company']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end -%>
"> @@ -55,7 +55,7 @@ <% str="[\"#{msg['contact_no']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end %>
@@ -66,7 +66,7 @@ <% str="[\"#{msg['email']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end %> @@ -107,7 +107,7 @@ <% str="[\"#{msg['card_no']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end %> diff --git a/app/views/crm/customers/show.html.erb b/app/views/crm/customers/show.html.erb index 640e8ef6..6027eec6 100755 --- a/app/views/crm/customers/show.html.erb +++ b/app/views/crm/customers/show.html.erb @@ -36,6 +36,7 @@ + <%= @customer.card_no rescue '-'%> @@ -43,9 +44,9 @@ <%= @customer.company rescue '-' %> <%= @customer.contact_no %> <%= @customer.email %> - <%= @customer.nrc_no %> - <%= @customer.address%> - <%= @customer.date_of_birth %> + <%= @customer.nrc_no rescue '-' %> + <%= @customer.address rescue '-'%> + <%= @customer.date_of_birth rescue '-'%> <% if @customer.membership_type.to_f > 0%> <%lookup= Lookup.find_by_value(@customer.membership_type) %> <%= lookup.name %> @@ -80,7 +81,7 @@ <%= transaction["date"]%> - <%= transaction["rebate"] %> + <%= transaction["deposit"] %> <%= transaction["account_status"] %> <%= transaction["status"] %> @@ -104,7 +105,6 @@ <%= t("views.right_panel.detail.order_id") %> <%= t("views.right_panel.detail.type") %> - <%= t("views.right_panel.detail.type") %> <%= t("views.right_panel.detail.order_status") %> <%= t("views.right_panel.detail.order_date") %> <%= t("views.right_panel.detail.items_count") %> @@ -114,10 +114,10 @@ <% @orders.each do |order| %> - <%= order.order_id %> + <%= link_to order.order_id, transactions_order_path(order) %> <%= order.order_type %> <%= order.status %> - <%= order.date.strftime("%d-%m-%Y") %> + <%= order.date.strftime("%d-%m-%Y %I:%m %p") %> <%= order.item_count %> <% end %> @@ -146,13 +146,13 @@ <% @sales.each do |sale| %> - <%= sale.sale_id %> + <%= link_to sale.sale_id, transactions_sale_path(sale) %> <%= sale.receipt_no %> <%= sale.grand_total rescue '-' %> <%= sale.total_tax %> <%= sale.cashier_name rescue '-' %> <%= sale.sale_status %> - <%= sale.receipt_date.strftime("%d-%m-%Y") %> + <%= sale.receipt_date.strftime("%d-%m-%Y %I:%m %p") %> <% end %> diff --git a/app/views/crm/dining_queues/_form.html.erb b/app/views/crm/dining_queues/_form.html.erb index 2fb01b44..f20b2a57 100755 --- a/app/views/crm/dining_queues/_form.html.erb +++ b/app/views/crm/dining_queues/_form.html.erb @@ -1,27 +1,83 @@
-
+
<%= simple_form_for([:crm,@dining_queue]) do |f| %> <%= f.error_notification %> -
+
<%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%> <%= f.input :name %> <%= f.input :contact_no %> <%= f.input :seater %> <%= f.input :remark %> - -

- <%= f.button :submit,"Create Queue" ,:class=>"btn btn-primary bg-blue btn-lg waves-effect"%> + <%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
-
+ <% end %>
-
+
+
+
+
+
+
+
+
1
+
2
+
3
+
+
+
+ +
+
+
+
4
+
5
+
6
+
+
+
+ +
+
+
+
7
+
8
+
9
+
+
+
+ +
+
+
+
0
+
.
+
00
+
+
+
+ +
+
+
+
+
DEL
+
CLR
+
+
+
+
+
+
+
+ +
view_headline <%= t("views.right_panel.header.page_detail") %>
@@ -50,9 +106,55 @@ diff --git a/app/views/crm/dining_queues/index.html.erb b/app/views/crm/dining_queues/index.html.erb index a02cc36d..fab41cdc 100755 --- a/app/views/crm/dining_queues/index.html.erb +++ b/app/views/crm/dining_queues/index.html.erb @@ -11,42 +11,79 @@
-
+
-
- - -
-
-
- - <% @dining_queues.each do |queue| %> - <% if queue.status == "Assign" - @bg_color = "assign" - elsif queue.status == "Cancel" - @bg_color = "cancel" - else - @bg_color = "normal" - end - %> -
-
- - - Queue No : <%= queue.queue_no %> - Seater : <%= queue.seater %>
- Name : <%= queue.name %>
- Contact No : <%= queue.contact_no %> - Remark : <%= queue.remark %> -
-
- - <% end %> -
-
+
+
+
+ <% if @dining_queues.count > 0 %> +
+ + <% @dining_queues.each do |queue| %> + <% if queue.status == "Assign" + @bg_color = "assign" + elsif queue.status == "Cancel" + @bg_color = "cancel" + else + @bg_color = "normal" + end + %> +
+
+ + + Queue No : <%= queue.queue_no %> + Seater : <%= queue.seater %>
+ Name : <%= queue.name %>
+ Contact No : <%= queue.contact_no %>
+ Remark : <%= queue.remark %> +
+
+ <% end %> +
-
+ <% else %> +

There is no queue Now !

+ <% end %> +
+
+
+
+
+
+
+
view_headline QUEUE DETAILs
+

+ 1) Latest Queue No - <%= @complete_queue.last.queue_no%>
+ 2) Next Queue No - <% @next = @complete_queue.last.queue_no.to_i + 1%> + <%= @next%>
+ 3) Today Completed Queue - <%= @complete_queue.count %>
+ +

list <%= t("views.right_panel.header.button_lists") %>
+

+ 1) <%= t("views.right_panel.button.cancel") %> + <%= t("views.right_panel.button.queue") %> - + <%= t("views.right_panel.detail.cancel_btn_txt") %> + <%= t("views.right_panel.detail.queue_txt") %>
+ + 2) <%= t("views.btn.new") %> + <%= t("views.right_panel.button.queue") %> - + <%= t("views.right_panel.detail.create_btn_txt") %> + <%= t("views.right_panel.detail.queue_txt") %>
+ + 2) <%= t("views.btn.assign") %> + <%= t("views.right_panel.button.queue") %> - + <%= t("views.right_panel.detail.assign_txt") %> + <%= t("views.right_panel.detail.queue_txt") %>
+

+
list <%= t("views.right_panel.header.link_lists") %>
+

+ 1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %>
+ 2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %>
+

+
+
<%= link_to t("views.btn.new"),new_crm_dining_queue_path,:class => 'btn bg-green btn-block btn-lg btn-block', 'data-no-turbolink' => true %> @@ -112,3 +149,10 @@ function cancel_queue(id,url) { } + \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 242c60cf..48ecc53f 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -91,6 +91,7 @@ en: filter: "Filter" del: "DEL" clr: "CLR" + assign: "ASSIGN" print_order_summary: "Print Order Summary" memeber_card: "Member Card"