diff --git a/container/src/finance/lib/internal/lib_taxes.bash b/container/src/finance/lib/internal/lib_taxes.bash index db01876..f399e41 100644 --- a/container/src/finance/lib/internal/lib_taxes.bash +++ b/container/src/finance/lib/internal/lib_taxes.bash @@ -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