Sha256: 22ec28ce119a3b630a1d738bbc280f8e4b5f7b2a8a2719ed416e1538f13ee169

Contents?: true

Size: 320 Bytes

Versions: 9

Compression:

Stored size: 320 Bytes

Contents

Spree::Order.class_eval do
  def authorize_digital?
    return true if paid?
    if pay_with_po?
      payments.each do |payment|
        return true if payment.po? && payment.source.attachment_file_name
      end
      return false
    end
  end

  def pay_with_po?
    payments.collect(&:po?).include?(true)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree_purchase_order-3.2.0.beta app/models/spree/order_decorator.rb
spree_purchase_order-3.1.0.beta app/models/spree/order_decorator.rb
spree_purchase_order-3.0.0.beta app/models/spree/order_decorator.rb
spree_purchase_order-2.4.0.beta app/models/spree/order_decorator.rb
spree_purchase_order-2.3.0.beta app/models/spree/order_decorator.rb
spree_purchase_order-2.2.0.beta2 app/models/spree/order_decorator.rb
spree_purchase_order-2.2.0.beta app/models/spree/order_decorator.rb
spree_purchase_order-2.1.0.beta app/models/spree/order_decorator.rb
spree_purchase_order-2.0.1 app/models/spree/order_decorator.rb