Merge pull request #279 into master

5e8fff81 container: lib_taxes: fix for generating `all` years (`year=all`) (Aaron Fiore)
This commit was merged in pull request #279.
This commit is contained in:
2026-01-28 11:23:21 -08:00

View File

@@ -2,7 +2,7 @@
# 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
# it under the terms of the GNU General Public License as published by
@@ -1003,7 +1003,7 @@ function lib_taxes::__taxes_write()
if [ -z "$global_arg_year" ]; then
lib_utils::print_info "Capturing the year of the oldest tagged record ...\n"
local -r _oldest_year="$("${_base_hledger[@]}" | head -n2 | xan select \"date\" | tail -n1 | cut -d'-' -f1)"
local -r _oldest_year="$("${_base_hledger[@]}" | head -n2 | xan select \"date\" | gawk 'END {gsub(/"/, ""); printf $1}' FS=- OFS=-)"
[ -z "$_oldest_year" ] && lib_utils::die_fatal "No records available to write"
elif [[ "$global_arg_year" -gt "$_current_year" ]]; then