update customer validation messages
This commit is contained in:
@@ -666,7 +666,13 @@ end
|
||||
.joins("INNER JOIN shift_sales sh ON sh.id = sales.shift_sale_id")
|
||||
.where("sales.sale_status = 'void' and (sh.shift_started_at between ? and ?
|
||||
OR sh.shift_closed_at between ? and ? )", from ,to, from, to)
|
||||
|
||||
|
||||
if shift.present?
|
||||
query = query.where("sales.sale_status = 'void' and s.shift_sale_id in (?)",shift.to_a)
|
||||
else
|
||||
query = query.where("payment_method='creditnote' and s.sale_status = 'completed' and s.receipt_date between ? and ? ",from,to)
|
||||
end
|
||||
|
||||
out = {:items => account}
|
||||
sale_arr.push(out)
|
||||
return sale_arr
|
||||
|
||||
Reference in New Issue
Block a user