Sha256: 84c4e29d0b2048cd9957835cdc7435c7667ceb8b626960adb1522769df5429c8

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

total_amount = 0
json.data do
  json.array! @money_plans do |d|
    json.id d.id
    json.created_at d.created_at.to_s(:date)
    json.amount d.amount
    total_amount += d.amount
    json.clazz d.clazz
    json.business d.follow_up.business.name
    json.school School.find(d.follow_up.business.school_id).name
    json.school_id School.find(d.follow_up.business.school_id).id
    json.staff d.staff.user.real_name
  end
end

json.totalRow do
  json.amount total_amount.round(2).to_s + '/' + @total_amount.round(2).to_s
end
json.code 0
json.count @money_plans.total_count

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
educode_sales-0.6.4 app/views/educode_sales/money_plans/index.json.jbuilder