forked from EvergreenCrypto/docker-finance
container: hledger-flow: remove potential % interpretation (printf)
Removes potential interpretation of percent signs in various types of descriptions/notes/labels (otherwise, import may break). Resolves "fatal: not enough arguments to satisfy format string" under certain conditions.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# docker-finance | modern accounting for the power-user
|
||||
#
|
||||
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||
# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -72,7 +72,10 @@ function parse()
|
||||
printf $6 OFS # Fee
|
||||
printf $7 OFS # Fee unit
|
||||
printf $8 OFS # Address
|
||||
|
||||
sub(/%/, "%%", $9)
|
||||
printf $9 OFS # Label
|
||||
|
||||
printf("%.8f", $10); printf OFS # Amount # TODO: more than 8 places for Ethereum, etc.?
|
||||
printf $11 OFS # Amount unit
|
||||
printf $12 OFS # Fiat (USD)
|
||||
|
||||
Reference in New Issue
Block a user