-Subproject commit 2638ffcf8dc901606f3cdb249fab75e14ca47875
+Subproject commit 506e2f9f146c13919e65a9bbbd844391b96bbe9d
"$(HTML $id)" \
"$(UNSTRING "${address#address=}" |HTML)" \
"$(UNSTRING "${hourly#hourly=}" |grep -xE '[0-9]+')" \
- "$(tid "clients/$id")"
+ "$(transid "clients/$id")"
}
list_clients(){
update_client(){
local id="$(POST id |checkid)"
- if [ "$(POST update)" = "$(tid "clients/$id")" ]; then
+ if [ "$(POST update)" = "$(transid "clients/$id")" ]; then
mkdir -p clients
printf 'address=%s hourly=%s' \
"$(POST address |STRING)" "$(POST hourly |STRING)" \
EOF
}
-tid(){
- # transaction ID to modify a given file
- local file="$1"
- { stat -c %F%i%n%N%s%Y "$file" 2>&-
- printf %s "$SESSION_ID"
- server_key
- } | sha256sum | cut -d\ -f1
-}
-
-info="$(PATH "${PATH_INFO}")"
+info="$(PATH "${PATH_INFO#http://*/}")"
which git && [ ! -d .git ] && {
git init
&& 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
]' \
"$(HTML $id)" "$(HTML "${address}")" \
"$(HTML "${iban}")" "$(HTML "${bic}")" \
- "$(tid "senders/$id")"
+ "$(transid "senders/$id")"
}
list_senders(){
update_sender(){
id="$(POST id |checkid)"
- if [ "$(POST update)" = "$(tid "senders/$id")" ]; then
+ if [ "$(POST update)" = "$(transid "senders/$id")" ]; then
mkdir -p senders
printf 'address=%s iban=%s bic=%s\n' \
$(POST address |STRING) $(POST iban |STRING) \