Sha256: 7f7068c2dcec891e6f1f2b4b60e6652900182e58d5d99374501905edc3f0ab38
Contents?: true
Size: 627 Bytes
Versions: 15
Compression:
Stored size: 627 Bytes
Contents
# frozen_string_literal: true module SolidusBactracs module Shipment class ExportableQuery def self.apply(scope) scope = scope .order(:updated_at) .joins(:order) .merge(::Spree::Order.complete) unless SolidusBactracs.configuration.capture_at_notification scope = scope.where(spree_shipments: { state: ['ready', 'canceled'] }) end unless SolidusBactracs.configuration.export_canceled_shipments scope = scope.where.not(spree_shipments: { state: 'canceled' }) end scope end end end end
Version data entries
15 entries across 15 versions & 1 rubygems