Sha256: 4431bd21f40b33d6406d2b23602d6d7ab54984fcd7c0e9e88ac81ad3a4d29602

Contents?: true

Size: 510 Bytes

Versions: 3

Compression:

Stored size: 510 Bytes

Contents

json.data do
  json.array! @sale_plans do |d|
    json.id d.id
    json.staff d.staff.user.real_name
    json.clazz EducodeSales::SalePlan::CLAZZ_NAME.invert[d.clazz]
    json.year d.year
    json.target_money d['annual'] || 0
    json.plan_money  d['budget_amounts']&.round(2) || 0
    json.minimum_money d['annual'].present? ?  (d['annual'].to_f * 0.8).round(2) : 0
    json.finish_money 0
    json.finish_rate 0
    json.updated_at d.updated_at.to_s
  end
end

json.code 0
json.count @sale_plans.total_count

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
educode_sales-0.9.70 app/views/educode_sales/plans/years_plan.json.jbuilder
educode_sales-0.9.69 app/views/educode_sales/plans/years_plan.json.jbuilder
educode_sales-0.9.68 app/views/educode_sales/plans/years_plan.json.jbuilder