forked from EvergreenCrypto/docker-finance
container: hledger-flow: discover: credit: remove comma(s) from description
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# docker-finance | modern accounting for the power-user
|
# docker-finance | modern accounting for the power-user
|
||||||
#
|
#
|
||||||
# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
# Copyright (C) 2021-2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -48,8 +48,10 @@ function parse_credit()
|
|||||||
printf $1 OFS # Trans. Date
|
printf $1 OFS # Trans. Date
|
||||||
printf $2 OFS # Post Date
|
printf $2 OFS # Post Date
|
||||||
|
|
||||||
sub(/%/, "%%", $3)
|
# Description
|
||||||
printf $3 OFS # Description
|
gsub(/, /, " ") # may have comma(s) followed by space
|
||||||
|
sub(/%/, "%%", $3) # remove potential interpretation
|
||||||
|
printf $3 OFS
|
||||||
|
|
||||||
# Flip the amount signs for proper liabilities accounting
|
# Flip the amount signs for proper liabilities accounting
|
||||||
direction=($4 > 0 ? "OUT" : "IN")
|
direction=($4 > 0 ? "OUT" : "IN")
|
||||||
|
|||||||
Reference in New Issue
Block a user