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