&& hourly="${hourly#hourly=}" \
|| hourly="${chourly}"
- tid="$(tid "invoices/$id")"
+ tid="$(transid "invoices/$id")"
read -r taxtype nett tax gross x<<-EOF
$(invoice_total "$id")
update_invoice(){
local id="$(POST id |checkid)" extra=0 tid
- tid="$(tid invoices/$id)"
+ tid="$(transid invoices/$id)"
if [ "$(POST update)" = "$tid" ] || [ "$(POST genpdf)" = "$tid" ]; then
mkdir -p invoices
| 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"