Skip to content

Commit

Permalink
Support new api by inheriting from Tabular::Row (hitobito/hitobito#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
amaierhofer committed Nov 20, 2024
1 parent 45747c3 commit 52bd097
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/domain/export/pdf/cost_accounting/row.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#

module Export::Pdf
class CostAccounting::Row
class CostAccounting::Row < Export::Tabular::Row
class_attribute :dynamic_attributes
self.dynamic_attributes = {}

Expand All @@ -33,7 +33,7 @@ def value_for(attr)
end

def currency_format(number)
format("%.2f", number.to_f).to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1'")
Kernel.format("%.2f", number.to_f).to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1'")
end

def report
Expand Down

0 comments on commit 52bd097

Please sign in to comment.