From 35bfb7af817a93ab2d308f23fcdacbc0b0d6d7c6 Mon Sep 17 00:00:00 2001 From: Flukx Date: Mon, 28 Nov 2022 15:37:17 +0100 Subject: [PATCH] document constant and introduce key for source --- src/database.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/database.py b/src/database.py index a210fc9..1efe8b3 100644 --- a/src/database.py +++ b/src/database.py @@ -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]):