check required for oqs and cashier terminal
This commit is contained in:
@@ -3,4 +3,7 @@ class CashierTerminal < ApplicationRecord
|
|||||||
has_many :zones, through: :cashier_terminal_by_zones
|
has_many :zones, through: :cashier_terminal_by_zones
|
||||||
|
|
||||||
scope :available, -> {where(is_currently_login: false)}
|
scope :available, -> {where(is_currently_login: false)}
|
||||||
|
|
||||||
|
# validations
|
||||||
|
validates_presence_of :name, :printer_name
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
|
|
||||||
scope :active, -> {where(is_active: true)}
|
scope :active, -> {where(is_active: true)}
|
||||||
|
|
||||||
|
# validations
|
||||||
|
validates_presence_of :station_name, :printer_name
|
||||||
|
|
||||||
def process_order (order, table_id)
|
def process_order (order, table_id)
|
||||||
oqs_stations = OrderQueueStation.active
|
oqs_stations = OrderQueueStation.active
|
||||||
dining=DiningFacility.find(table_id)
|
dining=DiningFacility.find(table_id)
|
||||||
|
|||||||
@@ -858,7 +858,6 @@ end
|
|||||||
def self.hourly_sales(today)
|
def self.hourly_sales(today)
|
||||||
query= Sale.select("grand_total")
|
query= Sale.select("grand_total")
|
||||||
.where('payment_status="paid" and sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today)
|
.where('payment_status="paid" and sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today)
|
||||||
.group("date_format(receipt_date, '%I %p')")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.employee_sales(today)
|
def self.employee_sales(today)
|
||||||
|
|||||||
Reference in New Issue
Block a user