numerus/web/template
jordi fita mas 6c3a3ff232 Allow empty contact and payment method for quotes
I have to use a value to be used as “none” for payment method and
contact.  In PL/pgSQL add_quote and edit_quote functions, that value is
NULL, while in forms it is the empty string.  I can not simply pass the
empty string for either of these fields because PL/pgSQL expects
(nullable) integers, and "" is not a valid integer and is not NULL
either.  A conversion is necessary.

Apparently, Go’s nil is not a valid representation for SQL’s NULL with
pgx, and had to use sql.NullString instead.

I also needed to coalesce contact’s VATIN and phone, because null values
can not be scanned to *string.  I did not do that before because
`coalesce(vatin, '')` throws an error that '' is not a valid VATIN and
just left as is, wrongly expecting that pgx would do the job of leaving
the string blank for me.  It does not.

Lastly, i can not blindly write Quotee’s tax details in the quote’s view
page, or we would see the (), characters for the empty address info.
2023-06-08 13:05:41 +02:00
..
contacts Use “Save” for all submit buttons of new/edit forms 2023-05-26 13:38:04 +02:00
expenses Use “Save” for all submit buttons of new/edit forms 2023-05-26 13:38:04 +02:00
invoices Use HTMx to delete and restore invoice products 2023-05-29 00:01:11 +02:00
products Use “Save” for all submit buttons of new/edit forms 2023-05-26 13:38:04 +02:00
quotes Allow empty contact and payment method for quotes 2023-06-08 13:05:41 +02:00
tags Add inline tag form for expenses 2023-05-08 12:58:54 +02:00
app.gohtml Add HTTP controller and view to add quotes 2023-06-07 16:35:31 +02:00
dashboard.gohtml Wrap filter buttons with <noscript> 2023-05-23 14:34:46 +02:00
form.gohtml Add HTTP controller and view to add quotes 2023-06-07 16:35:31 +02:00
login.gohtml Use a “proper” struct for the login form 2023-02-01 11:02:32 +01:00
main.gohtml Add the <title> element for the “main” boosted pages 2023-03-26 13:57:24 +02:00
modal.gohtml Show the profile form in a dialog using HTMx 2023-03-20 13:09:52 +01:00
profile.gohtml Boost all breadcbrumb links 2023-04-02 16:10:13 +02:00
standalone.gohtml Allow editing invoice tags inline from the index table 2023-04-11 10:46:27 +02:00
tax-details.gohtml Allow to change the current year’s invoice number counter 2023-05-31 20:01:00 +02:00
web.gohtml Add custom function to get the current locale from templates 2023-01-31 15:45:51 +01:00