From ba6f51ac5dcb14631b32f37b77cd190315a598ea Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Thu, 8 Jun 2023 12:50:16 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20getting=20quote=E2=80=99s=20terms=20and?= =?UTF-8?q?=20conditions=20from=20form=20and=20database?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/quote.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/quote.go b/pkg/quote.go index 858d344..c139349 100644 --- a/pkg/quote.go +++ b/pkg/quote.go @@ -620,6 +620,7 @@ func (form *quoteForm) Parse(r *http.Request) error { form.QuoteStatus.FillValue(r) form.Customer.FillValue(r) form.Date.FillValue(r) + form.TermsAndConditions.FillValue(r) form.Notes.FillValue(r) form.Tags.FillValue(r) form.PaymentMethod.FillValue(r) @@ -745,6 +746,7 @@ func (form *quoteForm) MustFillFromDatabase(ctx context.Context, conn *Conn, slu , contact_id , quote_number , quote_date + , terms_and_conditions , notes , payment_method_id , tags @@ -752,7 +754,7 @@ func (form *quoteForm) MustFillFromDatabase(ctx context.Context, conn *Conn, slu left join quote_contact using (quote_id) left join quote_payment_method using (quote_id) where slug = $1 - `, slug).Scan("eId, form.QuoteStatus, form.Customer, &form.Number, form.Date, form.Notes, form.PaymentMethod, form.Tags)) { + `, slug).Scan("eId, form.QuoteStatus, form.Customer, &form.Number, form.Date, form.TermsAndConditions, form.Notes, form.PaymentMethod, form.Tags)) { form.PaymentMethod.Selected = selectedPaymentMethod form.QuoteStatus.Selected = selectedQuoteStatus return false