Sha256: b04e3d5ea8428b131b82dec520028ac0cf7be81cc5c71db24d1b546db7def53b

Contents?: true

Size: 462 Bytes

Versions: 27

Compression:

Stored size: 462 Bytes

Contents

# frozen_string_literal: true

module Spree
  class ReimbursementType::Credit < Spree::ReimbursementType
    extend Spree::ReimbursementType::ReimbursementHelpers

    class << self
      def reimburse(reimbursement, return_items, simulate)
        unpaid_amount = return_items.sum(&:total).round(2, :down)
        reimbursement_list, _unpaid_amount = create_credits(reimbursement, unpaid_amount, simulate)
        reimbursement_list
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
solidus_core-2.6.6 app/models/spree/reimbursement_type/credit.rb
solidus_core-2.7.4 app/models/spree/reimbursement_type/credit.rb
solidus_core-2.7.3 app/models/spree/reimbursement_type/credit.rb
solidus_core-2.6.5 app/models/spree/reimbursement_type/credit.rb
solidus_core-2.7.2 app/models/spree/reimbursement_type/credit.rb
solidus_core-2.6.4 app/models/spree/reimbursement_type/credit.rb
solidus_core-2.6.3 app/models/spree/reimbursement_type/credit.rb
solidus_core-2.7.1 app/models/spree/reimbursement_type/credit.rb
solidus_core-2.6.2 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.14 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.13 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.12 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.11 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.10 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.9 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.8 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.7 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.6 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.5 app/models/spree/reimbursement_type/credit.rb
solidus_core_devise_token_auth-2.8.0.alpha.4 app/models/spree/reimbursement_type/credit.rb