1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-05 16:24:21 +01:00
fab-manager/app/views/api/accounting_periods/index.json.jbuilder
2019-04-04 12:55:21 +02:00

11 lines
413 B
Ruby

# frozen_string_literal: true
json.array!(@accounting_periods) do |ap|
json.extract! ap, :id, :start_at, :end_at, :closed_at, :closed_by, :footprint, :created_at
json.period_total ap.period_total / 100.0
json.perpetual_total ap.perpetual_total / 100.0
json.chained_footprint ap.check_footprint
json.user_name "#{ap.first_name} #{ap.last_name}"
json.archive_ready FileTest.exist?(ap.archive_file)
end