Changeset - 56bfbe21c4af
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-10-21 14:51:55
brettcsmith@brettcsmith.org
audit_report: Bugfix handling audit year specified as date.
2 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/tools/audit_report.py
Show inline comments
...
 
@@ -129,14 +129,15 @@ def main(arglist: Optional[Sequence[str]]=None,
 
        reports_logger = logging.getLogger('conservancy_beancount.reports')
 
        reports_logger.setLevel(logging.DEBUG)
 
        reports_logger.getChild('rewrite').setLevel(args.loglevel)
 

	
 
    fy = config.fiscal_year_begin()
 
    today = datetime.date.today()
 
    if args.audit_year is None:
 
        args.audit_year = fy.for_date(today) - 1
 
    if not isinstance(args.audit_year, int):
 
        year_offset = 1 if args.audit_year is None else 0
 
        args.audit_year = fy.for_date(args.audit_year) - year_offset
 
    audit_begin = fy.first_date(args.audit_year)
 
    audit_end = fy.next_fy_date(args.audit_year)
 
    if args.end_date is None:
 
        days_diff = (today - audit_end).days
 
        if days_diff < (28 * 2):
 
            args.end_date = today
setup.py
Show inline comments
...
 
@@ -2,13 +2,13 @@
 

	
 
from setuptools import setup
 

	
 
setup(
 
    name='conservancy_beancount',
 
    description="Plugin, library, and reports for reading Conservancy's books",
 
    version='1.12.2',
 
    version='1.12.3',
 
    author='Software Freedom Conservancy',
 
    author_email='info@sfconservancy.org',
 
    license='GNU AGPLv3+',
 

	
 
    install_requires=[
 
        'babel>=2.6',  # Debian:python3-babel
0 comments (0 inline, 0 general)