Changeset - 0e35f16853ac
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-06-24 14:13:41
brettcsmith@brettcsmith.org
tests: Extend fund report input.

This lays the groundwork to test both the opening balances generator,
and additional account breakdowns on the fund report.
2 files changed with 58 insertions and 23 deletions:
0 comments (0 inline, 0 general)
tests/books/fund.beancount
Show inline comments
 
; This input is used to test both the fund report
 
; and the opening balances tool.
 

	
 
option "inferred_tolerance_default" "USD:0.01"
 

	
 
2018-01-01 open Assets:Checking
 
2018-01-01 open Assets:EUR
 
2018-01-01 open Assets:Prepaid:Expenses
 
2018-01-01 open Assets:Receivable:Accounts
 
2018-01-01 open Equity:Funds:Restricted
...
 
@@ -5,5 +12,6 @@ option "inferred_tolerance_default" "USD:0.01"
 
2018-01-01 open Equity:Realized:CurrencyConversion
 
2018-01-01 open Assets:Checking
 
2018-01-01 open Expenses:Other
 
2018-01-01 open Income:Other
 
2018-01-01 open Liabilities:Payable:Accounts
 
2018-01-01 open Liabilities:UnearnedIncome
 

	
...
 
@@ -20,21 +28,26 @@ option "inferred_tolerance_default" "USD:0.01"
 

	
 
2018-03-03 * "Conservancy income 2018"
 
2018-03-03 * "Conservancy receivable 2018"
 
  project: "Conservancy"
 
  Income:Other    -40 USD
 
  Assets:Checking  40 USD
 
  Income:Other               -32 EUR {1.25 USD}
 
  Assets:Receivable:Accounts  32 EUR {1.25 USD}
 

	
 
2018-03-06 * "Conservancy expense 2018"
 
2018-03-06 * "Conservancy payable 2018"
 
  project: "Conservancy"
 
  Expenses:Other    4 USD
 
  Assets:Checking  -4 USD
 
  Expenses:Other                 4 USD
 
  Liabilities:Payable:Accounts  -4 USD
 

	
 
2018-06-03 * "Alpha income 2018A"
 
2018-06-03 * "Alpha income 2018"
 
  project: "Alpha"
 
  Income:Other    -30 USD
 
  Assets:Checking  30 USD
 
  Income:Other    -60 USD
 
  Assets:Checking  60 USD
 

	
 
2018-06-06 * "Alpha income 2018B"
 
2018-06-06 * "Alpha unearned income"
 
  project: "Alpha"
 
  Income:Other    -30 USD
 
  Assets:Checking  30 USD
 
  Liabilities:UnearnedIncome  -30 USD
 
  Assets:Checking              30 USD
 

	
 
2018-06-09 * "Alpha prepaid expense"
 
  project: "Alpha"
 
  Assets:Prepaid:Expenses  20 USD
 
  Assets:Checking         -20 USD
 

	
...
 
@@ -45,5 +58,16 @@ option "inferred_tolerance_default" "USD:0.01"
 

	
 
2019-03-03 * "Conservancy income 2019"
 
2019-03-03 * "Conservancy receivable paid"
 
  project: "Conservancy"
 
  Income:Other    -44 EUR {1.0 USD}
 
  Assets:Receivable:Accounts  -32 EUR {1.25 USD} @ 1.5 USD
 
  Assets:EUR                   32 EUR {1.5 USD}
 
  Equity:Realized:CurrencyConversion
 

	
 
2019-03-06 * "Conservancy payable paid"
 
  project: "Conservancy"
 
  Liabilities:Payable:Accounts  4 USD
 
  Assets:Checking              -4 USD
 

	
 
2019-03-12 * "Conservancy income 2019"
 
  project: "Conservancy"
 
  Income:Other    -28 EUR {1.5 USD}
 
  Assets:Checking  40 USD
...
 
@@ -51,5 +75,5 @@ option "inferred_tolerance_default" "USD:0.01"
 

	
 
2019-03-06 * "Conservancy expense 2019"
 
2019-03-15 * "Conservancy expense 2019"
 
  project: "Conservancy"
 
  Expenses:Other    4.40 EUR {1.0 USD}
 
  Expenses:Other    2.80 EUR {1.5 USD}
 
  Assets:Checking  -4.00 USD
...
 
@@ -57,3 +81,13 @@ option "inferred_tolerance_default" "USD:0.01"
 

	
 
2019-06-03 * "Alpha expense 2019A"
 
2019-06-06 * "Alpha unearned income converted"
 
  project: "Alpha"
 
  Liabilities:UnearnedIncome  30 USD
 
  Income:Other               -30 USD
 

	
 
2019-06-09 * "Alpha prepaid expense converted"
 
  project: "Alpha"
 
  Assets:Prepaid:Expenses  -20 USD
 
  Expenses:Other            20 USD
 

	
 
2019-06-12 * "Alpha expense 2019A"
 
  project: "Alpha"
...
 
@@ -62,3 +96,3 @@ option "inferred_tolerance_default" "USD:0.01"
 

	
 
2019-06-06 * "Alpha expense 2019B"
 
2019-06-15 * "Alpha expense 2019B"
 
  project: "Alpha"
tests/test_reports_fund.py
Show inline comments
...
 
@@ -55,5 +55,5 @@ BALANCES_BY_YEAR = {
 
    ('Conservancy', 2019): [
 
        ('Income:Other', 44),
 
        ('Expenses:Other', Decimal('-4.40')),
 
        ('Equity:Realized:CurrencyConversion', Decimal('-3.60')),
 
        ('Income:Other', 42),
 
        ('Expenses:Other', Decimal('-4.20')),
 
        ('Equity:Realized:CurrencyConversion', Decimal('6.20')),
 
    ],
...
 
@@ -63,3 +63,4 @@ BALANCES_BY_YEAR = {
 
    ('Alpha', 2019): [
 
        ('Expenses:Other', -6),
 
        ('Income:Other', 30),
 
        ('Expenses:Other', -26),
 
    ],
0 comments (0 inline, 0 general)