app/models/educode_sales/business.rb in educode_sales-0.9.31 vs app/models/educode_sales/business.rb in educode_sales-0.9.32

- old
+ new

@@ -7,15 +7,15 @@ belongs_to :department belongs_to :last_follow_up, class_name: 'FollowUp', optional: true # 允许last_follow_up_id字段中的数为nil has_many :sale_plans has_many :follow_ups + has_many :business_clazz_changes #关联关注 has_many :users,:class_name => 'EducodeSales::BusinessRelationShip',foreign_key: 'business_id',:dependent => :destroy - #每次查询时 默认的查询条件 default_scope -> {where(deleted_at: nil)} def soft_destroy(user_id) self.update(deleted_at: Time.now) @@ -41,6 +41,7 @@ '已签单' => ['已签单','已验收','回款中', '服务中','已结束'], '应收款' => ['已中标','已签单','已验收','回款中', '服务中','已结束'] }[type] end end + end