Some minor fixes.

This commit is contained in:
Christoph 2018-07-02 02:42:35 +02:00
parent 89adfefc20
commit b829925258

View File

@ -333,6 +333,15 @@ done < <(find "$src_dir_cash_receipts" -maxdepth 1 -type f -name "rg-${year}-${m
echo echo
found_contract_file=false found_contract_file=false
_month=$(expr $month + 1)
_year=$year
if [[ ${#_month} -eq 1 ]]; then
_month="0${_month}"
elif [[ $_month -eq 13 ]]; then
_month=01
_year=$(expr $_year + 1)
fi
while IFS='' read -r -d '' file || [[ -n $file ]] ; do while IFS='' read -r -d '' file || [[ -n $file ]] ; do
found_contract_file=true found_contract_file=true
echononl "Copy '$(basename $file)' to directory\n '$dir_cash_flow'.." echononl "Copy '$(basename $file)' to directory\n '$dir_cash_flow'.."
@ -343,7 +352,7 @@ while IFS='' read -r -d '' file || [[ -n $file ]] ; do
echo_failed echo_failed
error $(cat $logfile) error $(cat $logfile)
fi fi
done < <(find "$base_dir_cash_flow" -mindepth 1 -maxdepth 1 -type f -name "ServiceVertraege_${year}_Stand-${year}-${month}-*.xlsx" -print0) done < <(find "$base_dir_cash_flow" -mindepth 1 -maxdepth 1 -type f -name "ServiceVertraege_${year}_Stand-${_year}-${_month}-*.xlsx" -print0)