Sha256: 05d595614d2ef5c93130de599a0d53d9e15e2950ea08f576bd06a8d628ae3fee
Contents?: true
Size: 618 Bytes
Versions: 1
Compression:
Stored size: 618 Bytes
Contents
module ActsAsAccount class Posting < ActiveRecord::Base self.table_name = :acts_as_account_postings belongs_to :account, :class_name => 'ActsAsAccount::Account' belongs_to :other_account, :class_name => 'ActsAsAccount::Account' belongs_to :journal, :class_name => 'ActsAsAccount::Journal' belongs_to :reference, :polymorphic => true scope :soll, -> { where('amount >= 0') } scope :haben, -> { where('amount < 0') } scope :start_date, -> date { where ['DATE(valuta) >= ?', date] } scope :end_date, -> date { where ['DATE(valuta) <= ?', date] } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_account-3.1.0 | lib/acts_as_account/posting.rb |