Class: Tran
- Inherits:
-
SqliteBase
- Object
- ActiveRecord::Base
- SqliteBase
- Tran
- Defined in:
- lib/models/tran.rb
Class Method Summary collapse
-
.month_transactions(date) ⇒ Object
def self.month_transactions(date) month = Vfwcash.yyyymm(date) trans = Tran.where(‘transactions.post_date BETWEEN ? and ?’,month+“00”,month+“32”).order(:post_date,:num) end.
Class Method Details
.month_transactions(date) ⇒ Object
20 21 22 23 24 |
# File 'lib/models/tran.rb', line 20 def self.month_transactions(date) bom = date.beginning_of_month.to_datetime.beginning_of_day.to_s(:db) eom = date.end_of_month.to_s(:db).to_datetime.end_of_day.to_s(:db) trans = Tran.where(post_date: bom..eom ).order(:post_date,:num) end |