suite
This commit is contained in:
parent
a7744aa439
commit
fcedb9ceaf
@ -18,9 +18,9 @@ class Societe < ApplicationRecord
|
|||||||
VContact.update_all(:last_volume_at => nil, :enabled => false, :prime => nil, :ac_rate => nil, :cagnotte => nil, :cumul => nil, :prime => nil)
|
VContact.update_all(:last_volume_at => nil, :enabled => false, :prime => nil, :ac_rate => nil, :cagnotte => nil, :cumul => nil, :prime => nil)
|
||||||
VContact.where(:codeproprietaire => self.valid_codes).update_all(:enabled => true)
|
VContact.where(:codeproprietaire => self.valid_codes).update_all(:enabled => true)
|
||||||
puts "Purge contact"
|
puts "Purge contact"
|
||||||
ActiveRecord::Base.connection.execute("DELETE FROM v_contacts WHERE enabled = 0;")
|
#ActiveRecord::Base.connection.execute("DELETE FROM v_contacts WHERE enabled = 0;")
|
||||||
puts "Purge Volume periodique"
|
puts "Purge Volume periodique"
|
||||||
VolumePeriodique.where("codemanaginn not in(?)", VContact.select(:codemanaginn).group(:codemanaginn).map {|c| c.codemanaginn}).delete_all
|
#VolumePeriodique.where("codemanaginn not in(?)", VContact.select(:codemanaginn).group(:codemanaginn).map {|c| c.codemanaginn}).delete_all
|
||||||
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user