diff --git a/app/models/sale.rb b/app/models/sale.rb index 6b02e4c8..f79d8642 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -15,7 +15,7 @@ class Sale < ApplicationRecord has_many :bookings scope :open_invoices, -> { where("sale_status = 'new' and receipt_date BETWEEN '#{DateTime.now.utc.end_of_day}' AND '#{DateTime.now.utc.beginning_of_day}'") } - scope :complete_sale, -> { where("sale_status = 'completed' and receipt_date BETWEEN '#{DateTime.now.utc.end_of_day}' AND '#{DateTime.now.utc.beginning_of_day}'") } + scope :complete_sale, -> { where("sale_status = 'completed' and receipt_date BETWEEN '#{DateTime.now.utc.beginning_of_day}' AND '#{DateTime.now.utc.end_of_day}'") } REPORT_TYPE = { "daily" => 0, diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 364b0f91..7bc62af7 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -338,6 +338,7 @@ $('#pay').on('click',function() { window.location.href = '/origami/sale/'+ sale_id + "/payment"; }); +// Bill Request $('#request_bills').click(function() { var order_id = $('#save_order_id').attr('data-order'); var ajax_url = "/origami/" + order_id + "/request_bills"; diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index c1797158..d3b78719 100644 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -98,7 +98,7 @@