Skip to content

Commit

Permalink
Added todo
Browse files Browse the repository at this point in the history
  • Loading branch information
piotaixr committed Mar 5, 2019
1 parent 825b8a1 commit 163976e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/fixed_asset.rb
Expand Up @@ -149,6 +149,7 @@ class FixedAsset < Ekylibre::Record::Base
self.depreciation_percentage = 20 if depreciation_percentage.blank? || depreciation_percentage <= 0
months = 12 * (100.0 / depreciation_percentage.to_f)
if self.started_on
# TODO: use proper duration operations here
self.stopped_on = started_on >> months.floor
self.stopped_on += (months - months.floor) * 30.0 - 1
end
Expand Down

0 comments on commit 163976e

Please sign in to comment.