Fix list unit and supplier main board acceptance specs
This commit is contained in:
+5
-5
@@ -205,10 +205,10 @@ class List
|
||||
self.section_id = to_table.section_id
|
||||
if save
|
||||
# Update the section of an order
|
||||
#orders.each do |order|
|
||||
#order.section_id = self.section_id
|
||||
#order.save
|
||||
#end
|
||||
orders.each do |order|
|
||||
order.section_id = self.section_id
|
||||
order.save
|
||||
end
|
||||
# user performs a client side refresh
|
||||
broadcast_users 'list_changed_table', list_id: id #, from_table_id: from_table, to_table_id: to_table.id
|
||||
broadcast_supplier supplier_id, 'list_changed_table', list: as_json, section_title: to_table.section.try(:title), from_table_id: from_table
|
||||
@@ -288,7 +288,7 @@ class List
|
||||
state == 'active'
|
||||
end
|
||||
|
||||
def place_order(products, user: nil, employee: nil)
|
||||
def place_order(products: {}, user: nil, employee: nil)
|
||||
return false unless products.any?
|
||||
order = Order.create list: self, supplier: supplier, user: user, employee: employee, section_id: section_id, table_id: table_id
|
||||
return unless order.id
|
||||
|
||||
Reference in New Issue
Block a user