Scan of occupied table, make mustache and do something with assets path for local android spinner

User event order added for multiple users
This commit is contained in:
2012-12-07 16:10:51 +01:00
parent 578f6ad696
commit 26877732b9
7 changed files with 37 additions and 17 deletions
+5
View File
@@ -236,6 +236,11 @@ class List
product = loaded_products.find{|p| p.id == product_id} # to get the price
ProductOrder.create order: order, product_id: product_id, amount: number, price: product.price if number > 0
end
set_price
save
for user_id in user_ids
broadcast_user user_id, 'new_order', order: order.with_products_as_json, total_amount: price
end
broadcast_supplier supplier.id, 'new_order', order.with_products_as_json
broadcast_supplier supplier.id, 'list_update', with_info_as_json
order