diff --git a/pkg/invoices.go b/pkg/invoices.go index 1680464..03e1f3a 100644 --- a/pkg/invoices.go +++ b/pkg/invoices.go @@ -59,7 +59,6 @@ func GetInvoiceForm(w http.ResponseWriter, r *http.Request, params httprouter.Pa form := newInvoiceForm(r.Context(), conn, locale, company) slug := params[0].Value if slug == "new" { - form.Customer.EmptyLabel = gettext("Select a customer to bill.", locale) form.Date.Val = time.Now().Format("2006-01-02") w.WriteHeader(http.StatusOK) mustRenderNewInvoiceForm(w, r, form) @@ -68,6 +67,8 @@ func GetInvoiceForm(w http.ResponseWriter, r *http.Request, params httprouter.Pa } func mustRenderNewInvoiceForm(w http.ResponseWriter, r *http.Request, form *invoiceForm) { + locale := getLocale(r) + form.Customer.EmptyLabel = gettext("Select a customer to bill.", locale) mustRenderAppTemplate(w, r, "invoices/new.gohtml", form) } diff --git a/web/template/invoices/new.gohtml b/web/template/invoices/new.gohtml index ec184ee..432de17 100644 --- a/web/template/invoices/new.gohtml +++ b/web/template/invoices/new.gohtml @@ -34,8 +34,10 @@ {{- end }}