This commit is contained in:
Nweni
2017-06-04 10:12:33 +06:30
parent 47469cf466
commit e3e41bd64e
5 changed files with 17 additions and 8 deletions

View File

@@ -37,6 +37,7 @@ class OrderItem < ApplicationRecord
def self.get_order_items_details(order_id)
order_details = OrderItem.select("order_items.item_name,order_items.qty,order_items.price,(order_items.qty*order_items.price) as total_price")
.joins("left join orders on orders.id = order_items.order_id")
.where("order_items.order_id=?",order_id)
.where("order_items.order_id=?",order_id)
end
end