Sha256: 5bca259d6c5f8c6304b2fd823d99d0e6dd8f12a62ffa4090a24fe86d31db550a

Contents?: true

Size: 1.27 KB

Versions: 4

Compression:

Stored size: 1.27 KB

Contents

require "xeroizer/models/attachment"

module Xeroizer
  module Record
    
    class ManualJournalModel < BaseModel
        
      set_permissions :read, :write, :update

      include AttachmentModel::Extensions
                  
    end
    
    class ManualJournal < Base
      
      JOURNAL_STATUS = {
        'DRAFT' =>      'Draft',
        'POSTED' =>     'Posted'
      } unless defined?(JOURNAL_STATUS)
      JOURNAL_STATUSES = JOURNAL_STATUS.keys.sort

      include Attachment::Extensions
            
      set_primary_key :manual_journal_id
      set_possible_primary_keys :manual_journal_id
      list_contains_summary_only true
      
      guid          :manual_journal_id
      date          :date
      string        :status
      string        :line_amount_types
      string        :narration
      string        :url
      string        :external_link_provider_name # only seems to be read-only at the moment
      boolean       :show_on_cash_basis_reports
      datetime_utc  :updated_date_utc, :api_name => 'UpdatedDateUTC'
      
      has_many      :journal_lines, :model_name => 'ManualJournalLine', :complete_on_page => true
      
      validates_presence_of :narration
      validates_associated :journal_lines
            
      public
      
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
xeroizer-2.20.0 lib/xeroizer/models/manual_journal.rb
xeroizer-2.19.0 lib/xeroizer/models/manual_journal.rb
xeroizer-2.18.1 lib/xeroizer/models/manual_journal.rb
xeroizer-2.17.1 lib/xeroizer/models/manual_journal.rb