diff --git a/app/controllers/api/check_in_process_controller.rb b/app/controllers/api/check_in_process_controller.rb index c12ae517..865e30d0 100644 --- a/app/controllers/api/check_in_process_controller.rb +++ b/app/controllers/api/check_in_process_controller.rb @@ -29,9 +29,9 @@ class Api::CheckInProcessController < Api::ApiController check_out_time = nil extra_minutes = nil alert_time_min = 0 - check_in_time = booking.checkin_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") + check_in_time = booking.checkin_at.strftime("%Y-%m-%d %H:%M") if booking.checkout_at - check_out_time = booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") + check_out_time = booking.checkout_at.strftime("%Y-%m-%d %H:%M") if booking.reserved_at extra_minutes = (booking.checkout_at - booking.reserved_at) / 1.minutes end @@ -146,7 +146,7 @@ class Api::CheckInProcessController < Api::ApiController booking.checkout_at = checkout_at booking.save! - render :json => { :status => true, :checkout_at => booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") } + render :json => { :status => true, :checkout_at => booking.checkout_at.strftime("%Y-%m-%d %H:%M") } elsif !params[:booking_id].nil? && params[:time].nil? error_message = "time is required!" render :json => { :status => false, :error_message => error_message } @@ -170,7 +170,7 @@ class Api::CheckInProcessController < Api::ApiController booking.reserved_at = checkout_time booking.reserved_by = current_login_employee.name if booking.save! - render :json => { :status => true, :checkin_at => booking.checkin_at.utc.getlocal.strftime("%Y-%m-%d %H:%M:%S"), :checkout_at => booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M:%S"), :message => "Checkout success." } + render :json => { :status => true, :checkin_at => booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S"), :checkout_at => booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S"), :message => "Checkout success." } end else render :json => { :status => false, :error_message => "Checkout time not available!" } diff --git a/app/controllers/origami/check_in_process_controller.rb b/app/controllers/origami/check_in_process_controller.rb index 92fd8142..a4b7496b 100644 --- a/app/controllers/origami/check_in_process_controller.rb +++ b/app/controllers/origami/check_in_process_controller.rb @@ -2,14 +2,14 @@ class Origami::CheckInProcessController < BaseOrigamiController def check_in_process lookup_checkout_time = Lookup.collection_of("checkout_time") - today = Time.now.utc.getlocal - checkout_at = Time.now.utc.getlocal + today = Time.now + checkout_at = Time.now if !lookup_checkout_time.empty? lookup_checkout_time.each do |checkout_time| arr_time = checkout_time[0].split("-") - start_time = Time.parse(arr_time[0].strip).utc.getlocal.strftime("%H:%M%p") - end_time = Time.parse(arr_time[1].strip).utc.getlocal.strftime("%H:%M%p") + start_time = Time.parse(arr_time[0].strip).strftime("%H:%M%p") + end_time = Time.parse(arr_time[1].strip).strftime("%H:%M%p") if start_time <= checkout_at.strftime("%H:%M%p") && checkout_at.strftime("%H:%M%p") <= end_time checkout_at = checkout_at + (checkout_time[1]).to_i.minutes end diff --git a/app/controllers/reports/card_sale_tran_controller.rb b/app/controllers/reports/card_sale_tran_controller.rb index 44caf53b..2cb5ac70 100644 --- a/app/controllers/reports/card_sale_tran_controller.rb +++ b/app/controllers/reports/card_sale_tran_controller.rb @@ -53,8 +53,8 @@ class Reports::CardSaleTranController < BaseReportController @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end diff --git a/app/controllers/reports/card_settle_tran_controller.rb b/app/controllers/reports/card_settle_tran_controller.rb index 1d71d4d8..c4ff4085 100644 --- a/app/controllers/reports/card_settle_tran_controller.rb +++ b/app/controllers/reports/card_settle_tran_controller.rb @@ -52,8 +52,8 @@ class Reports::CardSettleTranController < BaseReportController @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end diff --git a/app/controllers/reports/commission_controller.rb b/app/controllers/reports/commission_controller.rb index 25f8bb03..dc3e7231 100755 --- a/app/controllers/reports/commission_controller.rb +++ b/app/controllers/reports/commission_controller.rb @@ -27,8 +27,8 @@ class Reports::CommissionController < BaseReportController date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/credit_payment_controller.rb b/app/controllers/reports/credit_payment_controller.rb index 6137d64d..c152ed61 100755 --- a/app/controllers/reports/credit_payment_controller.rb +++ b/app/controllers/reports/credit_payment_controller.rb @@ -29,8 +29,8 @@ authorize_resource :class => false @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -48,8 +48,8 @@ authorize_resource :class => false date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/customer_controller.rb b/app/controllers/reports/customer_controller.rb index 8cd25e73..58084a36 100644 --- a/app/controllers/reports/customer_controller.rb +++ b/app/controllers/reports/customer_controller.rb @@ -43,8 +43,8 @@ class Reports::CustomerController < BaseReportController @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end diff --git a/app/controllers/reports/hourly_saleitem_controller.bk.rb b/app/controllers/reports/hourly_saleitem_controller.bk.rb index d2df64a0..2309f599 100644 --- a/app/controllers/reports/hourly_saleitem_controller.bk.rb +++ b/app/controllers/reports/hourly_saleitem_controller.bk.rb @@ -52,8 +52,8 @@ class Reports::HourlySaleitemController < BaseReportController if shift.present? shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -70,8 +70,8 @@ class Reports::HourlySaleitemController < BaseReportController sale_data = @sale_data date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id @@ -113,7 +113,7 @@ class Reports::HourlySaleitemController < BaseReportController end end - sh_name = "#{shift_sale.shift_started_at.utc.getlocal.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.utc.getlocal.strftime('%d %B %l:%M%p')}" + sh_name = "#{shift_sale.shift_started_at.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.strftime('%d %B %l:%M%p')}" employee = Employee.find(shift_sale.employee_id) shift_name = employee.nil? ? sh_name : "#{sh_name} (#{employee.name})" end diff --git a/app/controllers/reports/hourly_saleitem_controller.rb b/app/controllers/reports/hourly_saleitem_controller.rb index 29bc9836..56e68e27 100644 --- a/app/controllers/reports/hourly_saleitem_controller.rb +++ b/app/controllers/reports/hourly_saleitem_controller.rb @@ -52,8 +52,8 @@ class Reports::HourlySaleitemController < BaseReportController if shift.present? shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -73,8 +73,8 @@ class Reports::HourlySaleitemController < BaseReportController sale_data = @sale_data date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id @@ -114,7 +114,7 @@ class Reports::HourlySaleitemController < BaseReportController end end - sh_name = "#{shift_sale.shift_started_at.utc.getlocal.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.utc.getlocal.strftime('%d %B %l:%M%p')}" + sh_name = "#{shift_sale.shift_started_at.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.strftime('%d %B %l:%M%p')}" employee = Employee.find(shift_sale.employee_id) shift_name = employee.nil? ? sh_name : "#{sh_name} (#{employee.name})" end diff --git a/app/controllers/reports/induty_controller.rb b/app/controllers/reports/induty_controller.rb index ce215b1f..b5f735ce 100644 --- a/app/controllers/reports/induty_controller.rb +++ b/app/controllers/reports/induty_controller.rb @@ -28,8 +28,8 @@ class Reports::IndutyController < BaseReportController if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -48,8 +48,8 @@ class Reports::IndutyController < BaseReportController date_arr = Array.new @induty_data.each do |induty| - local_opening_date = induty.opening_date.nil? ? '-' : induty.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = induty.closing_date.nil? ? '-' : induty.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = induty.opening_date.nil? ? '-' : induty.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = induty.closing_date.nil? ? '-' : induty.closing_date.strftime("%e %b %I:%M%p") opening_date = induty.opening_date.nil? ? '-' : induty.opening_date.utc closing_date = induty.closing_date.nil? ? '-' : induty.closing_date.utc shift_id = induty.id.nil? ? '-' : induty.id diff --git a/app/controllers/reports/order_reservation_controller.rb b/app/controllers/reports/order_reservation_controller.rb index db9a2bb1..848c8710 100644 --- a/app/controllers/reports/order_reservation_controller.rb +++ b/app/controllers/reports/order_reservation_controller.rb @@ -34,8 +34,8 @@ class Reports::OrderReservationController < BaseReportController @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -53,8 +53,8 @@ class Reports::OrderReservationController < BaseReportController date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/payment_method_controller.rb b/app/controllers/reports/payment_method_controller.rb index 9ca18ee6..9b7a1ce5 100644 --- a/app/controllers/reports/payment_method_controller.rb +++ b/app/controllers/reports/payment_method_controller.rb @@ -28,8 +28,8 @@ class Reports::PaymentMethodController < BaseReportController @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -47,8 +47,8 @@ class Reports::PaymentMethodController < BaseReportController date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/receipt_no_controller.rb b/app/controllers/reports/receipt_no_controller.rb index e20f0793..ab15a0f7 100755 --- a/app/controllers/reports/receipt_no_controller.rb +++ b/app/controllers/reports/receipt_no_controller.rb @@ -41,8 +41,8 @@ authorize_resource :class => false @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -60,8 +60,8 @@ authorize_resource :class => false date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/receipt_no_detail_controller.rb b/app/controllers/reports/receipt_no_detail_controller.rb index cd6b8d7b..efb7b04d 100755 --- a/app/controllers/reports/receipt_no_detail_controller.rb +++ b/app/controllers/reports/receipt_no_detail_controller.rb @@ -36,8 +36,8 @@ class Reports::ReceiptNoDetailController < BaseReportController @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -54,8 +54,8 @@ class Reports::ReceiptNoDetailController < BaseReportController date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/saleitem_controller.rb b/app/controllers/reports/saleitem_controller.rb index fe8a832a..29a641e8 100755 --- a/app/controllers/reports/saleitem_controller.rb +++ b/app/controllers/reports/saleitem_controller.rb @@ -47,8 +47,8 @@ class Reports::SaleitemController < BaseReportController if shift.present? shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -64,8 +64,8 @@ class Reports::SaleitemController < BaseReportController date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id @@ -105,7 +105,7 @@ class Reports::SaleitemController < BaseReportController end end - sh_name = "#{shift_sale.shift_started_at.utc.getlocal.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.utc.getlocal.strftime('%d %B %l:%M%p')}" + sh_name = "#{shift_sale.shift_started_at.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.strftime('%d %B %l:%M%p')}" employee = Employee.find(shift_sale.employee_id) shift_name = employee.nil? ? sh_name : "#{sh_name} (#{employee.name})" end diff --git a/app/controllers/reports/shiftsale_controller.rb b/app/controllers/reports/shiftsale_controller.rb index f5c18ae2..04e96576 100755 --- a/app/controllers/reports/shiftsale_controller.rb +++ b/app/controllers/reports/shiftsale_controller.rb @@ -13,8 +13,8 @@ class Reports::ShiftsaleController < BaseReportController @to = to if @shift.present? - @shift_from = @shift.shift_started_at.nil? ? '-' : @shift.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = @shift.shift_closed_at.nil? ? '-' : @shift.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = @shift.shift_started_at.nil? ? '-' : @shift.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = @shift.shift_closed_at.nil? ? '-' : @shift.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = @shift end # get printer info @@ -32,8 +32,8 @@ class Reports::ShiftsaleController < BaseReportController date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/staff_meal_controller.rb b/app/controllers/reports/staff_meal_controller.rb index 71d363ba..0c93d969 100644 --- a/app/controllers/reports/staff_meal_controller.rb +++ b/app/controllers/reports/staff_meal_controller.rb @@ -55,8 +55,8 @@ class Reports::StaffMealController < BaseReportController if shift.present? shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -72,8 +72,8 @@ class Reports::StaffMealController < BaseReportController date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/stock_check_controller.rb b/app/controllers/reports/stock_check_controller.rb index 79862d12..3ff4ef7b 100755 --- a/app/controllers/reports/stock_check_controller.rb +++ b/app/controllers/reports/stock_check_controller.rb @@ -3,11 +3,11 @@ class Reports::StockCheckController < BaseReportController def index - # from_date = DateTime.now.beginning_of_day.utc.getlocal - # to_date = DateTime.now.end_of_day.utc.getlocal + # from_date = DateTime.now.beginning_of_day + # to_date = DateTime.now.end_of_day # unless params[:daterange].blank? - # from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal - # to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal + # from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day + # to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day # @daterange = params[:daterange] # end from_date, to_date = get_date_range_from_params @@ -33,8 +33,8 @@ class Reports::StockCheckController < BaseReportController date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/reports/void_sale_controller.rb b/app/controllers/reports/void_sale_controller.rb index 0dc6032a..498d6225 100755 --- a/app/controllers/reports/void_sale_controller.rb +++ b/app/controllers/reports/void_sale_controller.rb @@ -24,8 +24,8 @@ authorize_resource :class => false @print_settings = PrintSetting.get_precision_delimiter() if @shift.present? @shift.each do |sh| - @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = sh end end @@ -43,8 +43,8 @@ authorize_resource :class => false date_arr = Array.new @sale_data.each do |sale| - local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p") - local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p") + local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.strftime("%e %b %I:%M%p") + local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.strftime("%e %b %I:%M%p") opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc shift_id = sale.id.nil? ? '-' : sale.id diff --git a/app/controllers/settings/commissioners_controller.rb b/app/controllers/settings/commissioners_controller.rb index 752b0397..51722d28 100755 --- a/app/controllers/settings/commissioners_controller.rb +++ b/app/controllers/settings/commissioners_controller.rb @@ -32,10 +32,10 @@ class Settings::CommissionersController < ApplicationController @commissioner = Commissioner.new(commissioner_params) @commissioner.created_by = current_user.id unless @commissioner.joined_date.nil? - @commissioner.joined_date = @commissioner.joined_date.utc.getlocal.strftime('%Y-%b-%d') + @commissioner.joined_date = @commissioner.joined_date.strftime('%Y-%b-%d') end unless @commissioner.resigned_date.nil? - @commissioner.resigned_date = @commissioner.resigned_date.utc.getlocal.strftime('%Y-%b-%d') + @commissioner.resigned_date = @commissioner.resigned_date.strftime('%Y-%b-%d') end if (params[:from_induty] != "true") respond_to do |format| diff --git a/app/controllers/transactions/card_sale_trans_controller.rb b/app/controllers/transactions/card_sale_trans_controller.rb index 352e4f30..dd513532 100644 --- a/app/controllers/transactions/card_sale_trans_controller.rb +++ b/app/controllers/transactions/card_sale_trans_controller.rb @@ -52,14 +52,14 @@ class Transactions::CardSaleTransController < ApplicationController period = params[:period] from = params[:from] to = params[:to] - day_ref = Time.now.utc.getlocal + day_ref = Time.now if from.present? && to.present? f_date = DateTime.parse(from) t_date = DateTime.parse(to) f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec) t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec) - from = f_time.beginning_of_day.utc.getlocal - to = t_time.end_of_day.utc.getlocal + from = f_time.beginning_of_day + to = t_time.end_of_day else case period.to_i when PERIOD["today"] diff --git a/app/controllers/transactions/card_settle_trans_controller.rb b/app/controllers/transactions/card_settle_trans_controller.rb index e2b70c7e..8043105d 100644 --- a/app/controllers/transactions/card_settle_trans_controller.rb +++ b/app/controllers/transactions/card_settle_trans_controller.rb @@ -53,14 +53,14 @@ class Transactions::CardSettleTransController < ApplicationController period = params[:period] from = params[:from] to = params[:to] - day_ref = Time.now.utc.getlocal + day_ref = Time.now if from.present? && to.present? f_date = DateTime.parse(from) t_date = DateTime.parse(to) f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec) t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec) - from = f_time.beginning_of_day.utc.getlocal - to = t_time.end_of_day.utc.getlocal + from = f_time.beginning_of_day + to = t_time.end_of_day else case period.to_i when PERIOD["today"] diff --git a/app/controllers/transactions/order_reservations_controller.rb b/app/controllers/transactions/order_reservations_controller.rb index 9a5e259f..ded97155 100644 --- a/app/controllers/transactions/order_reservations_controller.rb +++ b/app/controllers/transactions/order_reservations_controller.rb @@ -75,15 +75,15 @@ class Transactions::OrderReservationsController < ApplicationController period = params[:period] from = params[:from] to = params[:to] - day_ref = Time.now.utc.getlocal + day_ref = Time.now if from.present? && to.present? f_date = DateTime.parse(from) t_date = DateTime.parse(to) f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec) t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec) - from = f_time.beginning_of_day.utc.getlocal - to = t_time.end_of_day.utc.getlocal + from = f_time.beginning_of_day + to = t_time.end_of_day else case period.to_i when PERIOD["today"] diff --git a/app/controllers/transactions/sales_controller.rb b/app/controllers/transactions/sales_controller.rb index 6c8cb07f..708eb5f8 100755 --- a/app/controllers/transactions/sales_controller.rb +++ b/app/controllers/transactions/sales_controller.rb @@ -37,8 +37,8 @@ class Transactions::SalesController < ApplicationController @food_court = Lookup.find_by_lookup_type_and_value("food_court", "1") if @shift.present? - @shift_from = @shift.shift_started_at.nil? ? '-' : @shift.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") - @shift_to = @shift.shift_closed_at.nil? ? '-' : @shift.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") + @shift_from = @shift.shift_started_at.nil? ? '-' : @shift.shift_started_at.strftime("%e %b %I:%M%p") + @shift_to = @shift.shift_closed_at.nil? ? '-' : @shift.shift_closed_at.strftime("%e %b %I:%M%p") @shift_data = @shift end @@ -183,15 +183,15 @@ class Transactions::SalesController < ApplicationController period = params[:period] from = params[:from] to = params[:to] - day_ref = Time.now.utc.getlocal + day_ref = Time.now if from.present? && to.present? f_date = DateTime.parse(from) t_date = DateTime.parse(to) f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec) t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec) - from = f_time.beginning_of_day.utc.getlocal - to = t_time.end_of_day.utc.getlocal + from = f_time.beginning_of_day + to = t_time.end_of_day else case period.to_i when PERIOD["today"] diff --git a/app/models/menu_category.rb b/app/models/menu_category.rb index 99b78c6c..9a81c892 100755 --- a/app/models/menu_category.rb +++ b/app/models/menu_category.rb @@ -42,7 +42,7 @@ class MenuCategory < ApplicationRecord from_t = Time.parse(menu.valid_time_from.strftime("%H:%M:%S")) to_t = Time.parse(menu.valid_time_to.strftime("%H:%M:%S")) - current_t = Time.parse(Time.now.utc.getlocal.strftime("%H:%M:%S")) + current_t = Time.parse(Time.now.strftime("%H:%M:%S")) from = from_t.hour * 3600 + from_t.min*60 + from_t.sec to = to_t.hour * 3600 + to_t.min* 60 + to_t.sec diff --git a/app/models/printer/cashier_station_printer.rb b/app/models/printer/cashier_station_printer.rb index f0a9b5da..660c88ed 100755 --- a/app/models/printer/cashier_station_printer.rb +++ b/app/models/printer/cashier_station_printer.rb @@ -30,7 +30,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker # #Generate PDF # #Print # cashier = shift_sale.employee.name - # shift_name = shift_sale.shift_started_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") + # shift_name = shift_sale.shift_started_at.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.strftime("%d-%m-%Y %I:%M %p") # pdf = CloseCashierCustomisePdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges) # filename = "tmp/close_cashier_#{cashier}_#{shift_name}.pdf" @@ -55,7 +55,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker #Generate PDF #Print cashier = shift_sale.employee.name - shift_name = shift_sale.shift_started_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") + shift_name = shift_sale.shift_started_at.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.strftime("%d-%m-%Y %I:%M %p") filename = "tmp/close_cashier_#{cashier}_#{shift_name}.pdf" pdf = CloseCashierPdf.new(printer_settings, shift_sale, sale_items, total_other_charges_info, @account_cate_count, @menu_cate_count, @totalByAccount, shop_details, sale_taxes, other_payment, amount, discount, member_discount, total_dinein, total_takeway, total_other_charges, total_waste, total_spoile, total_credit_payments, payment_methods, foodcourt) close_cashier_pdf = Lookup.collection_of("print_settings") #print_settings with name:CloseCashierPdf diff --git a/app/models/sale.rb b/app/models/sale.rb index abef0d42..aae2550d 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -202,7 +202,7 @@ class Sale < ApplicationRecord def generate_invoice_by_items (items, requested_by) taxable = true self.requested_by = requested_by - self.requested_at = DateTime.now.utc.getlocal + self.requested_at = DateTime.now items.each do |item| add_item(item) diff --git a/app/pdf/check_in_out_pdf.rb b/app/pdf/check_in_out_pdf.rb index dfc40c2c..6f1ea2fe 100644 --- a/app/pdf/check_in_out_pdf.rb +++ b/app/pdf/check_in_out_pdf.rb @@ -72,14 +72,14 @@ class CheckInOutPdf < Prawn::Document y_position = cursor bounding_box([0,y_position], :width => self.item_width) do - text "Check In : #{checkin_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Check In : #{checkin_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end move_down 2 y_position = cursor bounding_box([0,y_position], :width => self.item_width) do - text "Check Out : #{checkout_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Check Out : #{checkout_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end end end diff --git a/app/pdf/close_cashier_customise_pdf.rb b/app/pdf/close_cashier_customise_pdf.rb index cf8182ea..d3f71c89 100644 --- a/app/pdf/close_cashier_customise_pdf.rb +++ b/app/pdf/close_cashier_customise_pdf.rb @@ -82,7 +82,7 @@ class CloseCashierCustomisePdf < Prawn::Document text "Opening Date : ", :size => self.item_font_size,:align => :left end bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do - text "#{ shift_sale.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left + text "#{ shift_sale.shift_started_at.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left end y_position = cursor @@ -90,7 +90,7 @@ class CloseCashierCustomisePdf < Prawn::Document text "Closing Date : ", :size => self.item_font_size,:align => :left end bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do - text "#{ shift_sale.shift_closed_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left + text "#{ shift_sale.shift_closed_at.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left end y_position = cursor diff --git a/app/pdf/close_cashier_pdf.rb b/app/pdf/close_cashier_pdf.rb index c2189985..324f200d 100755 --- a/app/pdf/close_cashier_pdf.rb +++ b/app/pdf/close_cashier_pdf.rb @@ -86,7 +86,7 @@ class CloseCashierPdf < Prawn::Document text "Opening Date : ", :size => self.item_font_size,:align => :left end bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do - text "#{ shift_sale.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left + text "#{ shift_sale.shift_started_at.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left end y_position = cursor @@ -94,7 +94,7 @@ class CloseCashierPdf < Prawn::Document text "Closing Date : ", :size => self.item_font_size,:align => :left end bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do - text "#{ shift_sale.shift_closed_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left + text "#{ shift_sale.shift_closed_at.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left end y_position = cursor diff --git a/app/pdf/close_cashier_pdf_v1.rb b/app/pdf/close_cashier_pdf_v1.rb index eb87aa5b..8022dec5 100644 --- a/app/pdf/close_cashier_pdf_v1.rb +++ b/app/pdf/close_cashier_pdf_v1.rb @@ -83,7 +83,7 @@ class CloseCashierPdf < Prawn::Document text "Opening Date : ", :size => self.item_font_size,:align => :left end bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do - text "#{ shift_sale.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left + text "#{ shift_sale.shift_started_at.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left end y_position = cursor @@ -91,7 +91,7 @@ class CloseCashierPdf < Prawn::Document text "Closing Date : ", :size => self.item_font_size,:align => :left end bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do - text "#{ shift_sale.shift_closed_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left + text "#{ shift_sale.shift_closed_at.strftime('%d-%m-%Y %I:%M %p') }" , :size => self.item_font_size,:align => :left end y_position = cursor diff --git a/app/pdf/move_table_pdf.rb b/app/pdf/move_table_pdf.rb index dc55eedc..07645926 100644 --- a/app/pdf/move_table_pdf.rb +++ b/app/pdf/move_table_pdf.rb @@ -57,7 +57,7 @@ class MoveTablePdf < Prawn::Document def call_move_table (to,from,date,type,moved_by) move_down 3 - text "Date Time : #{date.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :left_margin => -10, :size => self.header_font_size + text "Date Time : #{date.strftime("%Y-%m-%d %I:%M %p")}", :left_margin => -10, :size => self.header_font_size text "Change [#{from}] To [#{to}]", :left_margin => -10, :size => self.header_font_size text "Moved By : #{moved_by}", :left_margin => -10, :size => self.header_font_size end diff --git a/app/pdf/move_table_star_pdf.rb b/app/pdf/move_table_star_pdf.rb index 88ea4ef1..ae5d2fde 100644 --- a/app/pdf/move_table_star_pdf.rb +++ b/app/pdf/move_table_star_pdf.rb @@ -56,7 +56,7 @@ class MoveTableStarPdf < Prawn::Document def call_move_table (to,from,date,type,moved_by) move_down 3 - text "Date Time : #{date.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :left_margin => -10, :size => self.header_font_size + text "Date Time : #{date.strftime("%Y-%m-%d %I:%M %p")}", :left_margin => -10, :size => self.header_font_size text "Change [#{from}] To [#{to}]", :left_margin => -10, :size => self.header_font_size text "Moved By : #{moved_by}", :left_margin => -10, :size => self.header_font_size end diff --git a/app/pdf/order_item_customise_pdf.rb b/app/pdf/order_item_customise_pdf.rb index f1a36b98..f2a51092 100644 --- a/app/pdf/order_item_customise_pdf.rb +++ b/app/pdf/order_item_customise_pdf.rb @@ -89,7 +89,7 @@ class OrderItemCustomisePdf < Prawn::Document move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_item_pdf.rb b/app/pdf/order_item_pdf.rb index 382eafa3..d27a9e00 100755 --- a/app/pdf/order_item_pdf.rb +++ b/app/pdf/order_item_pdf.rb @@ -89,7 +89,7 @@ class OrderItemPdf < Prawn::Document move_down 2 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_item_slim_customise_pdf.rb b/app/pdf/order_item_slim_customise_pdf.rb index 7b1e1140..22daa6ce 100644 --- a/app/pdf/order_item_slim_customise_pdf.rb +++ b/app/pdf/order_item_slim_customise_pdf.rb @@ -89,7 +89,7 @@ class OrderItemSlimCustomisePdf < Prawn::Document move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_slim_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_slim_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_item_slim_pdf.rb b/app/pdf/order_item_slim_pdf.rb index 7e3ec54f..172cff3e 100755 --- a/app/pdf/order_item_slim_pdf.rb +++ b/app/pdf/order_item_slim_pdf.rb @@ -89,7 +89,7 @@ class OrderItemSlimPdf < Prawn::Document move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_item_star_pdf.rb b/app/pdf/order_item_star_pdf.rb index 2d56ee36..dbf3323c 100644 --- a/app/pdf/order_item_star_pdf.rb +++ b/app/pdf/order_item_star_pdf.rb @@ -90,7 +90,7 @@ class OrderItemStarPdf < Prawn::Document move_down 2 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_set_item_customise_pdf.rb b/app/pdf/order_set_item_customise_pdf.rb index 2572c20b..bf352bb1 100644 --- a/app/pdf/order_set_item_customise_pdf.rb +++ b/app/pdf/order_set_item_customise_pdf.rb @@ -89,7 +89,7 @@ class OrderSetItemCustomisePdf < Prawn::Document move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_set_item_pdf.rb b/app/pdf/order_set_item_pdf.rb index cf0b331c..0c86a3d6 100755 --- a/app/pdf/order_set_item_pdf.rb +++ b/app/pdf/order_set_item_pdf.rb @@ -88,7 +88,7 @@ class OrderSetItemPdf < Prawn::Document move_down 2 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_summary_customise_pdf.rb b/app/pdf/order_summary_customise_pdf.rb index f717989a..35511a57 100644 --- a/app/pdf/order_summary_customise_pdf.rb +++ b/app/pdf/order_summary_customise_pdf.rb @@ -92,7 +92,7 @@ class OrderSummaryCustomisePdf < Prawn::Document move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_summary_pdf.rb b/app/pdf/order_summary_pdf.rb index b8584d1d..9a1c8b7b 100755 --- a/app/pdf/order_summary_pdf.rb +++ b/app/pdf/order_summary_pdf.rb @@ -90,7 +90,7 @@ class OrderSummaryPdf < Prawn::Document move_down 5 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_summary_set_customise_pdf.rb b/app/pdf/order_summary_set_customise_pdf.rb index 66c36a0c..88c037a9 100644 --- a/app/pdf/order_summary_set_customise_pdf.rb +++ b/app/pdf/order_summary_set_customise_pdf.rb @@ -92,7 +92,7 @@ class OrderSummarySetCustomisePdf < Prawn::Document move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_summary_set_pdf.rb b/app/pdf/order_summary_set_pdf.rb index da7b5e84..0be15640 100755 --- a/app/pdf/order_summary_set_pdf.rb +++ b/app/pdf/order_summary_set_pdf.rb @@ -92,7 +92,7 @@ class OrderSummarySetPdf < Prawn::Document move_down 5 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_summary_slim_customise_pdf.rb b/app/pdf/order_summary_slim_customise_pdf.rb index f838cd43..1cb03a2c 100644 --- a/app/pdf/order_summary_slim_customise_pdf.rb +++ b/app/pdf/order_summary_slim_customise_pdf.rb @@ -93,7 +93,7 @@ class OrderSummarySlimCustomisePdf < Prawn::Document move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_slim_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_slim_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/order_summary_slim_pdf.rb b/app/pdf/order_summary_slim_pdf.rb index 45541a7c..202d77c3 100755 --- a/app/pdf/order_summary_slim_pdf.rb +++ b/app/pdf/order_summary_slim_pdf.rb @@ -92,7 +92,7 @@ class OrderSummarySlimPdf < Prawn::Document move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left + text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left end stroke_horizontal_rule diff --git a/app/pdf/receipt_bill_a5_pdf.rb b/app/pdf/receipt_bill_a5_pdf.rb index def21291..6d009a45 100644 --- a/app/pdf/receipt_bill_a5_pdf.rb +++ b/app/pdf/receipt_bill_a5_pdf.rb @@ -165,7 +165,7 @@ class ReceiptBillA5Pdf < Prawn::Document y_position = cursor if sale_data.bookings[0].dining_facility_id.to_i > 0 - time =sale_data.receipt_date.strftime('%d-%m-%Y') +"("+ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') +"-"+ sale_data.bookings[0].checkout_at.utc.getlocal.strftime('%I:%M %p')+")" + time =sale_data.receipt_date.strftime('%d-%m-%Y') +"("+ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') +"-"+ sale_data.bookings[0].checkout_at.strftime('%I:%M %p')+")" else time = time = sale_data.receipt_date.strftime('%d-%m-%Y %H:%M %p') end @@ -175,8 +175,8 @@ class ReceiptBillA5Pdf < Prawn::Document # bounding_box([self.item_description_width,y_position], :width =>self.label_width+5) do - # text "(#{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } - # - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" , + # text "(#{ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') } + # - #{ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') })" , # :size => self.item_font_size,:align => :right # end move_down line_move diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 07841f7f..2c2645b0 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -170,7 +170,7 @@ class ReceiptBillPdf < Prawn::Document y_position = cursor if sale_data.bookings[0].dining_facility_id.to_i > 0 - time = sale_data.receipt_date.strftime('%d-%m-%Y') +"("+ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') +"-"+ sale_data.bookings[0].checkout_at.utc.getlocal.strftime('%I:%M %p')+")" + time = sale_data.receipt_date.strftime('%d-%m-%Y') +"("+ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') +"-"+ sale_data.bookings[0].checkout_at.strftime('%I:%M %p')+")" else time = sale_data.receipt_date.strftime('%d-%m-%Y %H:%M %p') end @@ -180,8 +180,8 @@ class ReceiptBillPdf < Prawn::Document end # bounding_box([self.item_description_width,y_position], :width =>self.label_width+5) do - # text "(#{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } - # - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" , + # text "(#{ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') } + # - #{ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') })" , # :size => self.item_font_size,:align => :right # end move_down line_move diff --git a/app/pdf/receipt_bill_star_pdf.rb b/app/pdf/receipt_bill_star_pdf.rb index 0af4ec0d..6c516380 100644 --- a/app/pdf/receipt_bill_star_pdf.rb +++ b/app/pdf/receipt_bill_star_pdf.rb @@ -159,7 +159,7 @@ class ReceiptBillStarPdf < Prawn::Document y_position = cursor if sale_data.bookings[0].dining_facility_id.to_i > 0 - time = sale_data.receipt_date.strftime('%d-%m-%Y') +"("+ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') +"-"+ sale_data.bookings[0].checkout_at.utc.getlocal.strftime('%I:%M %p')+")" + time = sale_data.receipt_date.strftime('%d-%m-%Y') +"("+ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') +"-"+ sale_data.bookings[0].checkout_at.strftime('%I:%M %p')+")" else time = sale_data.receipt_date.strftime('%d-%m-%Y %H:%M %p') end @@ -169,8 +169,8 @@ class ReceiptBillStarPdf < Prawn::Document end # bounding_box([self.item_description_width,y_position], :width =>self.label_width+5) do - # text "(#{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } - # - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" , + # text "(#{ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') } + # - #{ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') })" , # :size => self.item_font_size,:align => :right # end move_down line_move diff --git a/app/pdf/sale_items_pdf.rb b/app/pdf/sale_items_pdf.rb index af76c427..87423c74 100644 --- a/app/pdf/sale_items_pdf.rb +++ b/app/pdf/sale_items_pdf.rb @@ -95,7 +95,7 @@ class SaleItemsPdf < Prawn::Document text "From Date : ", :size => self.item_font_size,:align => :left end bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do - text "#{ from_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left + text "#{ from_date.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left end y_position = cursor @@ -103,7 +103,7 @@ class SaleItemsPdf < Prawn::Document text "To Date : ", :size => self.item_font_size,:align => :left end bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do - text "#{ to_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left + text "#{ to_date.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left end y_position = cursor diff --git a/app/pdf/sale_items_star_pdf.rb b/app/pdf/sale_items_star_pdf.rb index a1181e13..57bc80b6 100644 --- a/app/pdf/sale_items_star_pdf.rb +++ b/app/pdf/sale_items_star_pdf.rb @@ -94,7 +94,7 @@ class SaleItemsStarPdf < Prawn::Document text "From Date : ", :size => self.item_font_size,:align => :left end bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do - text "#{ from_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left + text "#{ from_date.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left end y_position = cursor @@ -102,7 +102,7 @@ class SaleItemsStarPdf < Prawn::Document text "To Date : ", :size => self.item_font_size,:align => :left end bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do - text "#{ to_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left + text "#{ to_date.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left end y_position = cursor diff --git a/app/pdf/stock_check_pdf.rb b/app/pdf/stock_check_pdf.rb index d04cd82e..9386074c 100755 --- a/app/pdf/stock_check_pdf.rb +++ b/app/pdf/stock_check_pdf.rb @@ -74,7 +74,7 @@ class StockCheckPdf < Prawn::Document text "Check Start Time : ", :size => self.item_font_size, :align => :left end bounding_box([self.label_width, y_position], :width => self.label_width, :height => self.item_height) do - text "#{ stockcheck.check_start.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }", :size => self.item_font_size, :align => :left + text "#{ stockcheck.check_start.strftime('%d-%m-%Y %I:%M %p') }", :size => self.item_font_size, :align => :left end y_position = cursor @@ -82,7 +82,7 @@ class StockCheckPdf < Prawn::Document text "Check End Time ", :size => self.item_font_size, :align => :left end bounding_box([self.label_width, y_position], :width => self.label_width, :height => self.item_height) do - text "#{ stockcheck.check_start.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') }", :size => self.item_font_size, :align => :left + text "#{ stockcheck.check_start.strftime('%d-%m-%Y %I:%M %p') }", :size => self.item_font_size, :align => :left end if stockcheck_items.length > 0 diff --git a/app/views/api/restaurant/zones/index.json.jbuilder b/app/views/api/restaurant/zones/index.json.jbuilder index d9bff6be..61154236 100755 --- a/app/views/api/restaurant/zones/index.json.jbuilder +++ b/app/views/api/restaurant/zones/index.json.jbuilder @@ -13,8 +13,8 @@ if @zones json.zone_id table.zone_id #Add this zone_id to keep data structure consistance if !current_booking.nil? json.current_booking current_booking.booking_id - json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).utc.getlocal.strftime("%Y-%m-%d %H:%M:%S") - json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).utc.getlocal.strftime("%Y-%m-%d %H:%M:%S") : "" + json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") + json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") : "" else json.current_booking "" json.checkin_at "" @@ -32,8 +32,8 @@ if @zones json.zone_id room.zone_id #Add this zone_id to keep data structure consistance if !current_booking.nil? json.current_booking current_booking.booking_id - json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).utc.getlocal.strftime("%Y-%m-%d %H:%M:%S") - json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).utc.getlocal.strftime("%Y-%m-%d %H:%M:%S") : "" + json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") + json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") : "" else json.current_booking "" json.checkin_at "" @@ -53,8 +53,8 @@ else #list all tables and rooms with out zones json.zone_id table.zone_id #Add this zone_id to keep data structure consistance if !current_booking.nil? json.current_booking current_booking.booking_id - json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).utc.getlocal.strftime("%Y-%m-%d %H:%M:%S") - json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).utc.getlocal.strftime("%Y-%m-%d %H:%M:%S") : "" + json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") + json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") : "" else json.current_booking "" json.checkin_at "" @@ -72,8 +72,8 @@ else #list all tables and rooms with out zones json.zone_id room.zone_id #Add this zone_id to keep data structure consistance if !current_booking.nil? json.current_booking current_booking.booking_id - json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).utc.getlocal.strftime("%Y-%m-%d %H:%M:%S") - json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).utc.getlocal.strftime("%Y-%m-%d %H:%M:%S") : "" + json.checkin_at Time.parse(current_booking.checkin_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") + json.checkout_at current_booking.checkout_at ? Time.parse(current_booking.checkout_at.strftime("%Y-%m-%d %H:%M:%S")).strftime("%Y-%m-%d %H:%M:%S") : "" else json.current_booking "" json.checkin_at "" diff --git a/app/views/crm/customers/show.html.erb b/app/views/crm/customers/show.html.erb index c2228664..ee351a57 100644 --- a/app/views/crm/customers/show.html.erb +++ b/app/views/crm/customers/show.html.erb @@ -195,7 +195,7 @@ <%= sale.grand_total rescue '-' %> <%= sale.cashier_name rescue '-' %> <%= sale.sale_status %> - <%= sale.receipt_date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> + <%= sale.receipt_date.strftime("%d-%m-%Y %I:%M %p") %> <% add_grand_total += sale.grand_total%> <% end %> @@ -224,7 +224,7 @@ <% if !@credit_sales.nil? %> <% @credit_sales.each do |credit| %> - <%= credit.sale_date.utc.getlocal.strftime("%e %b %Y %I:%M%p") %> + <%= credit.sale_date.strftime("%e %b %Y %I:%M%p") %> <%= credit.receipt_no %> <%= credit.cashier_name %> <%= credit.payment_amount %> diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index bc3332ca..ef09aa29 100755 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -1,7 +1,7 @@
-

<%= t :date_time %> : <%= Time.zone.now.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %>

+

<%= t :date_time %> : <%= Time.zone.now.strftime("%Y-%m-%d %I:%M %p") %>

diff --git a/app/views/foodcourt/orders/app_orders.html.erb b/app/views/foodcourt/orders/app_orders.html.erb index 2afb1171..c8e4763c 100644 --- a/app/views/foodcourt/orders/app_orders.html.erb +++ b/app/views/foodcourt/orders/app_orders.html.erb @@ -63,7 +63,7 @@ <%= link_to foodcourt_app_order_by_booking_path(booking_id: c.booking_id, active: 'completed'), class: 'item-card' do %>
- <%= c.contact_no %> <%= c.checkin_at.utc.getlocal.strftime("%I:%M %p") %>
+ <%= c.contact_no %> <%= c.checkin_at.strftime("%I:%M %p") %>
<%= c.orders.first.try(:order_id) %><%= c.booking_status %>
@@ -91,7 +91,7 @@ <%= link_to foodcourt_app_order_by_booking_path(pending_id: pc.sale_id, active: 'completed'), class: 'item-card' do %>
- <%= pc.receipt_no %> <%= pc.created_at.utc.getlocal.strftime("%I:%M %p") %> + <%= pc.receipt_no %> <%= pc.created_at.strftime("%I:%M %p") %>
<%= pc.sale_status %>
@@ -174,7 +174,7 @@ <%= link_to foodcourt_app_order_by_booking_path(booking_id:bk.booking_id, active: 'mobile'), class: 'item-card' do %>
- <%= bk.contact_no %> <%= bk.checkin_at.utc.getlocal.strftime("%I:%M %p") %>
+ <%= bk.contact_no %> <%= bk.checkin_at.strftime("%I:%M %p") %>
<%= bk.orders.first.try(:order_id) %><%= bk_status %>
diff --git a/app/views/foodcourt/orders/show.html.erb b/app/views/foodcourt/orders/show.html.erb index 53fdb437..65dd728d 100755 --- a/app/views/foodcourt/orders/show.html.erb +++ b/app/views/foodcourt/orders/show.html.erb @@ -195,7 +195,7 @@
- Date: <%= @order.created_at.utc.getlocal.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%> + Date: <%= @order.created_at.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>
diff --git a/app/views/foodcourt/payments/show.html.erb b/app/views/foodcourt/payments/show.html.erb index 7e6288b2..c37f8232 100755 --- a/app/views/foodcourt/payments/show.html.erb +++ b/app/views/foodcourt/payments/show.html.erb @@ -24,7 +24,7 @@
Receipt No : <%=@sale_data.receipt_no rescue ' '%>
-
Receipt Date : <%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
+
Receipt Date : <%=@sale_data.receipt_date.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
Table No : <%=@table_no%>
@@ -44,7 +44,7 @@ <% end %>
-
Checkin Time : <%if !@checkin_time.nil?%><%= @checkin_time.utc.getlocal.strftime("%I:%M %p") %> +
Checkin Time : <%if !@checkin_time.nil?%><%= @checkin_time.strftime("%I:%M %p") %> <%end%>
diff --git a/app/views/foodcourt/sale_edit/edit.html.erb b/app/views/foodcourt/sale_edit/edit.html.erb index f7fbdba4..96ed1960 100755 --- a/app/views/foodcourt/sale_edit/edit.html.erb +++ b/app/views/foodcourt/sale_edit/edit.html.erb @@ -15,7 +15,7 @@

Date: - <%= @saleobj.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %> + <%= @saleobj.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %>

diff --git a/app/views/foodcourt/shifts/sale_summary.html.erb b/app/views/foodcourt/shifts/sale_summary.html.erb index 321a3941..639eca4a 100755 --- a/app/views/foodcourt/shifts/sale_summary.html.erb +++ b/app/views/foodcourt/shifts/sale_summary.html.erb @@ -20,7 +20,7 @@ <%= @shift.employee.name%> <%=@shift.cashier_terminal.name%> - <%= @shift.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') %> + <%= @shift.shift_started_at.strftime('%d-%m-%Y %I:%M %p') %> <%=@shift.opening_balance %> <%=@shift.closing_balance %> diff --git a/app/views/foodcourt/shifts/show.html.erb b/app/views/foodcourt/shifts/show.html.erb index e2f2275c..79ad6c7d 100755 --- a/app/views/foodcourt/shifts/show.html.erb +++ b/app/views/foodcourt/shifts/show.html.erb @@ -10,7 +10,7 @@ - + diff --git a/app/views/inventory/stock_checks/show.html.erb b/app/views/inventory/stock_checks/show.html.erb index 699e929c..62ba4629 100755 --- a/app/views/inventory/stock_checks/show.html.erb +++ b/app/views/inventory/stock_checks/show.html.erb @@ -27,7 +27,7 @@ <%= t("views.right_panel.detail.check_at") %>
- <%= @check.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %> + <%= @check.created_at.strftime("%e %b %Y %I:%M %p") rescue '-' %>
diff --git a/app/views/oqs/_oqs_test.html.erb b/app/views/oqs/_oqs_test.html.erb index 32b749ad..71c01f73 100755 --- a/app/views/oqs/_oqs_test.html.erb +++ b/app/views/oqs/_oqs_test.html.erb @@ -23,7 +23,7 @@

Order at - <%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> + <%= qid.created_at.strftime("%d-%m-%Y %I:%M %p") %> - <%= qid.item_order_by %> diff --git a/app/views/oqs/home/bkindex.html.erb b/app/views/oqs/home/bkindex.html.erb index be62d989..9b1d92d1 100755 --- a/app/views/oqs/home/bkindex.html.erb +++ b/app/views/oqs/home/bkindex.html.erb @@ -57,7 +57,7 @@

Order at - <%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> + <%= qid.created_at.strftime("%d-%m-%Y %I:%M %p") %> - <%= qid.item_order_by %> @@ -106,7 +106,7 @@

Order at - <%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> + <%= qid.created_at.strftime("%d-%m-%Y %I:%M %p") %> - <%= qid.item_order_by %> diff --git a/app/views/oqs/home/index.html.erb b/app/views/oqs/home/index.html.erb index 0b5e9d93..726019b5 100644 --- a/app/views/oqs/home/index.html.erb +++ b/app/views/oqs/home/index.html.erb @@ -74,7 +74,7 @@ Order at - - <%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> + <%= qid.created_at.strftime("%d-%m-%Y %I:%M %p") %>
Order By - <%= qid.item_order_by %> diff --git a/app/views/oqs/home/index_quechange_backup.html.erb b/app/views/oqs/home/index_quechange_backup.html.erb index 33ee74b7..6df7ae14 100755 --- a/app/views/oqs/home/index_quechange_backup.html.erb +++ b/app/views/oqs/home/index_quechange_backup.html.erb @@ -102,7 +102,7 @@ Order at - - <%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> + <%= qid.created_at.strftime("%d-%m-%Y %I:%M %p") %>
Order By - <%= qid.item_order_by %> diff --git a/app/views/origami/credit_sales/show.html.erb b/app/views/origami/credit_sales/show.html.erb index c63d02a3..e2bf6af5 100755 --- a/app/views/origami/credit_sales/show.html.erb +++ b/app/views/origami/credit_sales/show.html.erb @@ -209,7 +209,7 @@

- Date: <%= @sale.receipt_date.utc.getlocal.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%> + Date: <%= @sale.receipt_date.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>
diff --git a/app/views/origami/dashboard/index.html.erb b/app/views/origami/dashboard/index.html.erb index 3640c211..69bd31fb 100644 --- a/app/views/origami/dashboard/index.html.erb +++ b/app/views/origami/dashboard/index.html.erb @@ -4,7 +4,7 @@
-

<%= t :date_time %> : <%= Time.zone.now.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %>

+

<%= t :date_time %> : <%= Time.zone.now.strftime("%Y-%m-%d %I:%M %p") %>

diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index ce1815d6..6120f3aa 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -214,18 +214,18 @@ <% end %> ORDER DETAILS | Table <%= @dining.name rescue "" %> <% if @booking.checkout_by.nil? && !@booking.reserved_by.nil? %> - <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <%= @booking.checkin_at.strftime("%I:%M %p") %> - <%= @booking.checkout_at.strftime("%I:%M %p") %> <% else %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + Checkin Time : <%= @booking.checkin_at.strftime("%I:%M %p") %> <% end %> <% elsif @status_sale == 'sale' %>
INVOICE DETAILS | Table <%= @dining.name rescue "" %> <% if !@booking.reserved_by.nil? && %> - <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <%= @booking.checkin_at.strftime("%I:%M %p") %> - <%= @booking.checkout_at.strftime("%I:%M %p") %> <% else %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + Checkin Time : <%= @booking.checkin_at.strftime("%I:%M %p") %> <% end %>
<% else %> @@ -245,7 +245,7 @@
- Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %> + Date: <%= @date.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
<% elsif !@date.nil? %> @@ -258,7 +258,7 @@
- Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y") rescue '-' %> + Date: <%= @date.strftime("%d/%m/%Y") rescue '-' %>
<% end %> diff --git a/app/views/origami/in_duties/index.html.erb b/app/views/origami/in_duties/index.html.erb index 58e4ac9c..2ccf45a6 100755 --- a/app/views/origami/in_duties/index.html.erb +++ b/app/views/origami/in_duties/index.html.erb @@ -21,8 +21,8 @@
- - + + <% end %> diff --git a/app/views/origami/in_duties/index_in_duty.html.erb b/app/views/origami/in_duties/index_in_duty.html.erb index cfdd28fc..84f88d59 100755 --- a/app/views/origami/in_duties/index_in_duty.html.erb +++ b/app/views/origami/in_duties/index_in_duty.html.erb @@ -26,8 +26,8 @@ - - + + - + - +
<%= t :shift_started_at %><%= @shift.shift_started_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %><%= @shift.shift_started_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %>
<%= t :cashier_name %> <%= in_duty.dining_facility.name rescue '-' %> <%= in_duty.commissioner.name rescue '-' %><%= in_duty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %><%= in_duty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %><%= in_duty.in_time.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %><%= in_duty.out_time.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %> <%= link_to t("views.btn.delete"), origami_destroy_in_duty_path(in_duty.dining_facility.id, in_duty), method: :delete, data: {confirm: 'Are you sure?'} %>
<%= in_duty.dining_facility.name rescue '-' %> <%= in_duty.commissioner.name rescue '-' %><%= in_duty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %><%= in_duty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %><%= in_duty.in_time.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %><%= in_duty.out_time.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %>
In Time<%= @in_duty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %><%= @in_duty.in_time.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %>
Out Time<%= @in_duty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %><%= @in_duty.out_time.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %>
diff --git a/app/views/origami/moveroom/move_dining.html.erb b/app/views/origami/moveroom/move_dining.html.erb index ad4bec59..a703c5d2 100755 --- a/app/views/origami/moveroom/move_dining.html.erb +++ b/app/views/origami/moveroom/move_dining.html.erb @@ -104,18 +104,18 @@ <% if !@booking.nil? %> ORDER DETAILS | Table <%= @dining.name rescue "" %> <% if @booking.checkout_by.nil? && !@booking.reserved_by.nil? %> - <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <%= @booking.checkin_at.strftime("%I:%M %p") %> - <%= @booking.checkout_at.strftime("%I:%M %p") %> <% else %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + Checkin Time : <%= @booking.checkin_at.strftime("%I:%M %p") %> <% end %> <% end %> <% elsif @status_sale == 'sale' %>
INVOICE DETAILS | Table <%= @dining.name rescue "" %> <% if !@booking.reserved_by.nil? && %> - <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <%= @booking.checkin_at.strftime("%I:%M %p") %> - <%= @booking.checkout_at.strftime("%I:%M %p") %> <% else %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + Checkin Time : <%= @booking.checkin_at.strftime("%I:%M %p") %> <% end %>
<% else %> @@ -135,7 +135,7 @@
- Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %> + Date: <%= @date.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
<% elsif !@date.nil? %> @@ -149,7 +149,7 @@
- Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y") rescue '-' %> + Date: <%= @date.strftime("%d/%m/%Y") rescue '-' %>
<% end %> diff --git a/app/views/origami/movetable/move_dining.html.erb b/app/views/origami/movetable/move_dining.html.erb index 191045f7..bed343a3 100755 --- a/app/views/origami/movetable/move_dining.html.erb +++ b/app/views/origami/movetable/move_dining.html.erb @@ -105,18 +105,18 @@ <% if !@booking.nil? %> ORDER DETAILS | Table <%= @dining.name rescue "" %> <% if @booking.checkout_by.nil? && !@booking.reserved_by.nil? %> - <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <%= @booking.checkin_at.strftime("%I:%M %p") %> - <%= @booking.checkout_at.strftime("%I:%M %p") %> <% else %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + Checkin Time : <%= @booking.checkin_at.strftime("%I:%M %p") %> <% end %> <% end %> <% elsif @status_sale == 'sale' %>
INVOICE DETAILS | Table <%= @dining.name rescue "" %> <% if !@booking.reserved_by.nil? && %> - <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <%= @booking.checkin_at.strftime("%I:%M %p") %> - <%= @booking.checkout_at.strftime("%I:%M %p") %> <% else %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + Checkin Time : <%= @booking.checkin_at.strftime("%I:%M %p") %> <% end %>
<% else %> @@ -136,7 +136,7 @@
- Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %> + Date: <%= @date.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
<% elsif !@date.nil? %> @@ -150,7 +150,7 @@
- Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y") rescue '-' %> + Date: <%= @date.strftime("%d/%m/%Y") rescue '-' %>
<% end %> diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index a4f79707..9e046619 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -88,10 +88,10 @@ <%=i%> - <%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %> + <%= order.created_at.strftime("%Y-%m-%d") %> - <%= order.created_at.utc.getlocal.strftime("%I:%M %p") %> + <%= order.created_at.strftime("%I:%M %p") %> <%=order.grand_total%> @@ -142,10 +142,10 @@ <%=i%> - <%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %> + <%= order.created_at.strftime("%Y-%m-%d") %> - <%= order.created_at.utc.getlocal.strftime("%I:%M %p") %> + <%= order.created_at.strftime("%I:%M %p") %> <%=order.grand_total%> @@ -195,10 +195,10 @@ <%=i%> - <%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %> + <%= order.created_at.strftime("%Y-%m-%d") %> - <%= order.created_at.utc.getlocal.strftime("%I:%M %p") %> + <%= order.created_at.strftime("%I:%M %p") %> <%=order.grand_total%> @@ -248,10 +248,10 @@ <%=i%> - <%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %> + <%= order.created_at.strftime("%Y-%m-%d") %> - <%= order.created_at.utc.getlocal.strftime("%I:%M %p") %> + <%= order.created_at.strftime("%I:%M %p") %> <%=order.grand_total%> @@ -295,16 +295,16 @@ <% i=1 @order.each do |order| %> - <% if order.status == 'delivered' && (order.created_at.utc.getlocal.strftime("%Y-%m-%d") == DateTime.now.strftime("%Y-%m-%d")) && !order.delivery.nil? %> + <% if order.status == 'delivered' && (order.created_at.strftime("%Y-%m-%d") == DateTime.now.strftime("%Y-%m-%d")) && !order.delivery.nil? %> <%=i%> - <%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %> + <%= order.created_at.strftime("%Y-%m-%d") %> - <%= order.created_at.utc.getlocal.strftime("%I:%M %p") %> + <%= order.created_at.strftime("%I:%M %p") %> <%=order.grand_total%> diff --git a/app/views/origami/orders/show.html.erb b/app/views/origami/orders/show.html.erb index 73683562..3729c9fa 100755 --- a/app/views/origami/orders/show.html.erb +++ b/app/views/origami/orders/show.html.erb @@ -195,7 +195,7 @@
- Date: <%= @order.created_at.utc.getlocal.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%> + Date: <%= @order.created_at.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>
diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index fa58d8fd..ab5ed613 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -10,7 +10,7 @@
Receipt No : <%=@sale.receipt_no rescue ' '%>
-
Receipt Date : <%=@sale.receipt_date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
+
Receipt Date : <%=@sale.receipt_date.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
Table No : <%=@table_no%>
@@ -28,7 +28,7 @@ <% end %>
-
Checkin Time : <%if !@checkin_time.nil?%><%= @checkin_time.utc.getlocal.strftime("%I:%M %p") %> +
Checkin Time : <%if !@checkin_time.nil?%><%= @checkin_time.strftime("%I:%M %p") %> <%end%>
diff --git a/app/views/origami/product_commissions/load_commissioners.html.erb b/app/views/origami/product_commissions/load_commissioners.html.erb index 7e5ecabe..201a5390 100755 --- a/app/views/origami/product_commissions/load_commissioners.html.erb +++ b/app/views/origami/product_commissions/load_commissioners.html.erb @@ -36,7 +36,7 @@

Date: - <%= @saleobj.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %> + <%= @saleobj.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %>

diff --git a/app/views/origami/room_invoices/index.html.erb b/app/views/origami/room_invoices/index.html.erb index e482490a..b4c198eb 100755 --- a/app/views/origami/room_invoices/index.html.erb +++ b/app/views/origami/room_invoices/index.html.erb @@ -24,7 +24,7 @@

-

Date: <%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

Date: <%= @sale.created_at.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 b18e88a5..3bdc8b36 100755 --- a/app/views/origami/room_invoices/show.html.erb +++ b/app/views/origami/room_invoices/show.html.erb @@ -30,7 +30,7 @@

-

Date: <%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

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

diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index 61664c2c..0202631f 100755 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -234,18 +234,18 @@ <% end %> ORDER DETAILS | Table <%= @room.name rescue "" %> <% if @booking.checkout_by.nil? && !@booking.reserved_by.nil? && %> - <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <%= @booking.checkin_at.strftime("%I:%M %p") %> - <%= @booking.checkout_at.strftime("%I:%M %p") %> <% else %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + Checkin Time : <%= @booking.checkin_at.strftime("%I:%M %p") %> <% end %>
<% elsif @status_sale == 'sale' %>
INVOICE DETAILS | Table <%= @room.name rescue "" %> <% if @booking.checkout_by.nil? && !@booking.reserved_by.nil? && %> - <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> - <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") %> + <%= @booking.checkin_at.strftime("%I:%M %p") %> - <%= @booking.checkout_at.strftime("%I:%M %p") %> <% else %> - Checkin Time : <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %> + Checkin Time : <%= @booking.checkin_at.strftime("%I:%M %p") %> <% end %>
<% else %> @@ -265,7 +265,7 @@
- Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %> + Date: <%= @date.strftime("%d/%m/%Y-%I:%M %p") rescue '-' %>
<% elsif !@date.nil? %> @@ -278,7 +278,7 @@
- Date: <%= @date.utc.getlocal.strftime("%d/%m/%Y") rescue '-' %> + Date: <%= @date.strftime("%d/%m/%Y") rescue '-' %>
<% end %> diff --git a/app/views/origami/sale_edit/edit.html.erb b/app/views/origami/sale_edit/edit.html.erb index 7cf321bc..60c86b41 100755 --- a/app/views/origami/sale_edit/edit.html.erb +++ b/app/views/origami/sale_edit/edit.html.erb @@ -15,7 +15,7 @@

Date: - <%= @saleobj.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %> + <%= @saleobj.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %>

diff --git a/app/views/origami/shifts/sale_summary.html.erb b/app/views/origami/shifts/sale_summary.html.erb index ad9631a0..058f6061 100755 --- a/app/views/origami/shifts/sale_summary.html.erb +++ b/app/views/origami/shifts/sale_summary.html.erb @@ -20,7 +20,7 @@ <%= @shift.employee.name%> <%=@shift.cashier_terminal.name%> - <%= @shift.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') %> + <%= @shift.shift_started_at.strftime('%d-%m-%Y %I:%M %p') %> <%=@shift.opening_balance %> <%=@shift.closing_balance %> diff --git a/app/views/origami/shifts/show.html.erb b/app/views/origami/shifts/show.html.erb index 88f8545c..e7e2f3db 100755 --- a/app/views/origami/shifts/show.html.erb +++ b/app/views/origami/shifts/show.html.erb @@ -10,7 +10,7 @@ - + diff --git a/app/views/origami/table_invoices/index.html.erb b/app/views/origami/table_invoices/index.html.erb index b0c328be..5cc525fd 100755 --- a/app/views/origami/table_invoices/index.html.erb +++ b/app/views/origami/table_invoices/index.html.erb @@ -24,7 +24,7 @@

-

Date: <%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+

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

diff --git a/app/views/origami/table_invoices/show.html.erb b/app/views/origami/table_invoices/show.html.erb index 7f0acdce..2b4cfd80 100644 --- a/app/views/origami/table_invoices/show.html.erb +++ b/app/views/origami/table_invoices/show.html.erb @@ -31,7 +31,7 @@
- Date: <%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>  + Date: <%= @sale.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%> 
diff --git a/app/views/reports/card_sale_tran/index.html.erb b/app/views/reports/card_sale_tran/index.html.erb index 06444aef..d6ba6f33 100644 --- a/app/views/reports/card_sale_tran/index.html.erb +++ b/app/views/reports/card_sale_tran/index.html.erb @@ -24,7 +24,7 @@
- + <% if @shift_from %> @@ -52,10 +52,10 @@ <% if @cardSales != 0 %> <% @cardSales.each do |cardSale| %> - + - +
<%= t :shift_started_at %><%= @shift.shift_started_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %><%= @shift.shift_started_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %>
<%= t :cashier %>
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<%= cardSale.req_date %> <%= cardSale.req_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSale.req_date %> <%= cardSale.req_time.strftime("%I:%M %p") %> <%= cardSale.req_inv_no %> <%= cardSale.req_amt %><%= cardSale.res_date %> <%= cardSale.res_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSale.res_date %> <%= cardSale.res_time.strftime("%I:%M %p") %> <%= cardSale.ref_no %> <%= cardSale.res_amt %> diff --git a/app/views/reports/card_sale_tran/index.xls.erb b/app/views/reports/card_sale_tran/index.xls.erb index 83eea675..6cc941b2 100644 --- a/app/views/reports/card_sale_tran/index.xls.erb +++ b/app/views/reports/card_sale_tran/index.xls.erb @@ -12,7 +12,7 @@ - + <% if @shift_from %> @@ -40,10 +40,10 @@ <% if @cardSales != 0 %> <% @cardSales.each do |cardSale| %> - + - + - + <% if @shift_from %> @@ -53,10 +53,10 @@ <% @cardSettles.each do |cardSettle| %> - + - + diff --git a/app/views/reports/card_settle_tran/index.xls.erb b/app/views/reports/card_settle_tran/index.xls.erb index 0f6e84c0..23c8169b 100644 --- a/app/views/reports/card_settle_tran/index.xls.erb +++ b/app/views/reports/card_settle_tran/index.xls.erb @@ -12,7 +12,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to ? @to.utc.getlocal.strftime("%Y-%b-%d") : '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to ? @to.strftime("%Y-%b-%d") : '-'%>
<%= cardSale.req_date %> <%= cardSale.req_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSale.req_date %> <%= cardSale.req_time.strftime("%I:%M %p") %> <%= cardSale.req_inv_no %> <%= cardSale.req_amt %><%= cardSale.res_date %> <%= cardSale.res_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSale.res_date %> <%= cardSale.res_time.strftime("%I:%M %p") %> <%= cardSale.ref_no %> <%= cardSale.res_amt %> diff --git a/app/views/reports/card_settle_tran/index.html.erb b/app/views/reports/card_settle_tran/index.html.erb index 6e9c2e61..06a1a2ae 100644 --- a/app/views/reports/card_settle_tran/index.html.erb +++ b/app/views/reports/card_settle_tran/index.html.erb @@ -24,7 +24,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<%= cardSettle.shift_sale.shift_started_at.strftime("%e %b %I:%M%p") rescue '-' %> - <%= cardSettle.shift_sale.shift_closed_at ? cardSettle.shift_sale.shift_closed_at.strftime("%e %b %I:%M%p") : '-' %><%= cardSettle.req_date %> <%= cardSettle.req_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSettle.req_date %> <%= cardSettle.req_time.strftime("%I:%M %p") %> <%= cardSettle.req_type %> <%= cardSettle.res_date %> <%= cardSettle.res_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSettle.res_date %> <%= cardSettle.res_time.strftime("%I:%M %p") %> <%= cardSettle.res_type %> <%= cardSettle.shift_sale.employee.name %> <%= cardSettle.sale_cnt %>
- + <% if @shift_from %> @@ -41,9 +41,9 @@ <% @cardSettles.each do |cardSettle| %> - + - + diff --git a/app/views/reports/commission/index.html.erb b/app/views/reports/commission/index.html.erb index 4c9a9e5e..b7512651 100755 --- a/app/views/reports/commission/index.html.erb +++ b/app/views/reports/commission/index.html.erb @@ -29,7 +29,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to ? @to.utc.getlocal.strftime("%Y-%b-%d") : '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to ? @to.strftime("%Y-%b-%d") : '-'%>
<%= cardSettle.shift_sale.shift_started_at.strftime("%e %b %I:%M%p") rescue '-' %> - <%= cardSettle.shift_sale.shift_closed_at ? cardSettle.shift_sale.shift_closed_at.strftime("%e %b %I:%M%p") : '-' %><%= cardSettle.req_date %> <%= cardSettle.req_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSettle.req_date %> <%= cardSettle.req_time.strftime("%I:%M %p") %> <%= cardSettle.req_type %><%= cardSettle.res_date %> <%= cardSettle.res_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSettle.res_date %> <%= cardSettle.res_time.strftime("%I:%M %p") %> <%= cardSettle.res_type %> <%= cardSettle.shift_sale.employee.name %> <%= cardSettle.sale_cnt %>
- + diff --git a/app/views/reports/commission/index.xls.erb b/app/views/reports/commission/index.xls.erb index 5877edf8..db6f238d 100755 --- a/app/views/reports/commission/index.xls.erb +++ b/app/views/reports/commission/index.xls.erb @@ -11,7 +11,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-' %>
<%= t :sale %>
- + diff --git a/app/views/reports/credit_payment/index.html.erb b/app/views/reports/credit_payment/index.html.erb index 0b07849b..bfc607e1 100755 --- a/app/views/reports/credit_payment/index.html.erb +++ b/app/views/reports/credit_payment/index.html.erb @@ -53,7 +53,7 @@ <% total_credit_payment += credit.credit_payment %> <% if @shift_from.nil? && @shift_to.nil? %> - + <% else %> <% end %> @@ -72,7 +72,7 @@ <% if @shift_from.nil? && @shift_to.nil? %> - + <% else %> <% end %> @@ -56,7 +56,7 @@
From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> From Date : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.strftime("%Y-%b-%d") rescue '-' %>
<%= t :sale %>
<%= credit.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%><%= credit.sale_date.strftime("%e %b %I:%M%p") rescue '-'%><%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%><%= number_format(credit.payment_amount, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> <%if credit.credit_payment_shift_name == '-' %> - <%= credit.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%> + <%= credit.sale_date.strftime("%e %b %I:%M%p") rescue '-'%> <% else %> <%= credit.credit_payment_shift_name rescue '-' %> <% end %> diff --git a/app/views/reports/credit_payment/index.xls.erb b/app/views/reports/credit_payment/index.xls.erb index 6dd15e55..1e9af5ed 100755 --- a/app/views/reports/credit_payment/index.xls.erb +++ b/app/views/reports/credit_payment/index.xls.erb @@ -37,7 +37,7 @@ total_credit_payment += credit.credit_payment %>
<%= credit.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%><%= credit.sale_date.strftime("%e %b %I:%M%p") rescue '-'%><%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%><%= credit.payment_amount rescue '-' %> <%if credit.credit_payment_shift_name == '-' %> - <%= credit.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%> + <%= credit.sale_date.strftime("%e %b %I:%M%p") rescue '-'%> <% else %> <%= credit.credit_payment_shift_name rescue '-' %> <% end %> diff --git a/app/views/reports/customer/index.html.erb b/app/views/reports/customer/index.html.erb index 63efd110..9d286d6c 100644 --- a/app/views/reports/customer/index.html.erb +++ b/app/views/reports/customer/index.html.erb @@ -34,7 +34,7 @@ - + <% if @shift_from %> diff --git a/app/views/reports/customer/index.xls.erb b/app/views/reports/customer/index.xls.erb index 5d4b4f30..37bad229 100644 --- a/app/views/reports/customer/index.xls.erb +++ b/app/views/reports/customer/index.xls.erb @@ -12,7 +12,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + <% if @shift_from %> diff --git a/app/views/reports/dailysale/index.html.erb b/app/views/reports/dailysale/index.html.erb index 9a13e2a9..53592a90 100755 --- a/app/views/reports/dailysale/index.html.erb +++ b/app/views/reports/dailysale/index.html.erb @@ -23,7 +23,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + <% @count = @payment_methods.size %> diff --git a/app/views/reports/dailysale/index.xls.erb b/app/views/reports/dailysale/index.xls.erb index 3d81d14f..a97ad24f 100755 --- a/app/views/reports/dailysale/index.xls.erb +++ b/app/views/reports/dailysale/index.xls.erb @@ -12,7 +12,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + <% @count = @payment_methods.size %> diff --git a/app/views/reports/hourly_saleitem/index.html.erb b/app/views/reports/hourly_saleitem/index.html.erb index c456ea62..21806661 100644 --- a/app/views/reports/hourly_saleitem/index.html.erb +++ b/app/views/reports/hourly_saleitem/index.html.erb @@ -19,7 +19,7 @@
- <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> + <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<% if @start_time.blank? || @end_time.blank? %>
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
diff --git a/app/views/reports/hourly_saleitem/index.xls.erb b/app/views/reports/hourly_saleitem/index.xls.erb index 9bfeb1ad..5650776f 100644 --- a/app/views/reports/hourly_saleitem/index.xls.erb +++ b/app/views/reports/hourly_saleitem/index.xls.erb @@ -10,7 +10,7 @@
- <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> + <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<% if @start_time.blank? || @end_time.blank? %>
diff --git a/app/views/reports/induty/index.html.erb b/app/views/reports/induty/index.html.erb index 67457ee0..f93ab396 100644 --- a/app/views/reports/induty/index.html.erb +++ b/app/views/reports/induty/index.html.erb @@ -24,7 +24,7 @@
- + <% if @shift_from %> @@ -52,8 +52,8 @@ - - + + <% end %> <% end %> diff --git a/app/views/reports/induty/index.xls.erb b/app/views/reports/induty/index.xls.erb index e0097faf..f5337487 100755 --- a/app/views/reports/induty/index.xls.erb +++ b/app/views/reports/induty/index.xls.erb @@ -13,7 +13,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<%= induty.receipt_no %> <%= induty.name %> <%= induty.dining_name %><%= induty.in_time.utc.getlocal.strftime("%d-%m-%Y - %I:%M") %><%= induty.out_time.utc.getlocal.strftime("%d-%m-%Y - %I:%M") %><%= induty.in_time.strftime("%d-%m-%Y - %I:%M") %><%= induty.out_time.strftime("%d-%m-%Y - %I:%M") %>
- + <% if @shift_from %> @@ -39,8 +39,8 @@ - - + + <% end %> <% end %> diff --git a/app/views/reports/order_reservation/index.html.erb b/app/views/reports/order_reservation/index.html.erb index 7497f4f0..af48a5b9 100755 --- a/app/views/reports/order_reservation/index.html.erb +++ b/app/views/reports/order_reservation/index.html.erb @@ -29,7 +29,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<%= induty.receipt_no %> <%= induty.name %> <%= induty.dining_name %><%= induty.in_time.utc.getlocal.strftime("%d-%m-%Y - %I:%M") %><%= induty.out_time.utc.getlocal.strftime("%d-%m-%Y - %I:%M") %><%= induty.in_time.strftime("%d-%m-%Y - %I:%M") %><%= induty.out_time.strftime("%d-%m-%Y - %I:%M") %>
- + <% if @shift_from %> @@ -128,7 +128,7 @@ end %> - + diff --git a/app/views/reports/order_reservation/index.xls.erb b/app/views/reports/order_reservation/index.xls.erb index 285caf8e..70261b5e 100755 --- a/app/views/reports/order_reservation/index.xls.erb +++ b/app/views/reports/order_reservation/index.xls.erb @@ -12,7 +12,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<%= order_reservation.receipt_date.utc.getlocal.strftime("%Y-%m-%d") %><%= order_reservation.receipt_date.strftime("%Y-%m-%d") %> <%= order_reservation.receipt_no %> <%= order_reservation.transaction_ref %> <%= order_reservation.name %>
- + <% if @shift_from %> @@ -115,7 +115,7 @@ end %> - + diff --git a/app/views/reports/payment_method/index.html.erb b/app/views/reports/payment_method/index.html.erb index 41d93236..6d02c958 100755 --- a/app/views/reports/payment_method/index.html.erb +++ b/app/views/reports/payment_method/index.html.erb @@ -25,7 +25,7 @@ @@ -97,7 +97,7 @@ end%> <% if @shift_from.nil? && @shift_to.nil? %> - + <% else %> <% end %> diff --git a/app/views/reports/payment_method/index.xls.erb b/app/views/reports/payment_method/index.xls.erb index 7bf1a7c2..15f6cf14 100755 --- a/app/views/reports/payment_method/index.xls.erb +++ b/app/views/reports/payment_method/index.xls.erb @@ -12,7 +12,7 @@ @@ -83,7 +83,7 @@ end%> <% if @shift_from.nil? && @shift_to.nil? %> - + <% else %> <% end %> diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb index 47d243d1..85b3b622 100755 --- a/app/views/reports/receipt_no/index.html.erb +++ b/app/views/reports/receipt_no/index.html.erb @@ -30,7 +30,7 @@ - + <% if @shift_from %> diff --git a/app/views/reports/receipt_no/index.xls.erb b/app/views/reports/receipt_no/index.xls.erb index a83b3357..167b6ae9 100755 --- a/app/views/reports/receipt_no/index.xls.erb +++ b/app/views/reports/receipt_no/index.xls.erb @@ -12,7 +12,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<%= order_reservation.receipt_date.utc.getlocal.strftime("%Y-%m-%d") %><%= order_reservation.receipt_date.strftime("%Y-%m-%d") %> <%= order_reservation.receipt_no %> <%= order_reservation.transaction_ref %> <%= order_reservation.name %>
- <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> + <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<%= payment.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%><%= payment.sale_date.strftime("%e %b %I:%M%p") rescue '-'%><%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%>
- <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> + <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
<%= payment.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%><%= payment.sale_date.strftime("%e %b %I:%M%p") rescue '-'%><%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%>
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + <% if @shift_from %> diff --git a/app/views/reports/receipt_no_detail/index.html.erb b/app/views/reports/receipt_no_detail/index.html.erb index af91fc43..4304e690 100755 --- a/app/views/reports/receipt_no_detail/index.html.erb +++ b/app/views/reports/receipt_no_detail/index.html.erb @@ -22,7 +22,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- <% if @shift_from %> diff --git a/app/views/reports/receipt_no_detail/index.xls.erb b/app/views/reports/receipt_no_detail/index.xls.erb index 478a9285..6c6dea8b 100755 --- a/app/views/reports/receipt_no_detail/index.xls.erb +++ b/app/views/reports/receipt_no_detail/index.xls.erb @@ -13,7 +13,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> + <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- <% if @shift_from %> diff --git a/app/views/reports/saleitem/index.html.erb b/app/views/reports/saleitem/index.html.erb index 5bcbe80b..7d9b6f40 100644 --- a/app/views/reports/saleitem/index.html.erb +++ b/app/views/reports/saleitem/index.html.erb @@ -25,7 +25,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> + <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + <% if @shift_from %> diff --git a/app/views/reports/saleitem/index.xls.erb b/app/views/reports/saleitem/index.xls.erb index 4eaa3460..0fa1b87c 100755 --- a/app/views/reports/saleitem/index.xls.erb +++ b/app/views/reports/saleitem/index.xls.erb @@ -13,7 +13,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + <% if @shift_from %> diff --git a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb index 30f91736..cd14138d 100755 --- a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb +++ b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb @@ -77,7 +77,7 @@ //Reset the form to pervious values <% if params[:shift_name].to_i > 0%> shift_id = '<%= params[:shift_name] %>' -local_date = '<%= @shift.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p")%> -<%= @shift.shift_closed_at ? @shift.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") : "-" %>' +local_date = '<%= @shift.shift_started_at.strftime("%e %b %I:%M%p")%> -<%= @shift.shift_closed_at ? @shift.shift_closed_at.strftime("%e %b %I:%M%p") : "-" %>' var shift = $('#shift_name'); str = ''; shift.append(str); diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb index 5fd30131..7b102cdc 100755 --- a/app/views/reports/shiftsale/index.html.erb +++ b/app/views/reports/shiftsale/index.html.erb @@ -33,8 +33,8 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- diff --git a/app/views/reports/shiftsale/index.xls.erb b/app/views/reports/shiftsale/index.xls.erb index 4d886560..12de4bb4 100755 --- a/app/views/reports/shiftsale/index.xls.erb +++ b/app/views/reports/shiftsale/index.xls.erb @@ -17,8 +17,8 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> + <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> + - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- diff --git a/app/views/reports/staff_meal/index.html.erb b/app/views/reports/staff_meal/index.html.erb index 35da9e80..bc6e6acf 100644 --- a/app/views/reports/staff_meal/index.html.erb +++ b/app/views/reports/staff_meal/index.html.erb @@ -25,7 +25,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> + <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> + - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + <% if @shift_from %> diff --git a/app/views/reports/staff_meal/index.xls.erb b/app/views/reports/staff_meal/index.xls.erb index 50481186..1b20ff57 100644 --- a/app/views/reports/staff_meal/index.xls.erb +++ b/app/views/reports/staff_meal/index.xls.erb @@ -13,7 +13,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + <% if @shift_from %> diff --git a/app/views/reports/stock_check/index.html.erb b/app/views/reports/stock_check/index.html.erb index 0f22a9c2..93451883 100755 --- a/app/views/reports/stock_check/index.html.erb +++ b/app/views/reports/stock_check/index.html.erb @@ -31,7 +31,7 @@
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> <%= t("views.right_panel.detail.from_date") %> : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.strftime("%Y-%b-%d") rescue '-'%>
- + @@ -76,7 +76,7 @@ - + <% !result.stock_count.nil? ? total_stock_count += result.stock_count : total_stock_count += 0 %> <% !result.stock_balance.nil? ? total_stock_balance += result.stock_balance : total_stock_balance += 0 %> diff --git a/app/views/reports/stock_check/index.xls.erb b/app/views/reports/stock_check/index.xls.erb index 34f32968..b30cfc0a 100755 --- a/app/views/reports/stock_check/index.xls.erb +++ b/app/views/reports/stock_check/index.xls.erb @@ -11,7 +11,7 @@
From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> From Date : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.strftime("%Y-%b-%d") rescue '-' %>
<%= t("views.right_panel.detail.item") %> <%= t("views.right_panel.detail.name") %><%= result.remark rescue '-' %> <%= Employee.find(result.stock_check.check_by).name rescue '-' %> <%= result.stock_check.reason rescue '-' %><%= result.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %><%= result.created_at.strftime("%e %b %Y %I:%M %p") rescue '-' %>
- + @@ -56,7 +56,7 @@ - + <% !result.stock_count.nil? ? total_stock_count += result.stock_count : total_stock_count += 0 %> <% !result.stock_balance.nil? ? total_stock_balance += result.stock_balance : total_stock_balance += 0 %> diff --git a/app/views/reports/void_sale/index.html.erb b/app/views/reports/void_sale/index.html.erb index adaccfe7..3e121244 100755 --- a/app/views/reports/void_sale/index.html.erb +++ b/app/views/reports/void_sale/index.html.erb @@ -60,7 +60,7 @@ <% result[:items].each do |item| %> - + diff --git a/app/views/reports/void_sale/index.xls.erb b/app/views/reports/void_sale/index.xls.erb index 25806ff8..d0f6c39e 100755 --- a/app/views/reports/void_sale/index.xls.erb +++ b/app/views/reports/void_sale/index.xls.erb @@ -44,7 +44,7 @@ <% result[:items].each do |item| %> - + diff --git a/app/views/reports/waste_and_spoilage/index-bk.html.erb b/app/views/reports/waste_and_spoilage/index-bk.html.erb index fc4fe4a0..fb428e84 100644 --- a/app/views/reports/waste_and_spoilage/index-bk.html.erb +++ b/app/views/reports/waste_and_spoilage/index-bk.html.erb @@ -36,7 +36,7 @@ - + diff --git a/app/views/reports/waste_and_spoilage/index.xls.erb b/app/views/reports/waste_and_spoilage/index.xls.erb index 7e71fbdc..0a7c371f 100755 --- a/app/views/reports/waste_and_spoilage/index.xls.erb +++ b/app/views/reports/waste_and_spoilage/index.xls.erb @@ -28,7 +28,7 @@ - + diff --git a/app/views/settings/commissioners/index.html.erb b/app/views/settings/commissioners/index.html.erb index f4de4978..0bd72cbc 100755 --- a/app/views/settings/commissioners/index.html.erb +++ b/app/views/settings/commissioners/index.html.erb @@ -34,8 +34,8 @@ <%= commissioner.employee.name rescue '-' %> - - + + - + - + diff --git a/app/views/settings/employees/index.html.erb b/app/views/settings/employees/index.html.erb index bc742a7a..770abfff 100755 --- a/app/views/settings/employees/index.html.erb +++ b/app/views/settings/employees/index.html.erb @@ -30,8 +30,8 @@ - - + + @@ -41,8 +41,8 @@ - - + + diff --git a/app/views/settings/employees/show.html.erb b/app/views/settings/employees/show.html.erb index 5ab3648c..3ca1e02e 100755 --- a/app/views/settings/employees/show.html.erb +++ b/app/views/settings/employees/show.html.erb @@ -35,11 +35,11 @@ <% end%> - + - + diff --git a/app/views/settings/menu_categories/show.html.erb b/app/views/settings/menu_categories/show.html.erb index cf377635..10c29fe5 100755 --- a/app/views/settings/menu_categories/show.html.erb +++ b/app/views/settings/menu_categories/show.html.erb @@ -47,7 +47,7 @@ - + - + <% if settings_menu_item.type == "SimpleMenuItem" %> - + diff --git a/app/views/settings/menus/index.html.erb b/app/views/settings/menus/index.html.erb index cdb80756..6feaabb7 100755 --- a/app/views/settings/menus/index.html.erb +++ b/app/views/settings/menus/index.html.erb @@ -59,7 +59,7 @@ - + - + - + <% end %> diff --git a/app/views/settings/promotion_products/index.html.erb b/app/views/settings/promotion_products/index.html.erb index 043983ca..362e126b 100755 --- a/app/views/settings/promotion_products/index.html.erb +++ b/app/views/settings/promotion_products/index.html.erb @@ -38,7 +38,7 @@ - - + diff --git a/app/views/settings/rooms/index.html.erb b/app/views/settings/rooms/index.html.erb index 3b4cd1f4..72691fc1 100755 --- a/app/views/settings/rooms/index.html.erb +++ b/app/views/settings/rooms/index.html.erb @@ -42,7 +42,7 @@ <% else %> <% end %> - + diff --git a/app/views/settings/rooms/show.html.erb b/app/views/settings/rooms/show.html.erb index 82fdd4d3..0eb51530 100755 --- a/app/views/settings/rooms/show.html.erb +++ b/app/views/settings/rooms/show.html.erb @@ -42,7 +42,7 @@ <% else %> <% end %> - + - + <% if settings_menu_item.type == "SimpleMenuItem" %> - + - + - + <% if settings_menu_item.type == "SimpleMenuItem" %> - + - + <% end %> - + <% end %> - + <% end %> - + <% end %> @@ -100,7 +100,7 @@ <% else %> <% end %> - + <% end %> diff --git a/app/views/transactions/bookings/index.html.erb b/app/views/transactions/bookings/index.html.erb index 9a61a001..6e0c2796 100755 --- a/app/views/transactions/bookings/index.html.erb +++ b/app/views/transactions/bookings/index.html.erb @@ -72,12 +72,12 @@ - - + + - + <% end %> <% else %> diff --git a/app/views/transactions/bookings/show.html.erb b/app/views/transactions/bookings/show.html.erb index 168fa3f3..7d732199 100755 --- a/app/views/transactions/bookings/show.html.erb +++ b/app/views/transactions/bookings/show.html.erb @@ -57,12 +57,12 @@ - - + + - + <%if current_login_employee.role == "administrator" %> <%if (!@order.nil?) && (@booking.sale_id.nil?) %> @@ -139,7 +139,7 @@ - + <% else %> diff --git a/app/views/transactions/card_sale_trans/index.html.erb b/app/views/transactions/card_sale_trans/index.html.erb index b39cb8b5..85ab6efd 100644 --- a/app/views/transactions/card_sale_trans/index.html.erb +++ b/app/views/transactions/card_sale_trans/index.html.erb @@ -98,10 +98,10 @@ - + - + - + - + diff --git a/app/views/transactions/order_reservations/index.html.erb b/app/views/transactions/order_reservations/index.html.erb index 6eb6848a..9747a565 100644 --- a/app/views/transactions/order_reservations/index.html.erb +++ b/app/views/transactions/order_reservations/index.html.erb @@ -142,7 +142,7 @@ <%= link_to order_reservation.order_reservation_id, transactions_order_reservation_path(order_reservation) %> - + diff --git a/app/views/transactions/order_reservations/show.html.erb b/app/views/transactions/order_reservations/show.html.erb index 596a9835..b7ba5978 100755 --- a/app/views/transactions/order_reservations/show.html.erb +++ b/app/views/transactions/order_reservations/show.html.erb @@ -45,7 +45,7 @@ - + @@ -66,7 +66,7 @@ - + diff --git a/app/views/transactions/orders/index.html.erb b/app/views/transactions/orders/index.html.erb index 9c67c7b8..73808167 100755 --- a/app/views/transactions/orders/index.html.erb +++ b/app/views/transactions/orders/index.html.erb @@ -77,7 +77,7 @@ - + diff --git a/app/views/transactions/orders/show.html.erb b/app/views/transactions/orders/show.html.erb index 512992f3..384e5eef 100755 --- a/app/views/transactions/orders/show.html.erb +++ b/app/views/transactions/orders/show.html.erb @@ -34,7 +34,7 @@ - + diff --git a/app/views/transactions/sales/index.html.erb b/app/views/transactions/sales/index.html.erb index e21a97d3..0ea20046 100644 --- a/app/views/transactions/sales/index.html.erb +++ b/app/views/transactions/sales/index.html.erb @@ -115,7 +115,7 @@ - + <% end %> <% else %> diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb index ea2d68f1..43d88f81 100755 --- a/app/views/transactions/sales/show.html.erb +++ b/app/views/transactions/sales/show.html.erb @@ -89,7 +89,7 @@ - + <% end %> diff --git a/app/views/transactions/shift_sales/index.html.erb b/app/views/transactions/shift_sales/index.html.erb index c834f2b7..0cdda96b 100755 --- a/app/views/transactions/shift_sales/index.html.erb +++ b/app/views/transactions/shift_sales/index.html.erb @@ -75,9 +75,9 @@ - - diff --git a/app/views/transactions/shift_sales/show.html.erb b/app/views/transactions/shift_sales/show.html.erb index 5cfbe9ac..1330d87f 100755 --- a/app/views/transactions/shift_sales/show.html.erb +++ b/app/views/transactions/shift_sales/show.html.erb @@ -31,7 +31,7 @@ -
From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> From Date : <%= @from.strftime("%Y-%b-%d") rescue '-' %> - To Date : <%= @to.strftime("%Y-%b-%d") rescue '-' %>
<%= t("views.right_panel.detail.item") %> <%= t("views.right_panel.detail.name") %><%= result.remark rescue '-' %> <%= Employee.find(result.stock_check.check_by).name rescue '-' %> <%= result.stock_check.reason rescue '-' %><%= result.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %><%= result.created_at.strftime("%e %b %Y %I:%M %p") rescue '-' %>
<%= item.receipt_no rescue '-' %> <%= item.receipt_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-' %><%= item.receipt_date.strftime("%e %b %I:%M%p") rescue '-' %> <%= number_format(item.total_amount.to_f, precision: precision.to_i ,delimiter: delimiter) %> <%= number_format(item.grand_total.to_f , precision: precision.to_i ,delimiter: delimiter) rescue '-'%> <%= number_format(item.rounding_adjustment.to_f, precision: precision.to_i ,delimiter: delimiter) rescue '-' %>
<%= item.receipt_no rescue '-' %> <%= item.receipt_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-' %><%= item.receipt_date.strftime("%e %b %I:%M%p") rescue '-' %> <%= item.total_amount.to_f rescue '-'%> <%= item.grand_total.to_f rescue '-'%> <%= item.rounding_adjustment.to_f rescue '-' %> Date : <%= sale.created_at.utc.getlocal.strftime("%e,%b %Y %I:%M %p") %>Date : <%= sale.created_at.strftime("%e,%b %Y %I:%M %p") %>
Menu Category Date : <%= sale.created_at.utc.getlocal.strftime("%e,%b %Y %I:%M %p") %>Date : <%= sale.created_at.strftime("%e,%b %Y %I:%M %p") %>
Menu Category <%= commissioner.commission.name rescue '-' %><%= commissioner.joined_date.utc.getlocal.strftime('%Y-%b-%d') rescue '-' %><%= commissioner.resigned_date.utc.getlocal.strftime('%Y-%b-%d') rescue '-' %><%= commissioner.joined_date.strftime('%Y-%b-%d') rescue '-' %><%= commissioner.resigned_date.strftime('%Y-%b-%d') rescue '-' %> <%= commissioner.is_active %> <%= link_to t("views.btn.show"), settings_commissioner_path(commissioner),:class => 'btn btn-info btn-sm waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_commissioner_path(commissioner),:class => 'btn btn-primary btn-sm waves-effect' %> diff --git a/app/views/settings/commissioners/show.html.erb b/app/views/settings/commissioners/show.html.erb index 113843e6..7a44264d 100755 --- a/app/views/settings/commissioners/show.html.erb +++ b/app/views/settings/commissioners/show.html.erb @@ -47,11 +47,11 @@
<%= t("views.right_panel.detail.joined_date") %><%= @commissioner.joined_date.utc.getlocal.strftime('%Y-%b-%d') rescue '-' %><%= @commissioner.joined_date.strftime('%Y-%b-%d') rescue '-' %>
<%= t("views.right_panel.detail.resigned_date") %><%= @commissioner.resigned_date.utc.getlocal.strftime('%Y-%b-%d') rescue '-' %><%= @commissioner.resigned_date.strftime('%Y-%b-%d') rescue '-' %>
<%= t("views.right_panel.detail.active") %>
<%= link_to employee.name,settings_employee_path(employee) %> <%= employee.role %><%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= employee.created_at.strftime("%Y-%m-%d/%I:%M %p") %><%= employee.updated_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit"), edit_settings_employee_path(employee),:class => 'btn btn-info btn-sm waves-effect' %>
<%= link_to employee.name,settings_employee_path(employee) %> <%= employee.role %><%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= employee.created_at.strftime("%Y-%m-%d/%I:%M %p") %><%= employee.updated_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit"), edit_settings_employee_path(employee),:class => 'btn btn-info btn-sm waves-effect' %>
<%= t("views.right_panel.detail.created_at") %><%= @employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= @employee.created_at.strftime("%Y-%m-%d/%I:%M %p") %>
<%= t("views.right_panel.detail.updated_at") %><%= @employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= @employee.updated_at.strftime("%Y-%m-%d/%I:%M %p") %>
<%= t("views.right_panel.detail.employee_photo") %><%= @settings_menu_category.alt_name %> <%= @settings_menu_category.is_available rescue false%> <%= @settings_menu_category.created_at.utc.getlocal.strftime("%Y-%m-%d") %><%= @settings_menu_category.created_at.strftime("%Y-%m-%d") %> <%= link_to t("views.btn.edit"), edit_settings_menu_menu_category_path(@settings_menu_category, @settings_menu_category),:class => 'btn btn-primary btn-sm waves-effect' %> <%= settings_menu_item.parent.name rescue "-" %> <%= settings_menu_item.is_available %> <%= settings_menu_item.created_at.utc.getlocal.strftime("%Y-%m-%d") %><%= settings_menu_item.created_at.strftime("%Y-%m-%d") %> diff --git a/app/views/settings/menu_item_instances/show.html.erb b/app/views/settings/menu_item_instances/show.html.erb index ef8fe3a6..81194c6c 100755 --- a/app/views/settings/menu_item_instances/show.html.erb +++ b/app/views/settings/menu_item_instances/show.html.erb @@ -40,7 +40,7 @@ <%= @settings_menu_item_instances.is_default %>
<%= t("views.right_panel.detail.created_at") %><%= @settings_menu_item_instances.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= @settings_menu_item_instances.created_at.strftime("%Y-%m-%d/%I:%M %p") %>
<%= settings_menu.is_active %> <%= link_to t("views.btn.edit"), edit_settings_menu_path(settings_menu),:class => 'btn btn-info btn-sm waves-effect' %> diff --git a/app/views/settings/menus/show.html.erb b/app/views/settings/menus/show.html.erb index 3afc74e8..8975c63e 100755 --- a/app/views/settings/menus/show.html.erb +++ b/app/views/settings/menus/show.html.erb @@ -45,7 +45,7 @@ <%= @settings_menu.valid_time_from.strftime("%H:%M") rescue "-" %> <%= @settings_menu.valid_time_to.strftime("%H:%M") rescue "-" %> <%= @settings_menu.created_by %><%= @settings_menu.created_at.utc.getlocal.strftime("%Y-%m-%d") %><%= @settings_menu.created_at.strftime("%Y-%m-%d") %> <%= link_to t("views.btn.edit"), edit_settings_menu_path(@settings_menu),:class => 'btn btn-primary btn-sm waves-effect' %> <%= category.menu_items.count %> <%= category.order_by %> <%= category.is_available %><%= category.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= category.created_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit"), edit_settings_menu_menu_category_path(@settings_menu, category),:class => 'btn btn-info btn-sm waves-effect' %>
<%= pro.net_off rescue "-" %> <%= pro.net_price rescue "-" %> <%= pro.percentage %><%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p"),:class => 'btn btn-primary btn-lg waves-effect' %> + <%= pro.created_at.strftime("%Y-%m-%d/%I:%M %p"),:class => 'btn btn-primary btn-lg waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_promotion_promotion_product_path(pro),:class => 'btn btn-info btn-lg waves-effect' %> <%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= pro.created_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit"), edit_settings_promotion_path(pro),:class => 'btn btn-primary btn-sm waves-effect' %>
<%= room.created_by %><%= room.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= room.created_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit"), edit_settings_zone_room_path(@zone,room),:class => 'btn btn-info btn-lg waves-effect' %> <%= link_to t("views.btn.delete"), settings_zone_room_path(@zone,room), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-lg waves-effect' %>
<%= @room.created_by %><%= @room.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= @room.created_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit"), edit_settings_zone_room_path(@zone,@room),:class => 'btn btn-primary btn-sm waves-effect' %> <%= settings_menu_item.type %> <%= settings_menu_item.parent.name rescue "-" %> <%= settings_menu_item.created_at.utc.getlocal.strftime("%Y-%m-%d") %><%= settings_menu_item.created_at.strftime("%Y-%m-%d") %><%= link_to 'Show', settings_menu_category_simple_menu_item_path(@category, settings_menu_item ),:class => 'btn btn-info btn-sm waves-effect' %> diff --git a/app/views/settings/set_menu_items/show.html.erb b/app/views/settings/set_menu_items/show.html.erb index c8fbd61c..b1f37a4e 100755 --- a/app/views/settings/set_menu_items/show.html.erb +++ b/app/views/settings/set_menu_items/show.html.erb @@ -54,7 +54,7 @@ <%= @settings_menu_item.min_qty %> <%= @settings_menu_item.is_available %><%= @settings_menu_item.created_at.utc.getlocal.strftime("%Y-%m-%d") %><%= @settings_menu_item.created_at.strftime("%Y-%m-%d") %> <%= link_to t("views.btn.edit"), edit_settings_menu_category_set_menu_item_path(@category, @settings_menu_item),:class => 'btn btn-info btn-sm waves-effect' %> <%= settings_menu_item.price %> <%= settings_menu_item.is_available %> <%= link_to 'Show', settings_set_menu_item_menu_item_instance_path(@settings_menu_item, settings_menu_item ),:class => 'btn btn-info btn-sm waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_set_menu_item_menu_item_instance_path(@settings_menu_item, settings_menu_item),:class => 'btn btn-primary btn-sm waves-effect' %> diff --git a/app/views/settings/simple_menu_items/index.html.erb b/app/views/settings/simple_menu_items/index.html.erb index beba144e..206c2857 100755 --- a/app/views/settings/simple_menu_items/index.html.erb +++ b/app/views/settings/simple_menu_items/index.html.erb @@ -108,7 +108,7 @@ <%= settings_menu_item.type %> <%= settings_menu_item.parent.name rescue "-" %> <%= settings_menu_item.created_at.utc.getlocal.strftime("%Y-%m-%d") %><%= settings_menu_item.created_at.strftime("%Y-%m-%d") %><%= link_to 'Show', settings_menu_category_simple_menu_item_path(@category, settings_menu_item ),:class => 'btn btn-info btn-sm waves-effect' %> diff --git a/app/views/settings/simple_menu_items/show.html.erb b/app/views/settings/simple_menu_items/show.html.erb index 1d1b2fa9..42af765b 100755 --- a/app/views/settings/simple_menu_items/show.html.erb +++ b/app/views/settings/simple_menu_items/show.html.erb @@ -58,7 +58,7 @@ <%= @settings_menu_item.is_available %><%= @settings_menu_item.created_at.utc.getlocal.strftime("%Y-%m-%d") %><%= @settings_menu_item.created_at.strftime("%Y-%m-%d") %> <%= link_to t("views.btn.edit"), edit_settings_menu_category_simple_menu_item_path(@category, @settings_menu_item),:class => 'btn btn-primary btn-lg waves-effect' %> @@ -117,7 +117,7 @@ <%= settings_menu_item.promotion_price %> <%= settings_menu_item.is_available %> <%= link_to 'Show', settings_simple_menu_item_menu_item_instance_path(@settings_menu_item, settings_menu_item ),:class => 'btn btn-info btn-sm waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_simple_menu_item_menu_item_instance_path(@settings_menu_item, settings_menu_item),:class => 'btn btn-primary btn-sm waves-effect' %> diff --git a/app/views/settings/tables/index.html.erb b/app/views/settings/tables/index.html.erb index c343298d..d15761df 100755 --- a/app/views/settings/tables/index.html.erb +++ b/app/views/settings/tables/index.html.erb @@ -41,7 +41,7 @@ <% else %> <%= table.created_by %><%= table.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= table.created_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.show"), settings_zone_table_path(@zone,table),:class => 'btn btn-info btn-sm waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_zone_table_path(@zone,table),:class => "btn btn-info btn-sm waves-effect" %> diff --git a/app/views/settings/tables/show.html.erb b/app/views/settings/tables/show.html.erb index 36c6e30a..edc74069 100755 --- a/app/views/settings/tables/show.html.erb +++ b/app/views/settings/tables/show.html.erb @@ -44,7 +44,7 @@ <% else %> <%= @table.created_by %><%= @table.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= @table.created_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit"), edit_settings_zone_table_path(@zone,@table),:class => 'btn btn-primary btn-sm waves-effect' %> <%= settings_table.created_by %><%= settings_table.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= settings_table.created_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit"), edit_settings_zone_table_path(@settings_zone, settings_table),:class => 'btn btn-info btn-lg waves-effect' %>
<%= room.created_by %><%= room.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %><%= room.created_at.strftime("%Y-%m-%d/%I:%M %p") %> <%= link_to t("views.btn.edit") ,edit_settings_zone_room_path(@settings_zone, room),:class => 'btn btn-info btn-lg waves-effect' %>
<%= link_to booking.booking_id, transactions_booking_path(booking) %> <%= link_to booking.sale_id, transactions_sale_path(booking.sale_id) rescue '-' %> <%= booking.dining_facility.name rescue '' %><%= booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %><%= booking.checkout_at.utc.getlocal.strftime("%I:%M %p") rescue '-' %><%= booking.checkin_at.strftime("%I:%M %p") %><%= booking.checkout_at.strftime("%I:%M %p") rescue '-' %> <%= booking.checkin_by rescue '-' %> <%= booking.checkout_by rescue '-' %> <%= booking.booking_status %> <%= booking.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> <%= booking.created_at.strftime("%d-%m-%Y %I:%M %p") %>
<%= @booking.booking_id%> <%= link_to @booking.sale_id, transactions_sale_path(@booking.sale_id) rescue '-' %> <%= @booking.dining_facility.name rescue '' %><%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %><%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") rescue '-' %><%= @booking.checkin_at.strftime("%I:%M %p") %><%= @booking.checkout_at.strftime("%I:%M %p") rescue '-' %> <%= @booking.checkin_by rescue '-' %> <%= @booking.checkout_by rescue '-' %> <%= @booking.booking_status %> <%= @booking.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> <%= @booking.created_at.strftime("%d-%m-%Y %I:%M %p") %> <%= @sale.grand_total rescue '-' %> <%= @sale.cashier_name rescue '-' %> <%= @sale.sale_status %> <%= @sale.receipt_date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> <%= @sale.receipt_date.strftime("%d-%m-%Y %I:%M %p") %>

There is no data ....

<%= link_to cardSale.sale_id, transactions_sale_path(cardSale.sale_id) rescue '-' %><%= cardSale.req_date %> <%= cardSale.req_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSale.req_date %> <%= cardSale.req_time.strftime("%I:%M %p") %> <%= cardSale.req_inv_no %> <%= cardSale.req_amt %><%= cardSale.res_date %> <%= cardSale.res_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSale.res_date %> <%= cardSale.res_time.strftime("%I:%M %p") %> <%= cardSale.ref_no %> <%= cardSale.res_amt %> diff --git a/app/views/transactions/card_settle_trans/index.html.erb b/app/views/transactions/card_settle_trans/index.html.erb index e520c624..14f179a2 100644 --- a/app/views/transactions/card_settle_trans/index.html.erb +++ b/app/views/transactions/card_settle_trans/index.html.erb @@ -96,9 +96,9 @@ <% @cardSettles.each do |cardSettle| %>
<%= cardSettle.shift_sale.shift_started_at.strftime("%e %b %I:%M%p") rescue '-' %> - <%= cardSettle.shift_sale.shift_closed_at ? cardSettle.shift_sale.shift_closed_at.strftime("%e %b %I:%M%p") : '-' %><%= cardSettle.req_date %> <%= cardSettle.req_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSettle.req_date %> <%= cardSettle.req_time.strftime("%I:%M %p") %> <%= cardSettle.req_type %><%= cardSettle.res_date %> <%= cardSettle.res_time.utc.getlocal.strftime("%I:%M %p") %><%= cardSettle.res_date %> <%= cardSettle.res_time.strftime("%I:%M %p") %> <%= cardSettle.res_type %> <%= cardSettle.shift_sale.employee.name %> <%= cardSettle.sale_cnt %><%= link_to order_reservation.sale_id, transactions_sale_path(order_reservation.sale_id) rescue '-' %> <%= order_reservation.order_reservation_type %><%= order_reservation.requested_time.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %><%= order_reservation.requested_time.strftime("%Y-%m-%d %I:%M %p") %> <%= provider%> <%= order_reservation.status %> <%= order_reservation.payment_type%>
<%= @order_reservation.transaction_ref %> <%= @order_reservation.order_reservation_type %><%= @order_reservation.requested_time.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %><%= @order_reservation.requested_time.strftime("%Y-%m-%d %I:%M %p") %> <%= @order_reservation.expected_waiting_time rescue '-' %> <%= @order_reservation.status %> <%= @order_reservation.payment_type %><%=item.qty rescue ' '%> <%= number_format(item.price > 0 ? item.price : item.unit_price, precision:precision.to_i, delimiter:delimiter) rescue ' '%> <%= number_format(item.price > 0 ? item.qty * item.price : item.qty * item.unit_price, precision:precision.to_i, delimiter:delimiter) rescue ' '%><%=l item.created_at.utc.getlocal , :format => :short rescue ' ' %><%=l item.created_at , :format => :short rescue ' ' %>
<%= order.order_type %> <%= order.customer.name rescue '-' %> <%= order.status %> <%= order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> <%= order.date.strftime("%d-%m-%Y %I:%M %p") %> <%= order.item_count %>
<%= @order.order_type %> <%= @order.customer.name rescue '-' %> <%= @order.status %> <%= @order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> <%= @order.date.strftime("%d-%m-%Y %I:%M %p") %>
<%= sale.grand_total rescue '-' %> <%= sale.cashier_name rescue '-' %> <%= sale.sale_status %> <%= sale.receipt_date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> <%= sale.receipt_date.strftime("%d-%m-%Y %I:%M %p") %>
<%=s.qty rescue ' '%> <%= number_format(s.unit_price, :precision => 2, :delimiter => ',') rescue ' '%> <%= number_format(s.price, :precision => 2, :delimiter => ',') rescue ' '%><%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %><%=l s.created_at , :format => :short rescue ' ' %> <%=s.remark rescue ' '%>
<%= shift_sale.employee.name%> <%=shift_sale.cashier_terminal.name%><%= shift_sale.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') %> + <%= shift_sale.shift_started_at.strftime('%d-%m-%Y %I:%M %p') %> <%= shift_sale.shift_closed_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') rescue '-' %> + <%= shift_sale.shift_closed_at.strftime('%d-%m-%Y %I:%M %p') rescue '-' %> <%=shift_sale.opening_balance %> <%=shift_sale.closing_balance %>
<%= @shift.employee.name%> <%=@shift.cashier_terminal.name%><%= @shift.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') %> + <%= @shift.shift_started_at.strftime('%d-%m-%Y %I:%M %p') %> <%=@shift.opening_balance %> <%=@shift.closing_balance %>