Sha256: f6b567b6880ef8048bde0e833027f59e4ee24247a2455f7e391d491b883d6074

Contents?: true

Size: 1.26 KB

Versions: 15

Compression:

Stored size: 1.26 KB

Contents

module NetSuite
  module Records
    class JournalEntry
      include Support::Fields
      include Support::RecordRefs
      include Support::Records
      include Support::Actions
      include Namespaces::TranGeneral

      actions :get, :add, :delete

      fields :approved, :created_date, :exchange_rate, :last_modified_date, :reversal_date, :reversal_defer, :reversal_entry,
        :tran_date, :tran_id

      field :custom_field_list, CustomFieldList
      field :line_list,         JournalEntryLineList

      record_refs :created_from, :currency, :custom_form, :department, :klass, :location, :parent_expense_alloc,
        :posting_period, :subsidiary, :to_subsidiary

      attr_reader   :internal_id
      attr_accessor :external_id

        def initialize(attributes = {})
          @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
          @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
          initialize_from_attributes_hash(attributes)
        end

      def to_record
        rec = super
        if rec["#{record_namespace}:customFieldList"]
          rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
        end
        rec
      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
netsuite-0.2.6 lib/netsuite/records/journal_entry.rb
netsuite-0.2.5 lib/netsuite/records/journal_entry.rb
netsuite-0.2.4 lib/netsuite/records/journal_entry.rb
netsuite-0.2.3 lib/netsuite/records/journal_entry.rb
netsuite-0.2.2 lib/netsuite/records/journal_entry.rb
netsuite-0.2.1 lib/netsuite/records/journal_entry.rb
netsuite-0.2.0 lib/netsuite/records/journal_entry.rb
netsuite-0.1.0 lib/netsuite/records/journal_entry.rb
netsuite-0.0.50 lib/netsuite/records/journal_entry.rb
netsuite-0.0.49 lib/netsuite/records/journal_entry.rb
netsuite-0.0.48 lib/netsuite/records/journal_entry.rb
netsuite-0.0.47 lib/netsuite/records/journal_entry.rb
netsuite-0.0.45 lib/netsuite/records/journal_entry.rb
netsuite-0.0.44 lib/netsuite/records/journal_entry.rb
netsuite-0.0.43 lib/netsuite/records/journal_entry.rb