Commit graph

359 commits

Author SHA1 Message Date
Brett Smith
55b347271c ledger: Add fund ledger report type.
See the FundLedgerODS docstring for details.
2021-02-17 14:20:58 -05:00
Brett Smith
4188dc6a64 cliutil: Add EnumArgument.
This functionality already existed in the code three times, and it's about
to get more important for the ledger report, so now was the time to abstract
it.
2021-02-17 14:00:06 -05:00
Brett Smith
fe3560b748 meta_tax_reporting: New plugin validation. 2021-02-11 13:38:11 -05:00
Brett Smith
328f59231c meta_tax_implication: Accept titlecased values. 2021-02-11 11:17:24 -05:00
Brett Smith
ca38e45178 reports: Add BaseODS.row_count() method. 2021-01-29 14:26:54 -05:00
Brett Smith
250b14954f tests: Add tests for plugin.meta_payroll_type. 2021-01-29 11:28:29 -05:00
Brett Smith
fb9aa9eae1 tests: Add tests for BaseODS.bgcolor_style(). 2021-01-29 11:28:18 -05:00
Brett Smith
fdd9f2847b 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.
2021-01-29 09:38:37 -05:00
Brett Smith
087b3274e7 ledger: Dedicated reporting tab for Expenses:Payroll.
To better accommodate the new payroll-type metadata.
2021-01-19 14:23:51 -05:00
Brett Smith
5c6d9d6f69 tax_implication: Bugfix "Corp" abbreviation in values. 2021-01-18 15:49:39 -05:00
Brett Smith
31cee4e0ba meta_tax_implication: New values for grant recipients. 2021-01-18 15:45:31 -05:00
Brett Smith
8b2633ec23 extract: Fill YAML with Python values, not PS/FDF values. 2021-01-09 13:20:15 -05:00
Brett Smith
6a3d64ff22 fields: Change FieldType capitalization.
This is friendlier to the YAML input and consistent with FieldFlags.
Less consistent with the rest of the codebase, but local consistency matters
more IMO.
2021-01-09 10:49:04 -05:00
Brett Smith
2cf4fdcfad pdfforms.fill: New module+tool.
After you edit the YAML generated by pdfform-extract,
you can re-fill the original PDF with pdfform-fill.
2021-01-09 10:09:08 -05:00
Brett Smith
902c313b4d cliutil: New function can_run. 2021-01-09 10:09:08 -05:00
Brett Smith
0045d8d032 fields: Add FormField.add_kid() method. 2021-01-09 10:09:08 -05:00
Brett Smith
391fde5447 fields: TextField.set_value() accepts numeric types. 2021-01-09 10:09:08 -05:00
Brett Smith
13c66e8ce2 pdfforms: Initial module and tool to extract PDF form data to YAML.
Next steps:

* A tool to fill the PDF form based on values written to that YAML.
* An extension to fill some of those values with numbers queried from the
  books (which is why we need something more involved than FDF).
2021-01-09 10:09:08 -05:00
Brett Smith
1b7fdf4f3b Clarify and organize license info including additional permission. 2021-01-08 16:58:04 -05:00
Brett Smith
71f50a6cf8 data: Bugfix is_opening_balance_txn() for donations from equity. RT#13516
Opening balance transactions should only include opening equity
accounts and non-equity accounts. Reflect that in the test.
2020-12-29 12:20:53 -05:00
Brett Smith
7abc01b1ac fund: Bugfix crash when text report has an empty balance.
This mostly happens when a date range includes the opening or closing of a
fund account, because then the reported beginning/ending balance is empty.
2020-12-29 10:53:55 -05:00
Brett Smith
51eee8ec8f meta_entity: Don't set transaction metadata when payee is None. RT#12913 2020-11-04 13:43:54 -05:00
Brett Smith
2b23eba549 data: PostingMeta.detached() can be chain-called. 2020-10-26 14:52:41 -04:00
Brett Smith
69f597a47c rewrite: Support `metakey in value` conditions.
For now, works exactly like ``.account in value``.
2020-10-24 11:43:46 -04:00
Brett Smith
ea69d58957 tests: Test updates for accrual report changes in the last commit.
Where assertions are removed from individual tests, I believe that
functionality is covered by other tests (although probably not to the extent
of checking multiple splits).
2020-10-24 11:31:39 -04:00
Brett Smith
db3ba4fd4d accrual: Add Prepaid Expenses to aging report. 2020-10-21 11:33:27 -04:00
Brett Smith
1fcab6af32 fund: Add totals rows to the full report.
This is easy to do with the current infrastructure, and it's nice to have.
2020-10-16 16:41:08 -04:00
Brett Smith
404a88de1d fund: Use Balances instead of PeriodPostings.
A few motivations for this:

* This makes the fund report more maintainable, because the data structure
  is better suited to the task at hand, making it easier to follow what's
  going on.

* This helps put Balances through a little more testing with a high-level
  report.

* This makes the fund report a little faster, since totals are usually
  calculated from a smaller number of Balance objects rather than all
  Postings over a period.
2020-10-16 16:29:05 -04:00
Brett Smith
5e147dc0b5 core: Balances lets the caller specify posting metadata to load. 2020-10-16 11:56:38 -04:00
Brett Smith
ffc20b6899 reports: Move Balance class and friends to core.
This will be used for the fund report and the upcoming budget variance
report.
2020-10-16 10:53:15 -04:00
Brett Smith
7baa78fe34 ledger: Add Equity back to default project report sheets.
While many projects often won't have anything here, this is necessary to
show project funds released from restrictions.
2020-09-22 10:20:51 -04:00
Brett Smith
f55fccd48d plugin: Add TransactionDate hook. RT#10566
This prevents mistakes where a transaction is entered in the wrong file for
its date (which in turns causes errors in reports).
2020-09-10 16:59:29 -04:00
Brett Smith
8bc17dbf4a meta_entity: Set metadata when entity comes from payee. RT#12525
This makes it easier to write bean-queries, since you don't have to check
two places for the "real" entity.
2020-09-10 16:06:43 -04:00
Brett Smith
da056917bf meta_repo_links: Check all non-RT links. RT#12517
This is less "future-proof," but the thing is, it's premature to try
to anticipate what other link formats will be in the future. See
discussion in comments.
2020-09-05 14:59:13 -04:00
Brett Smith
c2851f5cc0 reports: URL-quote file links in spreadsheets. RT#12517
This was already done correctly in RT links because rtutil takes care of the
quoting. The fact that we weren't doing it for file links was an oversight.
2020-09-05 14:48:48 -04:00
Brett Smith
de10197af7 reports: Improve formatting of non-currency commodities.
Introduce the get_commodity_format() function, which returns Babel's
usual format string for currencies, but returns a version of it
"merged" with the locale's currency unit pattern for other
commodities.

BaseODS then calls this function where needed to format amounts.
2020-09-04 15:29:10 -04:00
Brett Smith
72f144e1ff extract_odf_links: Make "not found" warning easier to parse.
e.g., you can just use `grep | cut -b N-`.
2020-09-03 09:45:31 -04:00
Brett Smith
2eba5a5546 extract_odf_links: Add --relative-to option.
This is just too convenient for our usual case where we expect
all links to be relative to a specific directory (the repository).
2020-08-30 10:03:57 -04:00
Brett Smith
cf2d825a08 tests: Reorganize extract_odf_links tests for new feature. 2020-08-30 09:18:41 -04:00
Brett Smith
f3e577f0d5 rewrite: New module.
This module is intended to make bulk data changes to normalize
information across FYs for reporting.
2020-08-29 17:17:41 -04:00
Brett Smith
52adf1f0a5 data: Add PostingMeta.detached() method. 2020-08-29 10:26:21 -04:00
Brett Smith
4f223642ed reports: Refactor total styles to BaseODS. 2020-08-22 12:33:06 -04:00
Brett Smith
e8a754c387 ledger: Formatting modernizations.
* Equity sheet(s) report project.
* Headers include account classification.
* Bottom lines are formatted in the usual accounting way.
2020-08-22 12:31:44 -04:00
Brett Smith
58954aab23 fund: Text output readability improvements.
Make it look more like the spreadsheets:

* Don't normalize Expenses negative.

* Consistent account order: Income, then Expenses, then Equity.

* Include a bottom line divider for each fund.
2020-08-22 09:49:19 -04:00
Brett Smith
cc1767a09d fund: Incorporate Equity accounts into Release from Restrictions.
This matches what we do on our Statement of Activities in the
balance sheet report.
2020-08-22 09:25:53 -04:00
Brett Smith
95fb8ce481 meta_expense_type: Refine defaults.
* Default "management" for more accounts.

* There's a good handful of accounts where in past audits, the functional
  split has been "Conservancy expenses are management, project expenses are
  program." Handle those cases too.
2020-08-20 17:22:05 -04:00
Brett Smith
aa1f2ea35a balance_sheet: Balance.total() accepts multiple account names.
This simplifies the code to total all equity.
2020-08-18 01:28:37 -04:00
Brett Smith
e05f55659a balance_sheet: Balance only considers post_type for Expenses.
This simplifies the code and slightly optimizes it, since now Balance
won't store and keep re-summing income-type breakdowns that nothing
needs.
2020-08-18 01:28:37 -04:00
Brett Smith
29d4325c7a balance_sheet: Add activity report. 2020-08-17 15:26:55 -04:00
Brett Smith
a87d4bfc6c balance_sheet: Start report with financial position. RT#11854. 2020-08-17 10:34:38 -04:00