From f64a26df85125b749259cf69b7591975e1fdb121 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 10 Nov 2023 01:17:19 +0100 Subject: [PATCH] taxation modes, translations --- invoices.sh | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/invoices.sh b/invoices.sh index 0fc3a7e..1103174 100755 --- a/invoices.sh +++ b/invoices.sh @@ -136,20 +136,20 @@ edit_invoice(){ [form method="POST" action="/update_invoice" [hidden "id" "$(HTML "$id")"] - [label Sender:] + [label Absender:] [select name=sender $(sender_list "${sender#sender=}") ] - [label Client:] + [label Klient:] [select name=client $(client_list "${client#client=}") ] - [label for=number Invoice Number:] + [label for=number Rechnungsnummer:] [input #number name=number value="$(UNSTRING "${number}" |HTML)"] - [label for=date Date:] + [label for=date Datum:] [input #date name=date value="${date}" placeholder="YYYY-MM-TT"] + [radio "vat" "youthwork" #vatyw $([ "${vat#vat=}" = youthwork ] && printf checked) ] + [label for=vatyw Umsatzsteuerbefreiung für Jugendhilfe, §4 Abs. 25 UStG.] [radio "vat" "nett" #vatnett $([ "${vat#vat=}" = nett ] && printf checked)] - [label for=vatnett Nett] + [label for=vatnett Netto] [radio "vat" "gross" #vatgross $([ "${vat#vat=}" = gross ] && printf checked)] - [label for=vatgross Gross] - [label for=vatrate VAT Rate: [input type=number name="vatrate" value="${vatrate}"]% ] - --> + [label for=vatgross Brutto] + [label for=vatrate USt.: [input type=number name="vatrate" value="${vatrate}"]% ] [table [tr [th Stück] [th Leistung] [th Stückpreis] [th Summe] ] @@ -185,23 +187,23 @@ $({ sed 1d "invoices/$id"; printf 'time= work= hours=\n'; } \ ) [tr [td colspan=4 $(case $taxtype in - (nett) printf 'Sum: %7.2f €[br] + VAT: %7.2f €[br] [strong Total:] %7.2f €' \ + (nett) printf 'Summe: %7.2f €[br] + USt.: %7.2f €[br] [strong Gesamt:] %7.2f €' \ $nett $tax $gross ;; - (gross) printf '[strong Total:] %7.2f €[br] incl. nett: %7.2f €[br] + VAT: %7.2f €' \ + (gross) printf '[strong Gesamt:] %7.2f €[br] incl. nett: %7.2f €[br] + USt.: %7.2f €' \ $gross $nett $tax ;; - (*) printf '[strong Total:] %.2f €' $nett ;; + (*) printf '[strong Gesamt:] %.2f €' $nett ;; esac) ]] ] [select name=status - [option value=open $( [ $status = open ] && printf selected=selected ) Open] - [option value=sent $( [ $status = sent ] && printf selected=selected ) Sent] - [option value=resent $( [ $status = resent ] && printf selected=selected ) Resent] - [option value=paid $( [ $status = paid ] && printf selected=selected ) Paid] - [option value=cancelled $( [ $status = cancelled ] && printf selected=selected ) Cancelled] + [option value=open $( [ $status = open ] && printf selected=selected ) Offen] + [option value=sent $( [ $status = sent ] && printf selected=selected ) Verschickt] + [option value=resent $( [ $status = resent ] && printf selected=selected ) Erinnert] + [option value=paid $( [ $status = paid ] && printf selected=selected ) Gezahlt] + [option value=cancelled $( [ $status = cancelled ] && printf selected=selected ) Storniert] ] - [submit "genpdf" "$tid" Export PDF] - [submit "update" "$tid" Update] + [submit "genpdf" "$tid" PDF Exportieren] + [submit "update" "$tid" Aktualisieren] ] EOF } @@ -267,7 +269,7 @@ update_invoice(){ "$(POST sender)" "$(POST client)" \ "$(date -d "$(POST date)" +%s)" \ "$(POST number |STRING)" \ - "$(POST vat |grep -m1 -xE 'smallbusiness|gross|nett')" \ + "$(POST vat |grep -m1 -xE 'smallbusiness|youthwork|gross|nett')" \ "$(POST vatrate |grep -m1 -xE '[0-9]+')" \ "$(POST hourly |grep -m1 -xE '[0-9]+')" \ "$(POST status |grep -m1 -xE 'open|sent|resent|paid|cancelled')" -- 2.39.5