updated for receipt rpt for shift

This commit is contained in:
Yan
2017-07-08 18:20:42 +06:30
parent 9158f0e93a
commit 94555bc325
3 changed files with 19 additions and 12 deletions

View File

@@ -583,7 +583,7 @@ def self.get_by_shift_sale(from,to,status)
" 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 between ? and ?" + " or shift_sales.shift_closed_at between ? and ?",from,to ,from,to )
return query = query.where("shift_sales.shift_started_at >= ?" + " AND shift_sales.shift_closed_at <= ?", from,to)
end
def self.get_separate_tax(from,to,payment_type=nil)