|
Brett Smith
|
328f59231c08
|
4 years ago
|
|
|
|
Brett Smith
|
fdd9f2847b78
|
4 years ago
|
|
plugin: Skip enum value checks with a flag+FIXME.
We've long supported skipping documentation checks by flagging the transaction. We haven't done the same for enumerated metadata because we need it less often, and bad values tend to do more damage to reports.
However, occasionally when something very off-process happens, we do need it as a matter of expediency. So support it.
In order to skip validation of these fields, the plugin requires that the value start with the string "FIXME". This helps ensure that reports have a consistent way to detect and warn about unfilled values in flagged transactions.
|
|
Brett Smith
|
5c6d9d6f69e3
|
4 years ago
|
|
|
|
Brett Smith
|
31cee4e0ba15
|
4 years ago
|
|
|
|
Brett Smith
|
1b7fdf4f3b00
|
4 years ago
|
|
|
|
Brett Smith
|
680bb6e30528
|
4 years ago
|
|
meta_tax_implication: Update values for TY2020 1099-MISC changes.
Support the new 1099-NEC form.
|
|
Brett Smith
|
552ef45f47df
|
4 years ago
|
|
plugin: Be more selective about when ! skips validation.
It makes sense to let the bookkeeper skip validations in situations where the metadata requires information that might not be available when entered. It does not make sense to skip validations that *must* be available and affect the structure of the books, like project and entity.
This commit ensures every plugin hook has a test for flagged transactions, even for hooks that currently have the desired behavior where no code changes were required for the test to pass.
|
|
Brett Smith
|
e3e782c0280f
|
4 years ago
|
|
|
|
Brett Smith
|
be35f36d26ba
|
4 years ago
|
|
|
|
Brett Smith
|
08a3151bfa8f
|
4 years ago
|
|
|
|
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
|
0d370c445b9e
|
4 years ago
|
|
|
|
Brett Smith
|
501bd251cbf3
|
4 years ago
|
|
tests: Turn tested hooks into fixtures.
This is in preparation for passing configuration to hooks. That'll be a big change already, so I wanted this to be a boring diff first.
|
|
Brett Smith
|
3f9e67de3ac5
|
4 years ago
|
|
|
|
Brett Smith
|
e7720b8fb866
|
4 years ago
|
|
tests: Add check_post_meta.
This makes it simple to conveniently check all posting metadata in tests.
|
|
Brett Smith
|
a41feb94b3e0
|
4 years ago
|
|
plugin: Transform posting hooks into transaction hooks.
I feel like posting hooks a case of premature optimization in early development. This approach reduces the number of special cases in the code and allows us to more strongly reason about hooks in the type system.
|
|
Brett Smith
|
c9ff4ab74617
|
4 years ago
|
|
|