mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
parent
885f28e34e
commit
fd1f475925
2 changed files with 48 additions and 54 deletions
|
@ -52,24 +52,16 @@ module Billing
|
|||
"#{operation_category} #{zone_name}"
|
||||
end
|
||||
|
||||
def years_amount
|
||||
duration.to_i
|
||||
end
|
||||
|
||||
def price_decimal
|
||||
price_cents / BigDecimal.new('100')
|
||||
end
|
||||
|
||||
def zone_name
|
||||
zone.origin
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def to_partial_path
|
||||
'price'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def init_values
|
||||
return unless new_record?
|
||||
self.valid_from = Time.zone.now.beginning_of_year unless valid_from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue