change consolidate receipt rake file
This commit is contained in:
@@ -2951,7 +2951,7 @@ end
|
||||
.joins("left join surveys on surveys.receipt_no = sales.receipt_no")
|
||||
|
||||
query = query.where("sales.sale_status != 'new' && sale_payments.payment_amount > 0")
|
||||
query = query.where("sales.created_at between ? and ?", '2017-11-01 00:00:00 +0630','2018-02-05 13:59:59 +0630')
|
||||
query = query.where("sales.created_at between ? and ?", '2017-11-01 00:00:00 +0630','2018-11-16 13:59:59 +0630')
|
||||
.group("sales.sale_id")
|
||||
return query
|
||||
end
|
||||
@@ -2963,7 +2963,7 @@ def self.all_receipt_details
|
||||
.joins("join sales on sales.sale_id = sale_items.sale_id")
|
||||
.group("sale_items.sale_item_id")
|
||||
query = query.where("sale_items.qty > 0 and sales.sale_status !='new'")
|
||||
query = query.where("sale_items.created_at between ? and ?", '2017-11-01 00:00:00 +0630','2018-02-05 13:59:59 +0630')
|
||||
query = query.where("sale_items.created_at between ? and ?", '2017-11-01 00:00:00 +0630','2018-11-16 13:59:59 +0630')
|
||||
return query
|
||||
end
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace :consolidate do
|
||||
if sale.qty > 0
|
||||
|
||||
if sale.item_instance_code !=nil
|
||||
byebug
|
||||
# byebug
|
||||
menu_category = MenuCategory.find(MenuItem.find_by_item_code(sale.product_code).menu_category_id)
|
||||
name = menu_category.name
|
||||
code = menu_category.code
|
||||
|
||||
Reference in New Issue
Block a user