Sha256: ec85680434b1038b271f69ac1d72c542444b9bbb0cfab985bf7361a486b4b83a

Contents?: true

Size: 797 Bytes

Versions: 4

Compression:

Stored size: 797 Bytes

Contents

# frozen_string_literal: true

require_relative 'account'
require_relative 'bill_line'
require_relative 'currency'
require_relative 'department'
require_relative 'vendor'

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      class Bill < QuickBooksOnline::Resource
        attribute :PrivateNote, type: Type::String
        attribute :TxnDate, type: Type::Date
        attribute :DueDate, type: Type::Date
        attribute :DocNumber, type: Type::String

        references_one :Vendor, to: Vendor
        references_one :APAccount, to: Account
        references_one :Department, to: Department
        references_one :Currency, to: Currency

        references_many :Line, to: BillLine

        def name
          "Bill: #{self.TxnDate}"
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ledger_sync-1.6.0 lib/ledger_sync/ledgers/quickbooks_online/resources/bill.rb
ledger_sync-1.5.2 lib/ledger_sync/ledgers/quickbooks_online/resources/bill.rb
ledger_sync-1.5.1 lib/ledger_sync/ledgers/quickbooks_online/resources/bill.rb
ledger_sync-1.5.0 lib/ledger_sync/ledgers/quickbooks_online/resources/bill.rb