generated from felixm/defaultpy
Implement numpy based prediction feature
This commit is contained in:
@@ -6,8 +6,8 @@ from toldg.utils import category_to_bean
|
||||
|
||||
BEANCOUNT_TRANSACTION_TEMPLATE = """
|
||||
{t.date} * {description}{tags}
|
||||
{t.account2:<40} {t.debit:<6} {t.currency}
|
||||
{t.account1:<40} {t.credit:<6} {t.currency}
|
||||
{account2:<40} {t.debit:<6} {t.currency}
|
||||
{account1:<40} {t.credit:<6} {t.currency}
|
||||
"""
|
||||
|
||||
|
||||
@@ -40,13 +40,15 @@ def format(t):
|
||||
if not t.credit.startswith("-"):
|
||||
t.credit = " " + t.credit
|
||||
|
||||
t.account1 = category_to_bean(t.account1)
|
||||
t.account2 = category_to_bean(t.account2)
|
||||
if t.currency == "EUR":
|
||||
t.debit = t.debit.replace(".", "|").replace(",", ".").replace("|", ",")
|
||||
t.credit = t.credit.replace(".", "|").replace(",", ".").replace("|", ",")
|
||||
return BEANCOUNT_TRANSACTION_TEMPLATE.format(
|
||||
t=t, description=description, tags=tags
|
||||
t=t,
|
||||
description=description,
|
||||
tags=tags,
|
||||
account1=category_to_bean(t.account1),
|
||||
account2=category_to_bean(t.account2),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user