From 960e51fe0a46c02e91ce0ce9309bd1f06de20f07 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Wed, 22 Oct 2025 12:49:32 -0700 Subject: [PATCH] container: lib_taxes: fix printing for 'all' years --- container/src/finance/lib/internal/lib_taxes.bash | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/container/src/finance/lib/internal/lib_taxes.bash b/container/src/finance/lib/internal/lib_taxes.bash index 0865fa7..0160498 100644 --- a/container/src/finance/lib/internal/lib_taxes.bash +++ b/container/src/finance/lib/internal/lib_taxes.bash @@ -1001,7 +1001,7 @@ function lib_taxes::__taxes_write() local _current_year _current_year="$(date +%Y)" if [ -z "$global_arg_year" ]; then - lib_utils::print_normal "Capturing the year of the oldest tagged record ..." + 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)" [ -z "$_oldest_year" ] && lib_utils::die_fatal "No records available to write" @@ -1025,6 +1025,12 @@ function lib_taxes::__taxes_write() [ -z "$global_child_profile_flow" ] && lib_utils::die_fatal for ((_tax_year = ${_oldest_year}; _tax_year <= ${_current_year}; _tax_year++)); do + if [ -z "$global_arg_year" ]; then + lib_utils::print_custom " \e[32m│\e[0m\n" + lib_utils::print_info "Generating taxable events in year '${_tax_year}' ..." + lib_utils::print_custom " \e[32m│\e[0m\n" + fi + # Final output dir local _tax_root_dir="${global_child_profile_flow}/taxes/${_tax_year}" @@ -1047,7 +1053,7 @@ function lib_taxes::__taxes_write() lib_utils::catch $? if [[ ! -f "$_out_file" || ! -s "$_out_file" ]]; then - lib_utils::print_warning "Nothing generated for '${_arg_tag}' (no taxable event found for the year ${global_arg_year})" + lib_utils::print_warning "Nothing generated for '${_arg_tag}' (no taxable event found for the year ${_tax_year})" fi ) & done