]> git.plutz.net Git - invoices/blobdiff - invoices.sh
omit empty record lines (again)
[invoices] / invoices.sh
index a1ec2339be82ce4e994d215282a221b5fe01b663..9ed6dfa56388fb2822d3c4129b2212e9c2ae12ac 100755 (executable)
@@ -174,7 +174,7 @@ $({ sed 1d "invoices/$id"; printf 'time= work= hours=\n'; } \
 %s] ]
             [td [textarea name=work
 %s] ]
-            [td [input type=number name=hours value="%.2g" step=any] ]
+            [td [input type=number name=hours value="%g" step=any] ]
             [td %s]
    ]' "$(UNSTRING "${time#time=}" |HTML)" \
       "$(UNSTRING "${work#work=}" |HTML)" \
@@ -276,7 +276,7 @@ update_invoice(){
         printf 'time=%s        work=%s hours=%s\n' \
           "$(POST time $n |STRING)" "$(POST work $n |STRING)" \
           "$(POST hours $n |STRING)" \
-        | grep -xvF 'time=     work=   hours=0'
+        | grep -xvF 'time=\    work=\  hours=0'
       done
     } >"invoices/$id"