Module: RailsTrade::PromoteCharge::CashPromoteCharge

Included in:
CashPromoteCharge
Defined in:
app/models/rails_trade/promote_charge/cash_promote_charge.rb

Overview

抵扣券,如果抵扣券金额大于总额,则为0

Instance Method Summary collapse

Instance Method Details

#final_price(amount) ⇒ Object



4
5
6
7
8
9
10
# File 'app/models/rails_trade/promote_charge/cash_promote_charge.rb', line 4

def final_price(amount)
  if parameter.abs >= amount
    - amount
  else
    - parameter.abs
  end
end