Sha256: 163ad8c52dc7509dc6dabba19ddf3b1a5607daa5d324ed951d60af87481a4df0

Contents?: true

Size: 1021 Bytes

Versions: 2

Compression:

Stored size: 1021 Bytes

Contents

module Xeroizer
  module Record
    
    class ManualJournalModel < BaseModel
        
      set_permissions :read, :write, :update
                  
    end
    
    class ManualJournal < Base
      
      JOURNAL_STATUS = {
        'DRAFT' =>      'Draft',
        'POSTED' =>     'Posted'
      } unless defined?(INVOICE_TYPE)
      JOURNAL_STATUSES = JOURNAL_STATUS.keys.sort
            
      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
      boolean   :show_on_cash_basis_reports
      datetime  :updated_date_utc, :api_name => 'UpdatedDateUTC'
      
      has_many  :journal_lines, :model_name => 'ManualJournalLine'
      
      validates_presence_of :narration
      validates_associated :journal_lines
            
      public
      
    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xeroizer-0.5.2 lib/xeroizer/models/manual_journal.rb
xeroizer-0.5.1 lib/xeroizer/models/manual_journal.rb