ledger_sync 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -3
- data/lib/ledger_sync.rb +12 -6
- data/lib/ledger_sync/adaptors/ledger_serializer.rb +124 -0
- data/lib/ledger_sync/adaptors/ledger_serializer_attribute.rb +148 -0
- data/lib/ledger_sync/adaptors/ledger_serializer_attribute_set.rb +51 -0
- data/lib/ledger_sync/adaptors/ledger_serializer_type/mapping_type.rb +41 -0
- data/lib/ledger_sync/adaptors/ledger_serializer_type/references_many_type.rb +24 -0
- data/lib/ledger_sync/adaptors/ledger_serializer_type/value_type.rb +17 -0
- data/lib/ledger_sync/adaptors/operation.rb +15 -9
- data/lib/ledger_sync/adaptors/quickbooks_online/account/ledger_serializer.rb +21 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/create.rb +8 -36
- data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/find.rb +1 -13
- data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/update.rb +4 -35
- data/lib/ledger_sync/adaptors/quickbooks_online/account/searcher.rb +3 -44
- data/lib/ledger_sync/adaptors/quickbooks_online/adaptor.rb +75 -28
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/ledger_serializer.rb +40 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/create.rb +9 -48
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/find.rb +10 -21
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/update.rb +9 -52
- data/lib/ledger_sync/adaptors/quickbooks_online/bill_line_item/ledger_serializer.rb +27 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/ledger_serializer.rb +23 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/create.rb +2 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/find.rb +2 -14
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/update.rb +3 -30
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/ledger_serializer.rb +35 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/create.rb +2 -39
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/find.rb +2 -14
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/update.rb +4 -43
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit_line_item/ledger_serializer.rb +27 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/ledger_serializer.rb +48 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/create.rb +10 -51
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/find.rb +10 -22
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/update.rb +10 -55
- data/lib/ledger_sync/adaptors/quickbooks_online/expense_line_item/ledger_serializer.rb +27 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/ledger_serializer.rb +32 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/create.rb +4 -37
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/find.rb +4 -15
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/update.rb +5 -42
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry_line_item/ledger_serializer.rb +31 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer.rb +103 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/{account/mapping.rb → ledger_serializer_type/account_sub_type.rb} +128 -148
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/account_type.rb +51 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/amount_type.rb +23 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/classification_type.rb +23 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/date_type.rb +23 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/journal_entry_line_item_type.rb +20 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/payment_type.rb +21 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/operation.rb +2 -7
- data/lib/ledger_sync/adaptors/quickbooks_online/operation/create.rb +29 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/operation/find.rb +31 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/operation/full_update.rb +43 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/operation/sparse_update.rb +29 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/payment/ledger_serializer.rb +23 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/create.rb +1 -24
- data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/find.rb +1 -13
- data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/update.rb +2 -29
- data/lib/ledger_sync/adaptors/quickbooks_online/transfer/ledger_serializer.rb +33 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/create.rb +1 -29
- data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/find.rb +1 -13
- data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/update.rb +4 -35
- data/lib/ledger_sync/adaptors/quickbooks_online/util/adaptor_error_parser.rb +2 -1
- data/lib/ledger_sync/adaptors/quickbooks_online/util/operation_error_parser.rb +2 -1
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/ledger_serializer.rb +25 -0
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/create.rb +1 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/find.rb +1 -13
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/update.rb +2 -29
- data/lib/ledger_sync/adaptors/test/account/operations/create.rb +5 -1
- data/lib/ledger_sync/adaptors/test/account/operations/find.rb +5 -1
- data/lib/ledger_sync/adaptors/test/account/operations/invalid.rb +1 -0
- data/lib/ledger_sync/adaptors/test/account/operations/update.rb +8 -2
- data/lib/ledger_sync/adaptors/test/account/operations/valid.rb +1 -0
- data/lib/ledger_sync/adaptors/test/customer/operations/create.rb +5 -1
- data/lib/ledger_sync/adaptors/test/customer/operations/find.rb +5 -1
- data/lib/ledger_sync/adaptors/test/customer/operations/invalid.rb +1 -0
- data/lib/ledger_sync/adaptors/test/customer/operations/update.rb +1 -24
- data/lib/ledger_sync/adaptors/test/customer/operations/valid.rb +3 -6
- data/lib/ledger_sync/adaptors/test/expense/operations/create.rb +8 -3
- data/lib/ledger_sync/adaptors/test/expense/operations/find.rb +4 -14
- data/lib/ledger_sync/adaptors/test/expense/operations/update.rb +2 -32
- data/lib/ledger_sync/adaptors/test/ledger_serializer.rb +64 -0
- data/lib/ledger_sync/adaptors/test/operation/create.rb +27 -0
- data/lib/ledger_sync/adaptors/test/operation/find.rb +29 -0
- data/lib/ledger_sync/adaptors/test/operation/update.rb +34 -0
- data/lib/ledger_sync/adaptors/test/payment/operations/create.rb +5 -1
- data/lib/ledger_sync/adaptors/test/payment/operations/find.rb +5 -1
- data/lib/ledger_sync/adaptors/test/payment/operations/update.rb +1 -23
- data/lib/ledger_sync/adaptors/test/transfer/operations/create.rb +1 -22
- data/lib/ledger_sync/adaptors/test/transfer/operations/find.rb +1 -13
- data/lib/ledger_sync/adaptors/test/transfer/operations/update.rb +1 -25
- data/lib/ledger_sync/adaptors/test/vendor/operations/create.rb +5 -1
- data/lib/ledger_sync/adaptors/test/vendor/operations/find.rb +7 -1
- data/lib/ledger_sync/adaptors/test/vendor/operations/invalid.rb +1 -0
- data/lib/ledger_sync/adaptors/test/vendor/operations/update.rb +1 -23
- data/lib/ledger_sync/adaptors/test/vendor/operations/valid.rb +1 -0
- data/lib/ledger_sync/error/adaptor_errors.rb +17 -5
- data/lib/ledger_sync/error/operation_errors.rb +12 -5
- data/lib/ledger_sync/error/resource_errors.rb +5 -1
- data/lib/ledger_sync/resource.rb +33 -6
- data/lib/ledger_sync/resource_attribute.rb +4 -0
- data/lib/ledger_sync/resource_attribute/dirty_mixin.rb +16 -0
- data/lib/ledger_sync/resource_attribute/mixin.rb +19 -7
- data/lib/ledger_sync/resource_attribute/reference/many.rb +55 -1
- data/lib/ledger_sync/resource_attribute_set.rb +6 -7
- data/lib/ledger_sync/resources/account.rb +1 -1
- data/lib/ledger_sync/resources/bill.rb +1 -0
- data/lib/ledger_sync/resources/bill_line_item.rb +2 -0
- data/lib/ledger_sync/resources/expense.rb +5 -1
- data/lib/ledger_sync/resources/expense_line_item.rb +2 -0
- data/lib/ledger_sync/resources/journal_entry.rb +1 -0
- data/lib/ledger_sync/result.rb +4 -3
- data/lib/ledger_sync/type/id.rb +34 -0
- data/lib/ledger_sync/type/reference_many.rb +8 -2
- data/lib/ledger_sync/type/reference_one.rb +5 -0
- data/lib/ledger_sync/type/value_mixin.rb +12 -0
- data/lib/ledger_sync/util/hash_helpers.rb +16 -0
- data/lib/ledger_sync/version.rb +1 -1
- data/qa.rb +142 -0
- metadata +38 -5
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/mapping.rb +0 -15
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/mapping.rb +0 -14
- data/lib/ledger_sync/error/sync_errors.rb +0 -22
@@ -6,26 +6,15 @@ module LedgerSync
|
|
6
6
|
class Find < Operation::Find
|
7
7
|
class Contract < LedgerSync::Adaptors::Contract
|
8
8
|
schema do
|
9
|
-
required(:
|
9
|
+
required(:external_id).maybe(:string)
|
10
10
|
optional(:currency).maybe(:string)
|
11
|
+
required(:ledger_id).filled(:string)
|
12
|
+
optional(:line_items).array(Types::Reference)
|
11
13
|
optional(:memo).maybe(:string)
|
14
|
+
optional(:reference_number).filled(:string)
|
12
15
|
optional(:transaction_date).filled(:date?)
|
13
|
-
optional(:line_items).array(Types::Reference)
|
14
16
|
end
|
15
17
|
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def operate
|
20
|
-
return failure(nil) if resource.ledger_id.nil?
|
21
|
-
|
22
|
-
response = adaptor.find(
|
23
|
-
resource: 'journal_entry',
|
24
|
-
id: resource.ledger_id
|
25
|
-
)
|
26
|
-
|
27
|
-
success(response: response)
|
28
|
-
end
|
29
18
|
end
|
30
19
|
end
|
31
20
|
end
|
@@ -3,55 +3,18 @@ module LedgerSync
|
|
3
3
|
module QuickBooksOnline
|
4
4
|
module JournalEntry
|
5
5
|
module Operations
|
6
|
-
class Update < Operation::
|
6
|
+
class Update < Operation::FullUpdate
|
7
7
|
class Contract < LedgerSync::Adaptors::Contract
|
8
8
|
schema do
|
9
|
-
required(:
|
9
|
+
required(:external_id).maybe(:string)
|
10
10
|
optional(:currency).filled(:string)
|
11
|
+
required(:ledger_id).filled(:string)
|
12
|
+
optional(:line_items).array(Types::Reference)
|
11
13
|
optional(:memo).filled(:string)
|
14
|
+
optional(:reference_number).filled(:string)
|
12
15
|
optional(:transaction_date).filled(:date?)
|
13
|
-
optional(:line_items).array(Types::Reference)
|
14
16
|
end
|
15
17
|
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def operate
|
20
|
-
ledger_resource_data = adaptor.find(
|
21
|
-
resource: 'journal_entry',
|
22
|
-
id: resource.ledger_id
|
23
|
-
)
|
24
|
-
response = adaptor.post(
|
25
|
-
resource: 'journal_entry',
|
26
|
-
payload: merge_into(from: local_resource_data, to: ledger_resource_data)
|
27
|
-
)
|
28
|
-
|
29
|
-
resource.ledger_id = response.dig('Id')
|
30
|
-
success(response: response)
|
31
|
-
end
|
32
|
-
|
33
|
-
def local_resource_data
|
34
|
-
{
|
35
|
-
'CurrencyRef' => {
|
36
|
-
'value' => resource.currency,
|
37
|
-
},
|
38
|
-
'TxnDate' => resource.transaction_date.to_s, # Format: YYYY-MM-DD
|
39
|
-
'PrivateNote' => resource.memo,
|
40
|
-
'Line' => resource.line_items.map do |line_item|
|
41
|
-
{
|
42
|
-
'DetailType' => 'JournalEntryLineDetail',
|
43
|
-
'JournalEntryLineDetail' => {
|
44
|
-
'PostingType': Mapping::LINE_ITEM_TYPES[line_item.entry_type],
|
45
|
-
'AccountRef' => {
|
46
|
-
'value' => line_item.account&.ledger_id
|
47
|
-
}
|
48
|
-
},
|
49
|
-
'Amount' => line_item.amount / 100.0,
|
50
|
-
'Description' => line_item.description
|
51
|
-
}
|
52
|
-
end
|
53
|
-
}
|
54
|
-
end
|
55
18
|
end
|
56
19
|
end
|
57
20
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../expense_line_item/ledger_serializer'
|
4
|
+
|
5
|
+
module LedgerSync
|
6
|
+
module Adaptors
|
7
|
+
module QuickBooksOnline
|
8
|
+
module JournalEntryLineItem
|
9
|
+
class LedgerSerializer < QuickBooksOnline::LedgerSerializer
|
10
|
+
attribute ledger_attribute: 'DetailType' do
|
11
|
+
'JournalEntryLineDetail'
|
12
|
+
end
|
13
|
+
|
14
|
+
attribute ledger_attribute: 'Amount',
|
15
|
+
resource_attribute: :amount,
|
16
|
+
type: LedgerSerializerType::AmountType
|
17
|
+
|
18
|
+
attribute ledger_attribute: 'JournalEntryLineDetail.PostingType',
|
19
|
+
resource_attribute: :entry_type,
|
20
|
+
type: LedgerSerializerType::JournalEntryLineItemType
|
21
|
+
|
22
|
+
attribute ledger_attribute: 'JournalEntryLineDetail.AccountRef.value',
|
23
|
+
resource_attribute: 'account.ledger_id'
|
24
|
+
|
25
|
+
attribute ledger_attribute: 'Description',
|
26
|
+
resource_attribute: :description
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ledger_sync/adaptors/ledger_serializer'
|
4
|
+
|
5
|
+
Gem.find_files('ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/**/*.rb').each { |path| require path }
|
6
|
+
|
7
|
+
module LedgerSync
|
8
|
+
module Adaptors
|
9
|
+
module QuickBooksOnline
|
10
|
+
class LedgerSerializer < Adaptors::LedgerSerializer
|
11
|
+
def deserialize(hash:, merge_for_full_update: false)
|
12
|
+
deserialized_resource = super(hash: hash)
|
13
|
+
|
14
|
+
# Ref: https://github.com/LedgerSync/ledger_sync/issues/86
|
15
|
+
if deserialized_resource.is_a?(LedgerSync::Account) && deserialized_resource.account_type
|
16
|
+
deserialized_resource.classification ||= LedgerSerializerType::AccountType::TYPE_TO_CLASSIFICATION_MAPPING.fetch(deserialized_resource.account_type, nil)
|
17
|
+
end
|
18
|
+
|
19
|
+
return deserialized_resource unless merge_for_full_update
|
20
|
+
|
21
|
+
merge_resources_for_full_update(
|
22
|
+
hash: hash,
|
23
|
+
ledger_resource: deserialized_resource
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
def merge_resources_for_full_update(hash:, ledger_resource:)
|
28
|
+
merged_resource = resource.dup
|
29
|
+
|
30
|
+
self.class.attributes.each do |ledger_serializer_attribute|
|
31
|
+
next unless ledger_serializer_attribute.references_many?
|
32
|
+
|
33
|
+
resources_from_ledger = attribute_value_from_ledger(
|
34
|
+
hash: hash,
|
35
|
+
ledger_serializer_attribute: ledger_serializer_attribute,
|
36
|
+
resource: merged_resource
|
37
|
+
)
|
38
|
+
|
39
|
+
resource_hash_from_ledger = Hash[resources_from_ledger.map { |e| [e.ledger_id, e] }]
|
40
|
+
|
41
|
+
# Using original resource since it is overwritten by keyword arg
|
42
|
+
merged_value = resource.send(ledger_serializer_attribute.resource_attribute_dot_parts.first).map do |referenced|
|
43
|
+
if referenced.ledger_id.nil? # Assume creating a new resource in ledger
|
44
|
+
referenced
|
45
|
+
elsif resource_hash_from_ledger.key?(referenced.ledger_id.to_s) # Merged ledger into local
|
46
|
+
ledger_resource = resource_hash_from_ledger[referenced.ledger_id.to_s]
|
47
|
+
ledger_resource_serializer = ledger_serializer_attribute.serializer.new(resource: ledger_resource)
|
48
|
+
ledger_serializer_attribute.serializer.new(resource: referenced).deserialize(hash: ledger_resource_serializer.to_ledger_hash)
|
49
|
+
end
|
50
|
+
# Else assume delete from ledger
|
51
|
+
end.compact
|
52
|
+
|
53
|
+
merged_resource.assign_attribute(
|
54
|
+
ledger_serializer_attribute.resource_attribute_dot_parts.first,
|
55
|
+
merged_value
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
merged_resource
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.id(**keywords)
|
63
|
+
super({ ledger_attribute: 'Id', resource_attribute: :ledger_id }.merge(keywords))
|
64
|
+
end
|
65
|
+
|
66
|
+
def to_ledger_hash(deep_merge_unmapped_values: {}, only_changes: false)
|
67
|
+
ret = super(only_changes: only_changes)
|
68
|
+
return ret unless deep_merge_unmapped_values.any?
|
69
|
+
|
70
|
+
deep_merge_if_not_mapped(
|
71
|
+
current_hash: ret,
|
72
|
+
hash_to_search: deep_merge_unmapped_values
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.quickbooks_online_resource_type(type = nil)
|
77
|
+
@quickbooks_online_resource_type ||= (type || _inferred_resource_class.resource_type).to_s
|
78
|
+
end
|
79
|
+
|
80
|
+
private
|
81
|
+
|
82
|
+
def deep_merge_if_not_mapped(current_hash:, hash_to_search:)
|
83
|
+
hash_to_search.each do |key, value|
|
84
|
+
current_hash[key] = if current_hash.key?(key)
|
85
|
+
if value.is_a?(Hash)
|
86
|
+
deep_merge_if_not_mapped(
|
87
|
+
current_hash: current_hash[key],
|
88
|
+
hash_to_search: value
|
89
|
+
)
|
90
|
+
else
|
91
|
+
current_hash[key]
|
92
|
+
end
|
93
|
+
else
|
94
|
+
value
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
current_hash
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -1,49 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module LedgerSync
|
2
4
|
module Adaptors
|
3
5
|
module QuickBooksOnline
|
4
|
-
module
|
5
|
-
|
6
|
-
|
7
|
-
'asset' => 'Asset',
|
8
|
-
'equity' => 'Equity',
|
9
|
-
'expense' => 'Expense',
|
10
|
-
'liability' => 'Liability',
|
11
|
-
'revenue' => 'Revenue'
|
12
|
-
}
|
13
|
-
|
14
|
-
ACCOUNT_TYPES = {
|
15
|
-
'bank' => 'Bank',
|
16
|
-
'other_current_assets' => 'Other Current Asset',
|
17
|
-
'fixed_asset' => 'Fixed Asset',
|
18
|
-
'other_asset' => 'Other Asset',
|
19
|
-
'accounts_receivable' => 'Accounts Receivable',
|
20
|
-
'equity' => 'Equity',
|
21
|
-
'expense' => 'Expense',
|
22
|
-
'other_expense' => 'Other Expense',
|
23
|
-
'cost_of_goods_sold' => 'Cost of Goods Sold',
|
24
|
-
'accounts_payable' => 'Accounts Payable',
|
25
|
-
'credit_card' => 'Credit Card',
|
26
|
-
'long_term_liability' => 'Long Term Liability',
|
27
|
-
'other_current_liability' => 'Other Current Liability',
|
28
|
-
'income' => 'Income',
|
29
|
-
'other_income' => 'Other Income'
|
30
|
-
}
|
31
|
-
|
32
|
-
ACCOUNT_SUB_TYPES = {
|
6
|
+
module LedgerSerializerType
|
7
|
+
class AccountSubType < Adaptors::LedgerSerializerType::MappingType
|
8
|
+
MAPPING = {
|
33
9
|
# Bank
|
10
|
+
'cash_and_cash_equivalents' => 'CashAndCashEquivalents',
|
34
11
|
'cash_on_hand' => 'CashOnHand',
|
35
12
|
'checking' => 'Checking',
|
36
13
|
'money_market' => 'MoneyMarket',
|
14
|
+
'other_ear_marked_bank_accounts' => 'OtherEarMarkedBankAccounts',
|
37
15
|
'rents_held_in_trust' => 'RentsHeldInTrust',
|
38
16
|
'savings' => 'Savings',
|
39
17
|
'trust_accounts' => 'TrustAccounts',
|
40
|
-
'cash_and_cash_equivalents' => 'CashAndCashEquivalents',
|
41
|
-
'other_ear_marked_bank_accounts' => 'OtherEarMarkedBankAccounts',
|
42
18
|
# Other Current Asset
|
43
19
|
'allowance_for_bad_debts' => 'AllowanceForBadDebts',
|
20
|
+
'assets_available_for_sale' => 'AssetsAvailableForSale',
|
21
|
+
'bal_with_govt_authorities' => 'BalWithGovtAuthorities',
|
22
|
+
'called_up_share_capital_not_paid' => 'CalledUpShareCapitalNotPaid',
|
44
23
|
'development_costs' => 'DevelopmentCosts',
|
45
24
|
'employee_cash_advances' => 'EmployeeCashAdvances',
|
46
|
-
'
|
25
|
+
'expenditure_authorisations_and_letters_of_credit' => 'ExpenditureAuthorisationsAndLettersOfCredit',
|
26
|
+
'global_tax_deferred' => 'GlobalTaxDeferred',
|
27
|
+
'global_tax_refund' => 'GlobalTaxRefund',
|
28
|
+
'internal_transfers' => 'InternalTransfers',
|
47
29
|
'inventory' => 'Inventory',
|
48
30
|
'investment_mortgage_real_estate_loans' => 'Investment_MortgageRealEstateLoans',
|
49
31
|
'investment_other' => 'Investment_Other',
|
@@ -52,187 +34,181 @@ module LedgerSync
|
|
52
34
|
'loans_to_officers' => 'LoansToOfficers',
|
53
35
|
'loans_to_others' => 'LoansToOthers',
|
54
36
|
'loans_to_stockholders' => 'LoansToStockholders',
|
55
|
-
'prepaid_expenses' => 'PrepaidExpenses',
|
56
|
-
'retainage' => 'Retainage',
|
57
|
-
'undeposited_funds' => 'UndepositedFunds',
|
58
|
-
'assets_available_for_sale' => 'AssetsAvailableForSale',
|
59
|
-
'bal_with_govt_authorities' => 'BalWithGovtAuthorities',
|
60
|
-
'called_up_share_capital_not_paid' => 'CalledUpShareCapitalNotPaid',
|
61
|
-
'expenditure_authorisations_and_letters_of_credit' => 'ExpenditureAuthorisationsAndLettersOfCredit',
|
62
|
-
'global_tax_deferred' => 'GlobalTaxDeferred',
|
63
|
-
'global_tax_refund' => 'GlobalTaxRefund',
|
64
|
-
'internal_transfers' => 'InternalTransfers',
|
65
37
|
'other_consumables' => 'OtherConsumables',
|
38
|
+
'other_current_assets' => 'OtherCurrentAssets',
|
39
|
+
'prepaid_expenses' => 'PrepaidExpenses',
|
66
40
|
'provisions_current_assets' => 'ProvisionsCurrentAssets',
|
41
|
+
'retainage' => 'Retainage',
|
67
42
|
'short_term_investments_in_related_parties' => 'ShortTermInvestmentsInRelatedParties',
|
68
43
|
'short_term_loans_and_advances_to_related_parties' => 'ShortTermLoansAndAdvancesToRelatedParties',
|
69
44
|
'trade_and_other_receivables' => 'TradeAndOtherReceivables',
|
45
|
+
'undeposited_funds' => 'UndepositedFunds',
|
70
46
|
# Fixed Asset
|
47
|
+
'accumulated_amortization' => 'AccumulatedAmortization',
|
71
48
|
'accumulated_depletion' => 'AccumulatedDepletion',
|
72
49
|
'accumulated_depreciation' => 'AccumulatedDepreciation',
|
50
|
+
'assets_in_course_of_construction' => 'AssetsInCourseOfConstruction',
|
51
|
+
'buildings' => 'Buildings',
|
52
|
+
'capital_wip' => 'CapitalWip',
|
53
|
+
'cumulative_depreciation_on_intangible_assets' => 'CumulativeDepreciationOnIntangibleAssets',
|
73
54
|
'depletable_assets' => 'DepletableAssets',
|
74
55
|
'fixed_asset_computers' => 'FixedAssetComputers',
|
75
56
|
'fixed_asset_copiers' => 'FixedAssetCopiers',
|
76
57
|
'fixed_asset_furniture' => 'FixedAssetFurniture',
|
58
|
+
'fixed_asset_other_tools_equipment' => 'FixedAssetOtherToolsEquipment',
|
77
59
|
'fixed_asset_phone' => 'FixedAssetPhone',
|
78
60
|
'fixed_asset_photo_video' => 'FixedAssetPhotoVideo',
|
79
61
|
'fixed_asset_software' => 'FixedAssetSoftware',
|
80
|
-
'fixed_asset_other_tools_equipment' => 'FixedAssetOtherToolsEquipment',
|
81
62
|
'furniture_and_fixtures' => 'FurnitureAndFixtures',
|
63
|
+
'intangible_assets_under_development' => 'IntangibleAssetsUnderDevelopment',
|
64
|
+
'intangible_assets' => 'IntangibleAssets',
|
65
|
+
'land_asset' => 'LandAsset',
|
82
66
|
'land' => 'Land',
|
83
67
|
'leasehold_improvements' => 'LeaseholdImprovements',
|
84
|
-
'other_fixed_assets' => 'OtherFixedAssets',
|
85
|
-
'accumulated_amortization' => 'AccumulatedAmortization',
|
86
|
-
'buildings' => 'Buildings',
|
87
|
-
'intangible_assets' => 'IntangibleAssets',
|
88
68
|
'machinery_and_equipment' => 'MachineryAndEquipment',
|
89
|
-
'vehicles' => 'Vehicles',
|
90
|
-
'assets_in_course_of_construction' => 'AssetsInCourseOfConstruction',
|
91
|
-
'capital_wip' => 'CapitalWip',
|
92
|
-
'cumulative_depreciation_on_intangible_assets' => 'CumulativeDepreciationOnIntangibleAssets',
|
93
|
-
'intangible_assets_under_development' => 'IntangibleAssetsUnderDevelopment',
|
94
|
-
'land_asset' => 'LandAsset',
|
95
69
|
'non_current_assets' => 'NonCurrentAssets',
|
70
|
+
'other_fixed_assets' => 'OtherFixedAssets',
|
96
71
|
'participating_interests' => 'ParticipatingInterests',
|
97
72
|
'provisions_fixed_assets' => 'ProvisionsFixedAssets',
|
73
|
+
'vehicles' => 'Vehicles',
|
98
74
|
# Other Asset
|
99
|
-
'lease_buyout' => 'LeaseBuyout',
|
100
|
-
'other_long_term_assets' => 'OtherLongTermAssets',
|
101
|
-
'security_deposits' => 'SecurityDeposits',
|
102
75
|
'accumulated_amortization_of_other_assets' => 'AccumulatedAmortizationOfOtherAssets',
|
103
|
-
'goodwill' => 'Goodwill',
|
104
|
-
'licenses' => 'Licenses',
|
105
|
-
'organizational_costs' => 'OrganizationalCosts',
|
106
76
|
'assets_held_for_sale' => 'AssetsHeldForSale',
|
107
77
|
'available_for_sale_financial_assets' => 'AvailableForSaleFinancialAssets',
|
108
78
|
'deferred_tax' => 'DeferredTax',
|
79
|
+
'goodwill' => 'Goodwill',
|
109
80
|
'investments' => 'Investments',
|
81
|
+
'lease_buyout' => 'LeaseBuyout',
|
82
|
+
'licenses' => 'Licenses',
|
110
83
|
'long_term_investments' => 'LongTermInvestments',
|
111
84
|
'long_term_loans_and_advances_to_related_parties' => 'LongTermLoansAndAdvancesToRelatedParties',
|
85
|
+
'organizational_costs' => 'OrganizationalCosts',
|
112
86
|
'other_intangible_assets' => 'OtherIntangibleAssets',
|
87
|
+
'other_long_term_assets' => 'OtherLongTermAssets',
|
113
88
|
'other_long_term_investments' => 'OtherLongTermInvestments',
|
114
89
|
'other_long_term_loans_and_advances' => 'OtherLongTermLoansAndAdvances',
|
115
90
|
'prepayments_and_accrued_income' => 'PrepaymentsAndAccruedIncome',
|
116
91
|
'provisions_non_current_assets' => 'ProvisionsNonCurrentAssets',
|
117
92
|
'accounts_receivable' => 'AccountsReceivable',
|
93
|
+
'security_deposits' => 'SecurityDeposits',
|
118
94
|
# Equity
|
119
|
-
'opening_balance_equity' => 'OpeningBalanceEquity',
|
120
|
-
'partners_equity' => 'PartnersEquity',
|
121
|
-
'retained_earnings' => 'RetainedEarnings',
|
122
95
|
'accumulated_adjustment' => 'AccumulatedAdjustment',
|
123
|
-
'owners_equity' => 'OwnersEquity',
|
124
|
-
'paid_in_capital_or_surplus' => 'PaidInCapitalOrSurplus',
|
125
|
-
'partner_contributions' => 'PartnerContributions',
|
126
|
-
'partner_distributions' => 'PartnerDistributions',
|
127
|
-
'preferred_stock' => 'PreferredStock',
|
128
|
-
'common_stock' => 'CommonStock',
|
129
|
-
'treasury_stock' => 'TreasuryStock',
|
130
|
-
'estimated_taxes' => 'EstimatedTaxes',
|
131
|
-
'healthcare' => 'Healthcare',
|
132
|
-
'personal_income' => 'PersonalIncome',
|
133
|
-
'personal_expense' => 'PersonalExpense',
|
134
96
|
'accumulated_other_comprehensive_income' => 'AccumulatedOtherComprehensiveIncome',
|
135
97
|
'called_up_share_capital' => 'CalledUpShareCapital',
|
136
98
|
'capital_reserves' => 'CapitalReserves',
|
99
|
+
'common_stock' => 'CommonStock',
|
137
100
|
'dividend_disbursed' => 'DividendDisbursed',
|
138
101
|
'equity_in_earnings_of_subsiduaries' => 'EquityInEarningsOfSubsiduaries',
|
102
|
+
'estimated_taxes' => 'EstimatedTaxes',
|
103
|
+
'funds' => 'Funds',
|
104
|
+
'healthcare' => 'Healthcare',
|
139
105
|
'investment_grants' => 'InvestmentGrants',
|
140
106
|
'money_received_against_share_warrants' => 'MoneyReceivedAgainstShareWarrants',
|
107
|
+
'opening_balance_equity' => 'OpeningBalanceEquity',
|
141
108
|
'other_free_reserves' => 'OtherFreeReserves',
|
109
|
+
'owners_equity' => 'OwnersEquity',
|
110
|
+
'paid_in_capital_or_surplus' => 'PaidInCapitalOrSurplus',
|
111
|
+
'partner_contributions' => 'PartnerContributions',
|
112
|
+
'partner_distributions' => 'PartnerDistributions',
|
113
|
+
'partners_equity' => 'PartnersEquity',
|
114
|
+
'personal_expense' => 'PersonalExpense',
|
115
|
+
'personal_income' => 'PersonalIncome',
|
116
|
+
'preferred_stock' => 'PreferredStock',
|
117
|
+
'retained_earnings' => 'RetainedEarnings',
|
142
118
|
'share_application_money_pending_allotment' => 'ShareApplicationMoneyPendingAllotment',
|
143
119
|
'share_capital' => 'ShareCapital',
|
144
|
-
'
|
120
|
+
'treasury_stock' => 'TreasuryStock',
|
145
121
|
# Expense
|
146
122
|
'advertising_promotional' => 'AdvertisingPromotional',
|
123
|
+
'amortization_expense' => 'AmortizationExpense',
|
124
|
+
'appropriations_to_depreciation' => 'AppropriationsToDepreciation',
|
125
|
+
'auto' => 'Auto',
|
147
126
|
'bad_debts' => 'BadDebts',
|
148
127
|
'bank_charges' => 'BankCharges',
|
128
|
+
'borrowing_cost' => 'BorrowingCost',
|
149
129
|
'charitable_contributions' => 'CharitableContributions',
|
150
|
-
'
|
130
|
+
'commissions_and_fees' => 'CommissionsAndFees',
|
131
|
+
'cost_of_labor' => 'CostOfLabor',
|
132
|
+
'distribution_costs' => 'DistributionCosts',
|
133
|
+
'dues_subscriptions' => 'DuesSubscriptions',
|
151
134
|
'entertainment_meals' => 'EntertainmentMeals',
|
135
|
+
'entertainment' => 'Entertainment',
|
152
136
|
'equipment_rental' => 'EquipmentRental',
|
137
|
+
'external_services' => 'ExternalServices',
|
138
|
+
'extraordinary_charges' => 'ExtraordinaryCharges',
|
153
139
|
'finance_costs' => 'FinanceCosts',
|
154
140
|
'global_tax_expense' => 'GlobalTaxExpense',
|
141
|
+
'income_tax_expense' => 'IncomeTaxExpense',
|
155
142
|
'insurance' => 'Insurance',
|
156
143
|
'interest_paid' => 'InterestPaid',
|
157
144
|
'legal_professional_fees' => 'LegalProfessionalFees',
|
145
|
+
'loss_on_discontinued_operations_net_of_tax' => 'LossOnDiscontinuedOperationsNetOfTax',
|
146
|
+
'management_compensation' => 'ManagementCompensation',
|
158
147
|
'office_expenses' => 'OfficeExpenses',
|
159
148
|
'office_general_administrative_expenses' => 'OfficeGeneralAdministrativeExpenses',
|
160
149
|
'other_business_expenses' => 'OtherBusinessExpenses',
|
161
|
-
'other_miscellaneous_service_cost' => 'OtherMiscellaneousServiceCost',
|
162
|
-
'promotional_meals' => 'PromotionalMeals',
|
163
|
-
'rent_or_lease_of_buildings' => 'RentOrLeaseOfBuildings',
|
164
|
-
'repair_maintenance' => 'RepairMaintenance',
|
165
|
-
'shipping_freight_delivery' => 'ShippingFreightDelivery',
|
166
|
-
'supplies_materials' => 'SuppliesMaterials',
|
167
|
-
'travel' => 'Travel',
|
168
|
-
'travel_meals' => 'TravelMeals',
|
169
|
-
'auto' => 'Auto',
|
170
|
-
'cost_of_labor' => 'CostOfLabor',
|
171
|
-
'dues_subscriptions' => 'DuesSubscriptions',
|
172
|
-
'payroll_expenses' => 'PayrollExpenses',
|
173
|
-
'taxes_paid' => 'TaxesPaid',
|
174
|
-
'unapplied_cash_bill_payment_expense' => 'UnappliedCashBillPaymentExpense',
|
175
|
-
'amortization_expense' => 'AmortizationExpense',
|
176
|
-
'appropriations_to_depreciation' => 'AppropriationsToDepreciation',
|
177
|
-
'borrowing_cost' => 'BorrowingCost',
|
178
|
-
'commissions_and_fees' => 'CommissionsAndFees',
|
179
|
-
'distribution_costs' => 'DistributionCosts',
|
180
|
-
'external_services' => 'ExternalServices',
|
181
|
-
'extraordinary_charges' => 'ExtraordinaryCharges',
|
182
|
-
'income_tax_expense' => 'IncomeTaxExpense',
|
183
|
-
'loss_on_discontinued_operations_net_of_tax' => 'LossOnDiscontinuedOperationsNetOfTax',
|
184
|
-
'management_compensation' => 'ManagementCompensation',
|
185
150
|
'other_current_operating_charges' => 'OtherCurrentOperatingCharges',
|
186
151
|
'other_external_services' => 'OtherExternalServices',
|
152
|
+
'other_miscellaneous_service_cost' => 'OtherMiscellaneousServiceCost',
|
187
153
|
'other_rental_costs' => 'OtherRentalCosts',
|
188
154
|
'other_selling_expenses' => 'OtherSellingExpenses',
|
155
|
+
'payroll_expenses' => 'PayrollExpenses',
|
189
156
|
'project_studies_surveys_assessments' => 'ProjectStudiesSurveysAssessments',
|
157
|
+
'promotional_meals' => 'PromotionalMeals',
|
190
158
|
'purchases_rebates' => 'PurchasesRebates',
|
159
|
+
'rent_or_lease_of_buildings' => 'RentOrLeaseOfBuildings',
|
160
|
+
'repair_maintenance' => 'RepairMaintenance',
|
191
161
|
'shipping_and_delivery_expense' => 'ShippingAndDeliveryExpense',
|
162
|
+
'shipping_freight_delivery' => 'ShippingFreightDelivery',
|
192
163
|
'staff_costs' => 'StaffCosts',
|
193
164
|
'sundry' => 'Sundry',
|
165
|
+
'supplies_materials' => 'SuppliesMaterials',
|
166
|
+
'taxes_paid' => 'TaxesPaid',
|
194
167
|
'travel_expenses_general_and_admin_expenses' => 'TravelExpensesGeneralAndAdminExpenses',
|
195
168
|
'travel_expenses_selling_expense' => 'TravelExpensesSellingExpense',
|
169
|
+
'travel_meals' => 'TravelMeals',
|
170
|
+
'travel' => 'Travel',
|
171
|
+
'unapplied_cash_bill_payment_expense' => 'UnappliedCashBillPaymentExpense',
|
196
172
|
# Other Expense
|
173
|
+
'amortization' => 'Amortization',
|
174
|
+
'deferred_tax_expense' => 'DeferredTaxExpense',
|
175
|
+
'depletion' => 'Depletion',
|
197
176
|
'depreciation' => 'Depreciation',
|
177
|
+
'exceptional_items' => 'ExceptionalItems',
|
198
178
|
'exchange_gain_or_loss' => 'ExchangeGainOrLoss',
|
199
|
-
'
|
200
|
-
'penalties_settlements' => 'PenaltiesSettlements',
|
201
|
-
'amortization' => 'Amortization',
|
179
|
+
'extraordinary_items' => 'ExtraordinaryItems',
|
202
180
|
'gas_and_fuel' => 'GasAndFuel',
|
203
181
|
'home_office' => 'HomeOffice',
|
204
182
|
'home_owner_rental_insurance' => 'HomeOwnerRentalInsurance',
|
205
|
-
'
|
183
|
+
'income_tax_other_expense' => 'IncomeTaxOtherExpense',
|
184
|
+
'mat_credit' => 'MatCredit',
|
206
185
|
'mortgage_interest' => 'MortgageInterest',
|
186
|
+
'other_home_office_expenses' => 'OtherHomeOfficeExpenses',
|
187
|
+
'other_miscellaneous_expense' => 'OtherMiscellaneousExpense',
|
188
|
+
'other_vehicle_expenses' => 'OtherVehicleExpenses',
|
189
|
+
'parking_and_tolls' => 'ParkingAndTolls',
|
190
|
+
'penalties_settlements' => 'PenaltiesSettlements',
|
191
|
+
'prior_period_items' => 'PriorPeriodItems',
|
207
192
|
'rent_and_lease' => 'RentAndLease',
|
208
193
|
'repairs_and_maintenance' => 'RepairsAndMaintenance',
|
209
|
-
'
|
210
|
-
'
|
194
|
+
'tax_roundoff_gain_or_loss' => 'TaxRoundoffGainOrLoss',
|
195
|
+
'utilities' => 'Utilities',
|
211
196
|
'vehicle_insurance' => 'VehicleInsurance',
|
212
197
|
'vehicle_lease' => 'VehicleLease',
|
213
198
|
'vehicle_loan_interest' => 'VehicleLoanInterest',
|
214
199
|
'vehicle_loan' => 'VehicleLoan',
|
215
200
|
'vehicle_registration' => 'VehicleRegistration',
|
216
201
|
'vehicle_repairs' => 'VehicleRepairs',
|
217
|
-
'
|
218
|
-
'utilities' => 'Utilities',
|
202
|
+
'vehicle' => 'Vehicle',
|
219
203
|
'wash_and_road_services' => 'WashAndRoadServices',
|
220
|
-
'deferred_tax_expense' => 'DeferredTaxExpense',
|
221
|
-
'depletion' => 'Depletion',
|
222
|
-
'exceptional_items' => 'ExceptionalItems',
|
223
|
-
'extraordinary_items' => 'ExtraordinaryItems',
|
224
|
-
'income_tax_other_expense' => 'IncomeTaxOtherExpense',
|
225
|
-
'mat_credit' => 'MatCredit',
|
226
|
-
'prior_period_items' => 'PriorPeriodItems',
|
227
|
-
'tax_roundoff_gain_or_loss' => 'TaxRoundoffGainOrLoss',
|
228
204
|
# Cost of Goods Sold
|
205
|
+
'cost_of_labor_cos' => 'CostOfLaborCos',
|
206
|
+
'cost_of_sales' => 'CostOfSales',
|
229
207
|
'equipment_rental_cos' => 'EquipmentRentalCos',
|
208
|
+
'freight_and_delivery_cost' => 'FreightAndDeliveryCost',
|
230
209
|
'other_costs_of_service_cos' => 'OtherCostsOfServiceCos',
|
231
210
|
'shipping_freight_delivery_cos' => 'ShippingFreightDeliveryCos',
|
232
211
|
'supplies_materials_cogs' => 'SuppliesMaterialsCogs',
|
233
|
-
'cost_of_labor_cos' => 'CostOfLaborCos',
|
234
|
-
'cost_of_sales' => 'CostOfSales',
|
235
|
-
'freight_and_delivery_cost' => 'FreightAndDeliveryCost',
|
236
212
|
# Accounts Payable
|
237
213
|
'accounts_payable' => 'AccountsPayable',
|
238
214
|
'outstanding_dues_micro_small_enterprise' => 'OutstandingDuesMicroSmallEnterprise',
|
@@ -240,9 +216,6 @@ module LedgerSync
|
|
240
216
|
# Credit Card
|
241
217
|
'credit_card' => 'CreditCard',
|
242
218
|
# Long Term Liability
|
243
|
-
'notes_payable' => 'NotesPayable',
|
244
|
-
'other_long_term_liabilities' => 'OtherLongTermLiabilities',
|
245
|
-
'shareholder_notes_payable' => 'ShareholderNotesPayable',
|
246
219
|
'accruals_and_deferred_income' => 'AccrualsAndDeferredIncome',
|
247
220
|
'accrued_long_lerm_liabilities' => 'AccruedLongLermLiabilities',
|
248
221
|
'accrued_vacation_payable' => 'AccruedVacationPayable',
|
@@ -255,69 +228,76 @@ module LedgerSync
|
|
255
228
|
'long_term_borrowings' => 'LongTermBorrowings',
|
256
229
|
'long_term_debit' => 'LongTermDebit',
|
257
230
|
'long_term_employee_benefit_obligations' => 'LongTermEmployeeBenefitObligations',
|
231
|
+
'notes_payable' => 'NotesPayable',
|
258
232
|
'obligations_under_finance_leases' => 'ObligationsUnderFinanceLeases',
|
233
|
+
'other_long_term_liabilities' => 'OtherLongTermLiabilities',
|
259
234
|
'other_long_term_provisions' => 'OtherLongTermProvisions',
|
260
235
|
'provision_for_liabilities' => 'ProvisionForLiabilities',
|
261
236
|
'provisions_non_current_liabilities' => 'ProvisionsNonCurrentLiabilities',
|
237
|
+
'shareholder_notes_payable' => 'ShareholderNotesPayable',
|
262
238
|
'staff_and_related_long_term_liability_accounts' => 'StaffAndRelatedLongTermLiabilityAccounts',
|
263
239
|
# Other Current Liability
|
264
|
-
'direct_deposit_payable' => 'DirectDepositPayable',
|
265
|
-
'line_of_credit' => 'LineOfCredit',
|
266
|
-
'loan_payable' => 'LoanPayable',
|
267
|
-
'global_tax_payable' => 'GlobalTaxPayable',
|
268
|
-
'global_tax_suspense' => 'GlobalTaxSuspense',
|
269
|
-
'other_current_liabilities' => 'OtherCurrentLiabilities',
|
270
|
-
'payroll_clearing' => 'PayrollClearing',
|
271
|
-
'payroll_tax_payable' => 'PayrollTaxPayable',
|
272
|
-
'prepaid_expenses_payable' => 'PrepaidExpensesPayable',
|
273
|
-
'rents_in_trust_liability' => 'RentsInTrustLiability',
|
274
|
-
'trust_accounts_liabilities' => 'TrustAccountsLiabilities',
|
275
|
-
'federal_income_tax_payable' => 'FederalIncomeTaxPayable',
|
276
|
-
'insurance_payable' => 'InsurancePayable',
|
277
|
-
'sales_tax_payable' => 'SalesTaxPayable',
|
278
|
-
'state_local_income_tax_payable' => 'StateLocalIncomeTaxPayable',
|
279
240
|
'accrued_liabilities' => 'AccruedLiabilities',
|
280
241
|
'current_liabilities' => 'CurrentLiabilities',
|
281
242
|
'current_portion_employee_benefits_obligations' => 'CurrentPortionEmployeeBenefitsObligations',
|
282
243
|
'current_portion_of_obligations_under_finance_leases' => 'CurrentPortionOfObligationsUnderFinanceLeases',
|
283
244
|
'current_tax_liability' => 'CurrentTaxLiability',
|
245
|
+
'direct_deposit_payable' => 'DirectDepositPayable',
|
284
246
|
'dividends_payable' => 'DividendsPayable',
|
285
247
|
'duties_and_taxes' => 'DutiesAndTaxes',
|
248
|
+
'federal_income_tax_payable' => 'FederalIncomeTaxPayable',
|
249
|
+
'global_tax_payable' => 'GlobalTaxPayable',
|
250
|
+
'global_tax_suspense' => 'GlobalTaxSuspense',
|
251
|
+
'insurance_payable' => 'InsurancePayable',
|
286
252
|
'interest_payables' => 'InterestPayables',
|
253
|
+
'line_of_credit' => 'LineOfCredit',
|
254
|
+
'loan_payable' => 'LoanPayable',
|
255
|
+
'other_current_liabilities' => 'OtherCurrentLiabilities',
|
256
|
+
'payroll_clearing' => 'PayrollClearing',
|
257
|
+
'payroll_tax_payable' => 'PayrollTaxPayable',
|
258
|
+
'prepaid_expenses_payable' => 'PrepaidExpensesPayable',
|
287
259
|
'provision_for_warranty_obligations' => 'ProvisionForWarrantyObligations',
|
288
260
|
'provisions_current_liabilities' => 'ProvisionsCurrentLiabilities',
|
261
|
+
'rents_in_trust_liability' => 'RentsInTrustLiability',
|
262
|
+
'sales_tax_payable' => 'SalesTaxPayable',
|
289
263
|
'short_term_borrowings' => 'ShortTermBorrowings',
|
290
264
|
'social_security_agencies' => 'SocialSecurityAgencies',
|
291
265
|
'staff_and_related_liability_accounts' => 'StaffAndRelatedLiabilityAccounts',
|
266
|
+
'state_local_income_tax_payable' => 'StateLocalIncomeTaxPayable',
|
292
267
|
'sundry_debtors_and_creditors' => 'SundryDebtorsAndCreditors',
|
293
268
|
'trade_and_other_payables' => 'TradeAndOtherPayables',
|
269
|
+
'trust_accounts_liabilities' => 'TrustAccountsLiabilities',
|
294
270
|
# Income
|
295
|
-
'non_profit_income' => 'NonProfitIncome',
|
296
|
-
'other_primary_income' => 'OtherPrimaryIncome',
|
297
|
-
'sales_of_product_income' => 'SalesOfProductIncome',
|
298
|
-
'service_fee_income' => 'ServiceFeeIncome',
|
299
|
-
'discounts_refunds_given' => 'DiscountsRefundsGiven',
|
300
|
-
'unapplied_cash_payment_income' => 'UnappliedCashPaymentIncome',
|
301
271
|
'cash_receipt_income' => 'CashReceiptIncome',
|
272
|
+
'discounts_refunds_given' => 'DiscountsRefundsGiven',
|
273
|
+
'non_profit_income' => 'NonProfitIncome',
|
302
274
|
'operating_grants' => 'OperatingGrants',
|
303
275
|
'other_current_operating_income' => 'OtherCurrentOperatingIncome',
|
276
|
+
'other_primary_income' => 'OtherPrimaryIncome',
|
304
277
|
'own_work_capitalized' => 'OwnWorkCapitalized',
|
305
278
|
'revenue_general' => 'RevenueGeneral',
|
279
|
+
'sales_of_product_income' => 'SalesOfProductIncome',
|
306
280
|
'sales_retail' => 'SalesRetail',
|
307
281
|
'sales_wholesale' => 'SalesWholesale',
|
308
282
|
'savings_by_tax_scheme' => 'SavingsByTaxScheme',
|
283
|
+
'service_fee_income' => 'ServiceFeeIncome',
|
284
|
+
'unapplied_cash_payment_income' => 'UnappliedCashPaymentIncome',
|
309
285
|
# Other Income
|
310
286
|
'dividend_income' => 'DividendIncome',
|
311
|
-
'interest_earned' => 'InterestEarned',
|
312
|
-
'other_investment_income' => 'OtherInvestmentIncome',
|
313
|
-
'other_miscellaneous_income' => 'OtherMiscellaneousIncome',
|
314
|
-
'tax_exempt_interest' => 'TaxExemptInterest',
|
315
287
|
'gain_loss_on_sale_of_fixed_assets' => 'GainLossOnSaleOfFixedAssets',
|
316
288
|
'gain_loss_on_sale_of_investments' => 'GainLossOnSaleOfInvestments',
|
289
|
+
'interest_earned' => 'InterestEarned',
|
317
290
|
'loss_on_disposal_of_assets' => 'LossOnDisposalOfAssets',
|
291
|
+
'other_investment_income' => 'OtherInvestmentIncome',
|
292
|
+
'other_miscellaneous_income' => 'OtherMiscellaneousIncome',
|
318
293
|
'other_operating_income' => 'OtherOperatingIncome',
|
319
|
-
'
|
320
|
-
|
294
|
+
'tax_exempt_interest' => 'TaxExemptInterest',
|
295
|
+
'unrealised_loss_on_securities_net_of_tax' => 'UnrealisedLossOnSecuritiesNetOfTax'
|
296
|
+
}.freeze
|
297
|
+
|
298
|
+
def self.mapping
|
299
|
+
@mapping ||= MAPPING
|
300
|
+
end
|
321
301
|
end
|
322
302
|
end
|
323
303
|
end
|