]> git.plutz.net Git - invoices/commitdiff
taxation modes, translations
authorPaul Hänsch <paul@plutz.net>
Fri, 10 Nov 2023 00:17:19 +0000 (01:17 +0100)
committerPaul Hänsch <paul@plutz.net>
Fri, 10 Nov 2023 00:17:19 +0000 (01:17 +0100)
invoices.sh

index 0fc3a7ec8be702d076f863621b602df206b24b23..11031747fb0429aa301f4552e180d731c1dce2e8 100755 (executable)
@@ -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"]
        
          <!--
@@ -158,12 +158,14 @@ edit_invoice(){
 
          [radio "vat" "smallbusiness" #vatsb $([ "${vat#vat=}" = smallbusiness ] && printf checked) ]
          [label for=vatsb Small business exemption from VAT]
+         -->
+         [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')"