]> git.plutz.net Git - invoices/blobdiff - invoices.cgi
change table width, accept manual line breaks
[invoices] / invoices.cgi
index 76d989a0dffbee3c28ebb490dafcdba04c15d8c3..674da890ab8e2911bf6a685277bfec2337f1bcbc 100755 (executable)
@@ -24,16 +24,7 @@ printf 'Content-Type: text/html; charset=utf-8\r\n\r\n'
 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
@@ -49,7 +40,7 @@ case $info in
     . "$_EXEC/cgilite/file.sh"
     FILE "$_EXEC/invoices.css"
     ;;
-  /clients)
+  /clients|/clients/)
     . "$_EXEC/clients.sh"
     { list_clients
       printf '[a .new href="/clients/%s" New]' "$(timeid)"
@@ -63,7 +54,7 @@ case $info in
     . "$_EXEC/clients.sh"
     update_client
     ;;
-  /senders)
+  /senders|/senders/)
     . "$_EXEC/senders.sh"
     { list_senders
       printf '[a .new href="/senders/%s" New]' "$(timeid)"
@@ -77,10 +68,10 @@ case $info in
     . "$_EXEC/senders.sh"
     update_sender
     ;;
-  /invoices)
+  /invoices|/invoices/)
     . "$_EXEC/invoices.sh"
-    { list_invoices
-      printf '[a .new href="/invoices/%s" New]' "$(timeid)"
+    { printf '[a .new href="/invoices/%s" New]' "$(timeid)"
+      list_invoices
     } | yield_page invoices
     ;;
   /invoices/*)