From 399825b98c2522837ced3816e22a46b5b52e3bb8 Mon Sep 17 00:00:00 2001 From: Nweni Date: Mon, 3 Jul 2017 10:24:35 +0630 Subject: [PATCH 1/5] Update --- config/puma.rb | 56 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/config/puma.rb b/config/puma.rb index b39a4ff2..c7f311f8 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,9 +1,47 @@ -application_path = '/home/superuser/Application/production/sxrestaurant' -directory application_path -environment 'production' -daemonize true -pidfile "#{application_path}/tmp/pids/puma.pid" -state_path "#{application_path}/tmp/pids/puma.state" -stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" -bind 'tcp://0.0.0.0:9292' -workers 2 +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum, this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart From 39ba5d5e868dc2a6a56e4dab01d8520c245370fe Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Mon, 3 Jul 2017 10:28:13 +0630 Subject: [PATCH 2/5] update audit sales --- .../transactions/sales_controller.rb | 1 + app/views/transactions/sales/show.html.erb | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/controllers/transactions/sales_controller.rb b/app/controllers/transactions/sales_controller.rb index 19803c0d..eb058cac 100644 --- a/app/controllers/transactions/sales_controller.rb +++ b/app/controllers/transactions/sales_controller.rb @@ -51,6 +51,7 @@ class Transactions::SalesController < ApplicationController end @sale_receivables = SalePayment.where('sale_id = ?', @sale.id) + @sale_audits = SaleAudit.where('sale_id = ?', @sale.id) #get customer amount @customer = Customer.find(@sale.customer_id) diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb index 4dd15755..8e4ccc9a 100644 --- a/app/views/transactions/sales/show.html.erb +++ b/app/views/transactions/sales/show.html.erb @@ -39,9 +39,9 @@ - + @@ -244,15 +244,24 @@ - + - + - + + <% @sale_audits.each do |audit| %> + + + + + + + + <% end %>
StatusAction Action AtApproved ByApproved At Remark
<%= audit.action%><%= audit.action_at.strftime("%m-%d-%Y %H:%M %p")%><%= audit.approved_by.to_datetime.strftime("%m-%d-%Y %H:%M %p")%><%= audit.remark%>
From 92712787e13f7040c18e6f46243ce6b6ddafd313 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Mon, 3 Jul 2017 12:20:03 +0630 Subject: [PATCH 3/5] update origami for room --- app/controllers/crm/customers_controller.rb | 4 +- .../origami/payments_controller.rb | 4 ++ app/controllers/origami/rooms_controller.rb | 5 ++ app/views/origami/rooms/show.html.erb | 47 +++++++++++-------- 4 files changed, 37 insertions(+), 23 deletions(-) diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index 4606b049..e74f9c7a 100644 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -115,7 +115,7 @@ class Crm::CustomersController < BaseCrmController 'Content-Type' => 'application/json', 'Accept' => 'application/json' }, - :timeout => 100 + :timeout => 10 ) rescue HTTParty::Error @@ -209,8 +209,6 @@ end }, :timeout => 10 ) - puts "hhhhhhhhh" - puts response.to_json rescue Net::OpenTimeout response = { status: false } diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 03e0931e..de1af386 100644 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -55,6 +55,10 @@ class Origami::PaymentsController < BaseOrigamiController shop_details = Shop.find(1) # get member information member_info = Customer.get_member_account(customer) + puts "transaction" + puts rebate_amount.to_json + puts "member_info" + puts member_info.to_json # get printer info print_settings=PrintSetting.find_by_unique_code(unique_code) diff --git a/app/controllers/origami/rooms_controller.rb b/app/controllers/origami/rooms_controller.rb index c25e0e1f..e5728f99 100644 --- a/app/controllers/origami/rooms_controller.rb +++ b/app/controllers/origami/rooms_controller.rb @@ -6,6 +6,7 @@ class Origami::RoomsController < BaseOrigamiController @complete = Sale.all @orders = Order.all.order('date desc') @room = DiningFacility.find(params[:room_id]) + @sale_array = Array.new @room.bookings.each do |booking| if booking.sale_id.nil? @order_items = Array.new @@ -23,12 +24,16 @@ class Origami::RoomsController < BaseOrigamiController sale = Sale.find(booking.sale_id) if sale.sale_status != "completed" + @sale_array.push(sale) @status = 'sale' @obj = sale @customer = sale.customer end end end + puts "hhhhhhhhhh" + puts @status + puts @obj.to_json end diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index 1329bc8d..e968c34a 100644 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -69,16 +69,23 @@
<% @rooms.each do |room| %> <% if room.status == 'occupied' %> -
-
- <%= room.name %> - <% if room.get_booking.nil? %> - billed - <% else %> - new - <% end %> -
-
+ + <% if room.get_booking.nil? %> +
+
+ <%= room.name %> + billed +
+
+
+ <% else %> +
+
+ <%= room.name %> + new +
+
+ <% end %> <% else %>
@@ -114,7 +121,7 @@
<% if @status == 'order' %>
ORDER DETAILS | Table <%= @room.name rescue "" %>
- <% elsif @status_sale == 'sale' %> + <% elsif @status == 'sale' %>
INVOICE DETAILS | Table <%= @room.name rescue "" %>
<% end %> @@ -218,7 +225,7 @@

<% - if @status_sale == 'sale' + if @status == 'sale' unless @order_items.nil? %> Pending New Order @@ -272,10 +279,10 @@
- <% if @dining.bookings.length >= 1 %> + <% if @room.bookings.length >= 1 %> - <% if @status_order == 'order' && @status_sale != 'sale' %> + <% if @status == 'order' && @status != 'sale' %> @@ -332,7 +339,7 @@ $(document).ready(function(){ // }) $('.invoicedetails').on('click',function(){ - var dining_id = "<%= @dining.id %>"; + var dining_id = "<%= @room.id %>"; var sale_id = this.id; window.location.href = '/origami/table/'+ dining_id + "/table_invoice/"+sale_id; }) @@ -431,7 +438,7 @@ $("#first_bill").on('click', function(){ $('#pay').on('click',function() { var sale_id = $('#sale_id').val(); var url = '/origami/sale/'+ sale_id + "/rounding_adj" ; - alert(url) + $.ajax({ type: "POST", url: '/origami/sale/'+ sale_id + "/rounding_adj", @@ -466,8 +473,8 @@ $('#back').on('click',function(){ }) $('#add_invoice').on('click',function(){ - var dining_id = "<%= @dining.id %>" - var sale_id = "<%= @obj_sale.sale_id rescue "" %>" + var dining_id = "<%= @room.id %>" + var sale_id = "<%= @obj.sale_id rescue "" %>" var ajax_url = "/origami/sale/append_order"; $.ajax({ type: "POST", @@ -549,8 +556,8 @@ $('#add_invoice').on('click',function(){ } $('#edit').on('click',function(){ - var dining_id = "<%= @dining.id %>" - var sale_id = "<%= @obj_sale.sale_id rescue "" %>" + var dining_id = "<%= @room.id %>" + var sale_id = "<%= @obj.sale_id rescue "" %>" window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit"; }); From e3477fd2683739be1905fba255b1e79c87214265 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Mon, 3 Jul 2017 13:22:02 +0630 Subject: [PATCH 4/5] update --- app/controllers/origami/payments_controller.rb | 4 ---- app/models/sale_payment.rb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index de1af386..03e0931e 100644 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -55,10 +55,6 @@ class Origami::PaymentsController < BaseOrigamiController shop_details = Shop.find(1) # get member information member_info = Customer.get_member_account(customer) - puts "transaction" - puts rebate_amount.to_json - puts "member_info" - puts member_info.to_json # get printer info print_settings=PrintSetting.find_by_unique_code(unique_code) diff --git a/app/models/sale_payment.rb b/app/models/sale_payment.rb index fb1e58d8..3fd5118b 100644 --- a/app/models/sale_payment.rb +++ b/app/models/sale_payment.rb @@ -337,7 +337,7 @@ class SalePayment < ApplicationRecord :headers => { 'Content-Type' => 'application/json', 'Accept' => 'application/json' - }, :timeout => 100) + }, :timeout => 10) rescue Net::OpenTimeout response = { status: false , message: "Server Time out"} From 8aa12406dbec52d8e7fa28874c20416d98d90839 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Mon, 3 Jul 2017 17:44:26 +0630 Subject: [PATCH 5/5] update scrll and member transaction --- .../origami/payments_controller.rb | 4 +- app/models/customer.rb | 20 ++++---- app/pdf/receipt_bill_pdf.rb | 47 +++++++++++-------- app/views/crm/customers/_new_form.html.erb | 2 +- app/views/origami/customers/index.html.erb | 4 +- app/views/origami/discounts/index.html.erb | 2 +- app/views/origami/home/index.html.erb | 10 ++-- app/views/origami/home/show.html.erb | 14 +++--- .../origami/moveroom/move_dining.html.erb | 6 +-- .../origami/movetable/move_dining.html.erb | 6 +-- app/views/origami/orders/show.html.erb | 12 ++--- .../origami/other_charges/index.html.erb | 2 +- app/views/origami/room_invoices/show.html.erb | 2 +- app/views/origami/rooms/show.html.erb | 12 ++--- app/views/origami/sale_edit/edit.html.erb | 2 +- app/views/origami/sales/show.html.erb | 12 ++--- .../origami/table_invoices/show.html.erb | 2 +- app/views/settings/employees/index.html.erb | 2 +- app/views/transactions/sales/show.html.erb | 7 +-- 19 files changed, 91 insertions(+), 77 deletions(-) diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 03e0931e..5c725aca 100644 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -50,7 +50,7 @@ class Origami::PaymentsController < BaseOrigamiController unique_code = "ReceiptBillPdf" customer= Customer.find(saleObj.customer_id) - rebate_amount = Customer.get_membership_transactions(customer) + rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no) #shop detail shop_details = Shop.find(1) # get member information @@ -133,7 +133,7 @@ class Origami::PaymentsController < BaseOrigamiController shop_details = Shop.find(1) # get member information member_info = Customer.get_member_account(customer) - rebate_amount = Customer.get_membership_transactions(customer) + rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no) # get printer info print_settings=PrintSetting.find_by_unique_code(unique_code) diff --git a/app/models/customer.rb b/app/models/customer.rb index 60cf8b14..f5a37164 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -46,7 +46,7 @@ class Customer < ApplicationRecord end - def self.get_membership_transactions(customer) + def self.get_membership_transactions(customer,receipt_no = nil) membership = MembershipSetting.find_by_membership_type("paypar_url") memberaction = MembershipAction.find_by_membership_type("get_member_transactions") merchant_uid = memberaction.merchant_account_id.to_s @@ -55,13 +55,17 @@ class Customer < ApplicationRecord # urltest =self.url_exist?(url) begin - response = HTTParty.get(url, :body => { membership_id: customer.membership_id,merchant_uid:merchant_uid,auth_token:auth_token}.to_json, - :headers => { - 'Content-Type' => 'application/json', - 'Accept' => 'application/json' - }, - :timeout => 10 - ) + response = HTTParty.get(url, + :body => { membership_id: customer.membership_id, + receipt_no:receipt_no, + merchant_uid:merchant_uid,auth_token:auth_token + }.to_json, + :headers => { + 'Content-Type' => 'application/json', + 'Accept' => 'application/json' + }, + :timeout => 10 + ) rescue Net::OpenTimeout response = { status: false , message: "Server Time out"} diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 52cdf586..9807b2d5 100644 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -269,20 +269,19 @@ class ReceiptBillPdf < Prawn::Document if rebate_amount["status"] == true stroke_horizontal_rule - rebate = 0 + balance = 0 redeem = 0 rebate_amount["data"].each do |res| - + #total redeem amount if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Redeem" redeem = redeem + res["redeem"] - + balance = balance + res["balance"] end - - - + #end Total redem + #total Rebate Earn if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebateAccount" && res["status"]== "Rebate" - rebate = rebate + res["rebate"] + # balance = balance + res["balance"] move_down 5 y_position = cursor @@ -294,11 +293,9 @@ class ReceiptBillPdf < Prawn::Document end end - + # Total Rebate Amount if birthday if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebateBonusAccount" && res["status"]== "Rebate" - - rebate = rebate + res["rebate"] - + # balance = balance + res["balance"] move_down 5 y_position = cursor bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do @@ -307,21 +304,33 @@ class ReceiptBillPdf < Prawn::Document bounding_box([self.item_description_width,y_position], :width =>self.label_width) do text "#{number_with_precision(res["balance"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right end - end + #end Total rebate if birthday end move_down 5 - y_position = cursor - bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do - text "Redeem Amount", :size => self.item_font_size,:align => :left - end - bounding_box([self.item_description_width,y_position], :width =>self.label_width) do - text "#{number_with_precision(redeem, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :right - end + y_position = cursor + bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do + text "Redeem Amount", :size => self.item_font_size,:align => :left + end + bounding_box([self.item_description_width,y_position], :width =>self.label_width) do + text "#{number_with_precision(redeem, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :right + end + + # old = balance + redeem + + # move_down 5 + # y_position = cursor + # bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do + # text "Old Balance", :size => self.item_font_size,:align => :left + # end + # bounding_box([self.item_description_width,y_position], :width =>self.label_width) do + # text "#{number_with_precision(old, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :right + # end end end + if member_info["status"] == true && member_info["data"].present? balance = 0 member_info["data"].each do |res| diff --git a/app/views/crm/customers/_new_form.html.erb b/app/views/crm/customers/_new_form.html.erb index d52c0456..66a16b2b 100644 --- a/app/views/crm/customers/_new_form.html.erb +++ b/app/views/crm/customers/_new_form.html.erb @@ -1,4 +1,4 @@ -
+
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %> diff --git a/app/views/origami/customers/index.html.erb b/app/views/origami/customers/index.html.erb index 72e402e8..a1d359e8 100644 --- a/app/views/origami/customers/index.html.erb +++ b/app/views/origami/customers/index.html.erb @@ -10,7 +10,7 @@
-
+
@@ -71,7 +71,7 @@ -
+
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %> diff --git a/app/views/origami/discounts/index.html.erb b/app/views/origami/discounts/index.html.erb index faa48c05..5eb4afe6 100644 --- a/app/views/origami/discounts/index.html.erb +++ b/app/views/origami/discounts/index.html.erb @@ -17,7 +17,7 @@

Date: <%=@sale_data.receipt_date.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

-
+
diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb index 99fa713e..6bdadd85 100644 --- a/app/views/origami/home/index.html.erb +++ b/app/views/origami/home/index.html.erb @@ -19,9 +19,9 @@ -
+
-
+
<% @complete.each do |sale| %>
@@ -35,7 +35,7 @@
-
+
<% @tables.each do |table| %> <% if table.status == 'occupied' %> @@ -67,7 +67,7 @@
-
+
<% @rooms.each do |room| %> <% if room.status == 'occupied' %> @@ -88,7 +88,7 @@
-
+
<% @orders.each do |order| %>
diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index baad1a0a..fd211ccc 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -6,7 +6,7 @@ -
+
-
+
<% @complete.each do |sale| %>
@@ -38,7 +38,7 @@
-
+
<% @tables.each do |table| %> <% if table.status == 'occupied' %> @@ -71,7 +71,7 @@
-
+
<% @rooms.each do |room| %> <% if room.status == 'occupied' %> @@ -98,7 +98,7 @@
-
+
<% @orders.each do |order| %> @@ -150,7 +150,7 @@ <%end%>
-
+
diff --git a/app/views/origami/moveroom/move_dining.html.erb b/app/views/origami/moveroom/move_dining.html.erb index 109bc418..a8620d6e 100644 --- a/app/views/origami/moveroom/move_dining.html.erb +++ b/app/views/origami/moveroom/move_dining.html.erb @@ -21,7 +21,7 @@
-
+
<% @tables.each do |table| %> <% if table.status == 'occupied' %>
@@ -42,7 +42,7 @@
-
+
<% @rooms.each do |room| %> <% if room.status == 'occupied' %>
@@ -95,7 +95,7 @@
-
+
diff --git a/app/views/origami/movetable/move_dining.html.erb b/app/views/origami/movetable/move_dining.html.erb index c8254d42..d64b71f0 100644 --- a/app/views/origami/movetable/move_dining.html.erb +++ b/app/views/origami/movetable/move_dining.html.erb @@ -21,7 +21,7 @@
-
+
<% @tables.each do |table| %> <% if table.status == 'occupied' %>
@@ -42,7 +42,7 @@
-
+
<% @rooms.each do |room| %> <% if room.status == 'occupied' %>
@@ -95,7 +95,7 @@
-
+
diff --git a/app/views/origami/orders/show.html.erb b/app/views/origami/orders/show.html.erb index e0448009..40388847 100644 --- a/app/views/origami/orders/show.html.erb +++ b/app/views/origami/orders/show.html.erb @@ -19,9 +19,9 @@ -
+
-
+
<% @complete.each do |sale| %>
@@ -34,7 +34,7 @@
-
+
<% @tables.each do |table| %> <% if table.status == 'occupied' %> @@ -60,7 +60,7 @@
-
+
<% @rooms.each do |room| %> <% if room.status == 'occupied' %> @@ -86,7 +86,7 @@
-
+
<% @orders.each do |order| %>
@@ -140,7 +140,7 @@
-
+
diff --git a/app/views/origami/other_charges/index.html.erb b/app/views/origami/other_charges/index.html.erb index 129aa0e0..20bb5a4b 100644 --- a/app/views/origami/other_charges/index.html.erb +++ b/app/views/origami/other_charges/index.html.erb @@ -17,7 +17,7 @@

Date: <%=@sale_data.receipt_date.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

-
+
diff --git a/app/views/origami/room_invoices/show.html.erb b/app/views/origami/room_invoices/show.html.erb index 4b507526..b44340d4 100644 --- a/app/views/origami/room_invoices/show.html.erb +++ b/app/views/origami/room_invoices/show.html.erb @@ -41,7 +41,7 @@ -
+
diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index e968c34a..9b681fe1 100644 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -19,9 +19,9 @@ -
+
-
+
<% @complete.each do |sale| %>
@@ -34,7 +34,7 @@
-
+
<% @tables.each do |table| %> <% if table.status == 'occupied' %> @@ -65,7 +65,7 @@
-
+
<% @rooms.each do |room| %> <% if room.status == 'occupied' %> @@ -98,7 +98,7 @@
-
+
<% @orders.each do |order| %>
@@ -148,7 +148,7 @@
-
+
diff --git a/app/views/origami/sale_edit/edit.html.erb b/app/views/origami/sale_edit/edit.html.erb index 13812e59..d604e654 100644 --- a/app/views/origami/sale_edit/edit.html.erb +++ b/app/views/origami/sale_edit/edit.html.erb @@ -22,7 +22,7 @@ -
+
diff --git a/app/views/origami/sales/show.html.erb b/app/views/origami/sales/show.html.erb index 86a82053..ad8a73aa 100644 --- a/app/views/origami/sales/show.html.erb +++ b/app/views/origami/sales/show.html.erb @@ -19,9 +19,9 @@ -
+
-
+
<% @complete.each do |sale| %>
@@ -34,7 +34,7 @@
-
+
<% @tables.each do |table| %> <% if table.status == 'occupied' %> @@ -60,7 +60,7 @@
-
+
<% @rooms.each do |room| %> <% if room.status == 'occupied' %> @@ -86,7 +86,7 @@
-
+
<% @orders.each do |order| %>
@@ -126,7 +126,7 @@
-
+
diff --git a/app/views/origami/table_invoices/show.html.erb b/app/views/origami/table_invoices/show.html.erb index de43e654..c49ddfbc 100644 --- a/app/views/origami/table_invoices/show.html.erb +++ b/app/views/origami/table_invoices/show.html.erb @@ -41,7 +41,7 @@ -
+
diff --git a/app/views/settings/employees/index.html.erb b/app/views/settings/employees/index.html.erb index 1112f72b..21a196e4 100644 --- a/app/views/settings/employees/index.html.erb +++ b/app/views/settings/employees/index.html.erb @@ -25,7 +25,7 @@ + <%= link_to 'Edit', edit_settings_employee_path(employee) %> | <%= link_to 'Destroy', settings_employee_path(employee), method: :delete, data: { confirm: 'Are you sure?' } %> <% end %> diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb index 8e4ccc9a..cbd07c41 100644 --- a/app/views/transactions/sales/show.html.erb +++ b/app/views/transactions/sales/show.html.erb @@ -205,15 +205,16 @@ + - + - + @@ -226,7 +227,7 @@ - +
<%= link_to employee.name,settings_employee_path(employee) %> <%= employee.role %> - <%= link_to 'Edit', edit_settings_employee_path(employee) %> | <%= link_to 'Destroy', employee[:setting], method: :delete, data: { confirm: 'Are you sure?' } %>
<%= @customer.address%> <%= @customer.date_of_birth %>
Membership TransactionsMembership Transactions
Date Redeem Rebate BalanceFrom Account Status Receipt No
<%= transaction["redeem"]%> <%= transaction["rebate"] %> <%= transaction["balance"] %><%= transaction["account_status"] %> <%= transaction["status"] %> <%= transaction["receipt_no"] %>