Changeset - 1cc4e732f4e2
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-10-21 14:51:18
brettcsmith@brettcsmith.org
accrual: Add --end option.

For assemble-audit-reports as shown.
2 files changed with 21 insertions and 3 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/accrual.py
Show inline comments
...
 
@@ -669,2 +669,10 @@ fiscal year, to start loading entries from. The default is to load the current,
 
unaudited books.
 
""")
 
    parser.add_argument(
 
        '--end', '--stop', '-e',
 
        dest='stop_date',
 
        metavar='DATE',
 
        type=cliutil.date_arg,
 
        help="""Do not consider entries from this date forward, in YYYY-MM-DD
 
format.
 
""")
...
 
@@ -725,3 +733,8 @@ def main(arglist: Optional[Sequence[str]]=None,
 

	
 
    postings_src = data.Posting.from_entries(entries)
 
    stop_date = args.stop_date or datetime.date(datetime.MAXYEAR, 12, 31)
 
    postings_src: Iterator[data.Posting] = (
 
        posting
 
        for posting in data.Posting.from_entries(entries)
 
        if posting.meta.date < stop_date
 
    )
 
    for rewrite_path in args.rewrite_rules:
...
 
@@ -777,3 +790,3 @@ def main(arglist: Optional[Sequence[str]]=None,
 
            out_bin = cliutil.bytes_output(args.output_file, stdout)
 
            report = AgingReport(rt_wrapper, out_bin)
 
            report = AgingReport(rt_wrapper, out_bin, args.stop_date)
 
            report.ods.set_common_properties(config.books_repo())
conservancy_beancount/tools/audit_report.py
Show inline comments
...
 
@@ -186,3 +186,8 @@ def main(arglist: Optional[Sequence[str]]=None,
 
        (ledger.main, list(common_args('Receipts', next_year, '--receipts'))),
 
        (accrual.main, list(common_args('AgingReport.ods'))),
 
        (accrual.main, list(common_args(f'FY{next_year}AgingReport.ods'))),
 
        (accrual.main, list(common_args(
 
            f'FY{args.audit_year}AgingReport.ods',
 
            None,
 
            f'--end={audit_end.isoformat()}',
 
        ))),
 
        (balance_sheet.main, list(common_args('Summary', args.audit_year))),
0 comments (0 inline, 0 general)