Sha256: 2bb3f4bc89537e0c8469c1afb1b5a604c07d3bb8fea54a318c0a05d7660ee155
Contents?: true
Size: 641 Bytes
Versions: 39
Compression:
Stored size: 641 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, created_by: nil) unless created_by Spree::Deprecation.warn("Calling #reimburse on #{self} without created_by is deprecated") end unpaid_amount = return_items.sum(&:total).round(2, :down) reimbursement_list, _unpaid_amount = create_credits(reimbursement, unpaid_amount, simulate, created_by: created_by) reimbursement_list end end end end
Version data entries
39 entries across 39 versions & 1 rubygems