lib/ledger_sync/resources/expense.rb in ledger_sync-1.3.2 vs lib/ledger_sync/resources/expense.rb in ledger_sync-1.3.3
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
require_relative 'account'
require_relative 'currency'
require_relative 'customer'
+require_relative 'department'
require_relative 'expense_line_item'
require_relative 'vendor'
module LedgerSync
class Expense < LedgerSync::Resource
@@ -14,9 +15,10 @@
attribute :exchange_rate, type: Type::Float
attribute :reference_number, type: Type::String
references_one :entity, to: [Customer, Vendor]
references_one :account, to: Account
+ references_one :department, to: Department
references_one :currency, to: Currency
references_many :line_items, to: ExpenseLineItem
def amount