X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=invoices.sh;h=c21fe4fe3b597c8cf42b31ca570d1813ea653498;hb=2be8dad1ce4b7b9915488511f5c43a1ad7788f8f;hp=aa66717c115f641bad3fe58c9365e29a606e8b5f;hpb=1d50621aa549b7a5c673a72de1dc74f368a5c58a;p=invoices diff --git a/invoices.sh b/invoices.sh index aa66717..c21fe4f 100755 --- a/invoices.sh +++ b/invoices.sh @@ -238,6 +238,11 @@ update_invoice(){ | grep -xvF 'time= work= hours=0' done } >"invoices/$id" + + [ -d .git ] && { + git add "invoices/$id" + git commit -m 'Update invoice info for "'"$(POST number)"'"' -- "invoices/$id" + } >/dev/null fi if [ "$(POST genpdf)" ]; then read -r sender client date x<"invoices/$id" @@ -246,7 +251,7 @@ update_invoice(){ filename="Rechnung $(UNSTRING "${saddress#address=}" |sed 1q) an $(UNSTRING "${caddress#address=}" |sed 1q) $(date -d@"${date#date=}" +%F).pdf" . $_EXEC/odtgen.sh - pdfgen "$id" + genpdf "$id" REDIRECT "/export/${id}.pdf/$(URL "${filename}" |sed s/%0D//g)" exit 0 fi