Class: Spree::ReturnAuthorization
Overview
Models the return of Inventory Units to a Stock Location for an Order.
Instance Method Summary
collapse
money_methods
Methods inherited from Base
display_includes
#generate_permalink, #save_permalink
Instance Method Details
#amount ⇒ Object
38
39
40
|
# File 'app/models/spree/return_authorization.rb', line 38
def amount
return_items.sum(:amount)
end
|
#can_cancel_return_items? ⇒ Boolean
54
55
56
|
# File 'app/models/spree/return_authorization.rb', line 54
def can_cancel_return_items?
return_items.any?(&:can_cancel?) || return_items.blank?
end
|
#currency ⇒ Object
42
43
44
|
# File 'app/models/spree/return_authorization.rb', line 42
def currency
order.currency
end
|
#customer_returned_items? ⇒ Boolean
50
51
52
|
# File 'app/models/spree/return_authorization.rb', line 50
def customer_returned_items?
customer_returns.exists?
end
|
#refundable_amount ⇒ Object
46
47
48
|
# File 'app/models/spree/return_authorization.rb', line 46
def refundable_amount
order.item_total_before_tax + order.promo_total
end
|
#total_excluding_vat ⇒ Object
34
35
36
|
# File 'app/models/spree/return_authorization.rb', line 34
def total_excluding_vat
return_items.sum(&:total_excluding_vat)
end
|