diff --git a/app/models/bling_order_item.rb b/app/models/bling_order_item.rb index b074728d..a40dbac6 100644 --- a/app/models/bling_order_item.rb +++ b/app/models/bling_order_item.rb @@ -63,6 +63,7 @@ class BlingOrderItem < ApplicationRecord '204061683' => 'Mercado Livre', '204796870' => 'Nuvem Shop', '204824954' => 'Feira da Madrugada', + '205002864' => 'Magazine Luiza', '0' => 'Sem Loja' }.freeze @@ -138,6 +139,10 @@ class Status where(store_id: '204796870') } + scope :magazine_luiza, lambda { + where(store_id: '205002864') + } + scope :date_range, ->(start_date, end_date) { start_date = start_date.to_date.beginning_of_day if start_date.present? end_date = end_date.to_date.end_of_day if end_date.present?