container: lib_taxes: don't attempt to patch non-existent taxable events
An optimization and printing cleanup (attempts to patch won't break)
This commit is contained in:
@@ -1061,10 +1061,6 @@ function lib_taxes::__taxes_write()
|
||||
|
||||
# Patch transparent (full) reports
|
||||
# WARNING: depends on previous base path / extension format # TODO: no, not this way
|
||||
lib_utils::print_custom " \e[32m│\e[0m\n"
|
||||
lib_utils::print_custom " \e[32m│\e[0m\t\e[37;2m ... Applying patches (full) ...\e[0m\n"
|
||||
lib_utils::print_custom " \e[32m│\e[0m\n"
|
||||
|
||||
lib_taxes::__reports_patch
|
||||
lib_utils::catch $?
|
||||
|
||||
@@ -1145,6 +1141,12 @@ function lib_taxes::__reports_patch()
|
||||
local _spends="${_tax_root_dir}/spends/${_tax_year}_spends-${_ext_full}"
|
||||
local _trades="${_tax_root_dir}/trades/${_tax_year}_trades-${_ext_full}"
|
||||
|
||||
[[ ! -s "$_income" && ! -s "$_spends" && ! -s "$_trades" ]] && return 0
|
||||
|
||||
lib_utils::print_custom " \e[32m│\e[0m\n"
|
||||
lib_utils::print_custom " \e[32m│\e[0m\t\e[37;2m ... Applying patches (full) ...\e[0m\n"
|
||||
lib_utils::print_custom " \e[32m│\e[0m\n"
|
||||
|
||||
# Ensure appropriate tags in respective files
|
||||
#
|
||||
# NOTE:
|
||||
|
||||
Reference in New Issue
Block a user