app/models/educode_sales/business.rb in educode_sales-1.10.59 vs app/models/educode_sales/business.rb in educode_sales-1.10.70
- old
+ new
@@ -80,14 +80,14 @@
# 创建商机交付课程数据
def change_diliver
- # if previous_changes["last_follow_up_id"].present?
- # last_clazz_id = previous_changes["last_follow_up_id"][-1]
- # common_type = FollowUp.find_by(id: last_clazz_id)&.stage&.name == "已中标"
- # BusinessDeliverSubject.find_or_create_by(business_id: self.id) if common_type
- # end
+ if previous_changes["last_follow_up_id"].present?
+ last_clazz_id = previous_changes["last_follow_up_id"][-1]
+ common_type = FollowUp.find_by(id: last_clazz_id)&.stage&.name == "已中标"
+ BusinessDeliverSubject.find_or_create_by(business_id: self.id) if common_type
+ end
end
def school_name
department&.school&.name || "--"
end