From 63f64cae7f986ca768df2648088f3dd2eb15a812 Mon Sep 17 00:00:00 2001 From: pinzutu <170082460+pinzutu@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:19:40 +0000 Subject: [PATCH] Update transactions.py (#120) Increases decimal precision in csv formating --- pytr/transactions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytr/transactions.py b/pytr/transactions.py index e90449b..eaa99ed 100644 --- a/pytr/transactions.py +++ b/pytr/transactions.py @@ -60,9 +60,9 @@ def export_transactions(input_path, output_path, lang="auto"): if not event.is_pp_relevant: continue - amount = format_decimal(event.amount, locale=lang) if event.amount else "" + amount = format_decimal(event.amount, locale=lang, decimal_quantization=False) if event.amount else "" note = (_(event.note) + " - " + event.title) if event.note else event.title - shares = format_decimal(event.shares, locale=lang) if event.shares else "" + shares = format_decimal(event.shares, locale=lang, decimal_quantization=False) if event.shares else "" f.write( csv_fmt.format(