printf 'address=%s hourly=%s' \
"$(POST address |STRING)" "$(POST hourly |STRING)" \
>"clients/$id"
+
+ [ -d .git ] && {
+ git add "clients/$id"
+ git commit -m 'Update client info for "'"$(POST address |sed 1q)"'"' -- "clients/$id"
+ } >/dev/null
+
REDIRECT "/clients/"
else
error Invalid Data "$id" "$(POST update)"
info="$(PATH "${PATH_INFO}")"
+which git && [ ! -d .git ] && {
+ git init
+ mkdir -p clients/ invoices/ senders/
+ printf 'export/
+serverkey' >.gitignore
+ git add clients/ invoices/ senders/ .gitignore
+ git commit -m 'initialisation of invoice repo'
+} >&2
+
case $info in
/invoices.css)
. "$_EXEC/cgilite/file.sh"
| 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"
printf 'address=%s iban=%s bic=%s\n' \
$(POST address |STRING) $(POST iban |STRING) \
$(POST bic |STRING) >"senders/$id"
+
+ [ -d .git ] && {
+ git add "senders/$id"
+ git commit -m 'Update sender info for "'"$(POST address |sed 1q)"'"' -- "senders/$id"
+ } >/dev/null
+
REDIRECT "/senders/"
else
REDIRECT "/senders/$id"