create_monthly_cash_flow.sh: add pdf-file for monthly transaction vloumes.

This commit is contained in:
Christoph 2018-12-31 14:04:40 +01:00
parent b829925258
commit 8266e04fb4

View File

@ -309,6 +309,21 @@ else
echo_skipped echo_skipped
fi fi
found_bank_transaction=false
echononl "Copy '${src_dir_bank_statement}/Umsatz-${month}-${year_short}.pdf' \n to directory '$dir_cash_flow'.."
if [[ -f "${src_dir_bank_statement}/Umsatz-${month}-${year_short}.pdf" ]]; then
found_bank_transaction=true
cp -a "${src_dir_bank_statement}/Umsatz-${month}-${year_short}.pdf" "$dir_cash_flow/" > $logfile 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else
echo_failed
error $(cat $logfile)
fi
else
echo_skipped
fi
# --- # ---
# - Cash flow receipts # - Cash flow receipts
# --- # ---
@ -419,6 +434,9 @@ fi
if ! $found_cash_receipts ; then if ! $found_cash_receipts ; then
warn "No cash flow receipts (Einnahmen) found." warn "No cash flow receipts (Einnahmen) found."
fi fi
if ! $found_bank_transaction ; then
error "No transaction volumes found."
fi
if ! $found_bank_statement ; then if ! $found_bank_statement ; then
error "No bank statement file found." error "No bank statement file found."
else else