Keep the invoice number when requesting an update while editing
This commit is contained in:
parent
d8812ba2f1
commit
19f81128ec
|
@ -997,6 +997,8 @@ func HandleEditInvoiceAction(w http.ResponseWriter, r *http.Request, params http
|
||||||
slug := params[0].Value
|
slug := params[0].Value
|
||||||
actionUri := fmt.Sprintf("/invoices/%s/edit", slug)
|
actionUri := fmt.Sprintf("/invoices/%s/edit", slug)
|
||||||
handleInvoiceAction(w, r, actionUri, func(w http.ResponseWriter, r *http.Request, form *invoiceForm) {
|
handleInvoiceAction(w, r, actionUri, func(w http.ResponseWriter, r *http.Request, form *invoiceForm) {
|
||||||
|
conn := getConn(r)
|
||||||
|
form.Number = conn.MustGetText(r.Context(), "", "select invoice_number from invoice where slug = $1", slug)
|
||||||
mustRenderEditInvoiceForm(w, r, slug, form)
|
mustRenderEditInvoiceForm(w, r, slug, form)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue