Add count to specify how often a mapping is used

This commit is contained in:
2025-03-02 13:44:43 -05:00
parent 078bf07d0f
commit 35e1c1039e
3 changed files with 22 additions and 42 deletions

View File

@@ -40,8 +40,6 @@ class Config(BaseModel):
categories (List[str]): A list of account2s. An account has to be defined here
before it can be used in a mapping. Otherwise, ledger will complain.
commodities (List[str]): A list of commodities relevant to the data processing.
find_duplicates (bool): Flag to check and abort on duplicated transactions. Not
really useful.
"""
class Config:
@@ -52,7 +50,6 @@ class Config(BaseModel):
output_file: Path = Path("output.ldg")
csv_configs: List[CsvConfig]
categories: List[str]
find_duplicates: bool = False
class Transaction(BaseModel):
@@ -81,5 +78,6 @@ class Mapping(BaseModel):
extra = "forbid"
account2: str
count: int = 1
narration: Optional[str] = None
payee: Optional[str] = None