@@ -54,6 +54,9 @@ def test_path(s):
s = TESTS_DIR / s
return s
def Amount(number, currency='USD'):
return bc_amount.Amount(Decimal(number), currency)
def Posting(account, number,
currency='USD', cost=None, price=None, flag=None,
**meta):
@@ -68,6 +71,13 @@ def Posting(account, number,
meta,
)
NON_STRING_METADATA_VALUES = [
Decimal(5),
FY_MID_DATE,
Amount(50),
Amount(500, None),
]
class Transaction:
def __init__(self,
date=FY_MID_DATE, flag='*', payee=None,