|
Brett Smith
|
1b7fdf4f3b00
|
4 years ago
|
|
|
|
Brett Smith
|
536b50b478d8
|
4 years ago
|
|
|
|
Brett Smith
|
701ccdc19250
|
4 years ago
|
|
tests: Test where Transactions are real NamedTuples.
This makes methods like _replace available in real code, and caught the bug where we can't use @functools.lru_cache with Transaction arguments, because they're unhashable due to their mutable members.
|
|
Brett Smith
|
9f0c30738db8
|
4 years ago
|
|
|
|
Brett Smith
|
fdb62dd1c641
|
4 years ago
|
|
plugin.core: _RequireLinksPostingMetadataHook can check several metadata.
Extend the base class from checking 1 metadata value to checking N.
This is preparation for RT#10643, letting payables be documented with invoice or contract.
This does unify error reporting, because now we always report all type/invalid value errors *plus* a missing error if appropriate. I think this consistency and thoroughness is appropriate, although it did require some adjustments to the tests.
|
|
Brett Smith
|
0d80c2282ccb
|
4 years ago
|
|
test_meta_invoice: Add explicit "missing invoice" tests.
I wrote this while debugging something else, and I don't want to let a good test go to waste.
|
|
Brett Smith
|
c712105bed3c
|
4 years ago
|
|
Revise chart of accounts used throughout.
The main impetus of this change is to rename accounts that were outside Beancount's accepted five root accounts, to move them into that structure. This includes:
Accrued:*Payable: → Liabilities:Payable:* Accrued:*Receivable: → Assets:Receivable:* UneanedIncome:* → Liabilities:UnearnedIncome:*
Note the last change did inspire in a change to our validation rules. We no longer require income-type on unearned income, because it's no longer considered income at all. Once it's earned and converted to an Income account, that has an income-type of course.
This did inspire another rename that was not required, but provided more consistency with the other account names above:
Assets:Prepaid* → Assets:Prepaid:*
Where applicable, I have generally extended tests to make sure one of each of the five account types is tested. (This mostly meant adding an Equity account to the tests.) I also added tests for key parts of the hierarchy, like Assets:Receivable and Liabilities:Payable, where applicable.
As part of this change, Account.is_real_asset() got renamed to Account.is_cash_equivalent(), to better self-document its purpose.
|
|
Brett Smith
|
2909c405e620
|
4 years ago
|
|
|
|
Brett Smith
|
d9420ac2b62f
|
4 years ago
|
|
|