Pull from master

This commit is contained in:
San Wai Lwin
2018-04-05 11:49:42 +06:30
parent 9bf4047548
commit fc8b2d3b73
14 changed files with 222 additions and 54 deletions

View File

@@ -806,6 +806,15 @@ def self.get_by_shift_sale(from,to,status)
return query = query.where("shift_sales.shift_started_at >= ?" + " AND shift_sales.shift_closed_at <= ?", from,to)
end
def self.get_by_shift_sale_by_item(from,to,status)
query = ShiftSale.select("shift_sales.id ,shift_started_at AS opening_date,
shift_closed_at As closing_date," +
" grand_total AS grand_total, cash_sales AS cash," +
"total_taxes AS total_tax,total_discounts As total_discount")
.order("shift_sales.id DESC")
return query = query.where("shift_sales.shift_started_at >= ?" , from)
end
def self.get_item_query(type)
if type == "revenue" || type.nil?