app/views/educode_sales/sales/index.json.jbuilder in educode_sales-0.2.0 vs app/views/educode_sales/sales/index.json.jbuilder in educode_sales-0.2.1
- old
+ new
@@ -5,10 +5,10 @@
json.role d.role&.name
json.area d.areas.present? ? d.areas.pluck(:name).join("、") : ''
json.business_a d.businesses.joins("JOIN educode_sales_follow_ups on educode_sales_follow_ups.id = educode_sales_businesses.last_follow_up_id").where("educode_sales_follow_ups.clazz_id = ?", @a_clazz&.id).count
json.business_b d.businesses.joins("JOIN educode_sales_follow_ups on educode_sales_follow_ups.id = educode_sales_businesses.last_follow_up_id").where("educode_sales_follow_ups.clazz_id = ?", @b_clazz&.id).count
json.goal d.businesses.joins("JOIN educode_sales_follow_ups on educode_sales_follow_ups.id = educode_sales_businesses.last_follow_up_id").where("educode_sales_follow_ups.stage_id in (?)", @step_ids).sum(:total_amount)
- json.return_money d.businesses.joins("JOIN educode_sales_follow_ups on educode_sales_follow_ups.id = educode_sales_businesses.last_follow_up_id").sum("educode_sales_follow_ups.return_money")
+ json.return_money d.businesses.joins("JOIN educode_sales_follow_ups on educode_sales_follow_ups.id = educode_sales_businesses.last_follow_up_id").sum("educode_sales_businesses.return_money")
json.a_clazz_id @a_clazz&.id
json.b_clazz_id @b_clazz&.id
end
end
\ No newline at end of file