X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/6f0407b6532f52cb0726b2b7fe0070e1709dd5dc..5bd4880f2c15cc97cfde3b8714c5ad900f1f5f1b:/lib/nos_oignons.rb diff --git a/lib/nos_oignons.rb b/lib/nos_oignons.rb index 74a34c1..ef1ac5e 100644 --- a/lib/nos_oignons.rb +++ b/lib/nos_oignons.rb @@ -27,16 +27,16 @@ module NosOignons ADVISORS_EMAIL = 'deontologie@nos-oignons.net' MEMBER_MAILING_LIST = 'ag' CONTACT_INFO = <<-EOT.gsub(/^ /, '') + Identifiant SIREN 842 479 313 https://nos-oignons.net/ contact@nos-oignons.net Téléphone : +33 9 72 42 96 04 - Fax : +33 9 72 42 96 06 EOT POSTAL_ADDRESS = <<-EOT.gsub(/^ /, '') Nos oignons Centre UBIDOCA, 7585 - 105 route des Pommiers - 74370 Saint Martin Bellevue + 78 allée Primavera + 74370 Annecy France EOT @@ -69,9 +69,10 @@ module NosOignons def send_membership_reminders! today = Time.now.to_date + reminders = NosOignons::Reminder.all.sort_by(&:days) NosOignons::Member.all.select(&:up_to_date?).each do |member| - reminders = NosOignons::Reminder.all.sort_by(&:days) - anniversary = Time.new(today.year, member.joined_on.month, + next if member.membership_fee_paid_on.year == (today + reminders.last.days).year + anniversary = Time.new(today.next_month.year, member.joined_on.month, member.joined_on.day).to_date next if member.membership_fee_paid_on >= anniversary - reminders.last.days reminders.each do |reminder|