jipe_app/app/models/recurrent_date.rb
2017-08-14 10:53:30 +02:00

10 lines
294 B
Ruby

class RecurrentDate < ActiveRecord::Base
def recurrent_payments
RecurrentPayment.where(:active => true).where("ogone_alias is not null").where("start_at <= ? and ogone_cb_expiration >= ?", self.estimate_date, self.estimate_date.prev_month)
end
has_many :donator_transactions
end