<commit_before>namespace :email do
  desc 'Send an email notifying the deadline of an expense'
  task notifications: :environment do
    User.find_each do |user|
      user_accounts = user.accounts.where(reminder_active: true, owner: user.id)

      user_accounts.each do |account|
        days_before = account.reminder_days_before
        date_to_compare = Date.today - days_before

        user_entries = account.entries.where(paid: false, date: date_to_compare, entries_type: :expense)<commit_msg>Fix date to search on entries notification<commit_after>namespace :email do
  desc 'Send an email notifying the deadline of an expense'
  task notifications: :environment do
    User.find_each do |user|
      user_accounts = user.accounts.where(reminder_active: true, owner: user.id)

      user_accounts.each do |account|
        days_before = account.reminder_days_before
        date_to_compare = Date.today + days_before

        user_entries = account.entries.where(paid: false, date: date_to_compare, entries_type: :expense)
{'fraction_non_alphanumeric': 0.07565470417070805, 'fraction_numerical': 0.0, 'mean_word_length': 4.009708737864078, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6182044', 'n_tokens_mistral': 307, 'n_tokens_neox': 301, 'n_words': 85}