document constant and introduce key for source

This commit is contained in:
Flukx 2022-11-28 15:37:17 +01:00
parent cc840dc1a2
commit 35bfb7af81

View file

@ -14,6 +14,18 @@ import error
import timespan
KEY_WHO = 'other_entity'
"""str: Key for transactions to document who this transaction dealt with.
Usually this is a person or a shop.
Usage: some_transaction[KEY_WHO] = "Bioladen"
"""
KEY_SOURCE = 'source'
"""str: Key for transactions to document where the data comes from (import from
older table, import from bank website, manual typing, ...)
Usage: some_transaction[KEY_SOURCE] = "manual"
"""
def merge_transactions(book: piecash.Book, transactions: Sequence[piecash.Transaction]):