X-Git-Url: https://git.plutz.net/?p=invoices;a=blobdiff_plain;f=invoices.sh;fp=invoices.sh;h=c21fe4fe3b597c8cf42b31ca570d1813ea653498;hp=93292cbee74a31f0b69613940c8a4bc72b215712;hb=2be8dad1ce4b7b9915488511f5c43a1ad7788f8f;hpb=95445a19d5a6dc3133a3e539e1c012425149a401 diff --git a/invoices.sh b/invoices.sh index 93292cb..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"