Go to file
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
cmd/numerus Implement login cookie, its verification, and logout 2023-01-17 20:58:13 +01:00
debian Convert invoices to PDF with WeasyPrint 2023-02-26 17:26:09 +01:00
demo Replace tag relations with array attributes 2023-04-07 21:31:35 +02:00
deploy Added SQL views to compute computations amounts and edit them 2023-06-07 15:31:20 +02:00
pkg Allow empty contact and payment method for quotes 2023-06-08 13:05:41 +02:00
po Allow empty contact and payment method for quotes 2023-06-08 13:05:41 +02:00
revert Added SQL views to compute computations amounts and edit them 2023-06-07 15:31:20 +02:00
test Added SQL views to compute computations amounts and edit them 2023-06-07 15:31:20 +02:00
verify Added SQL views to compute computations amounts and edit them 2023-06-07 15:31:20 +02:00
web Allow empty contact and payment method for quotes 2023-06-08 13:05:41 +02:00
.gitignore Ignore IntelliJ’s project files 2023-01-30 16:42:15 +01:00
COPYING Rename LICENSE to COPYING 2023-01-15 04:08:35 +01:00
Makefile Rename extension of templates to .gohtml 2023-01-30 16:48:21 +01:00
go.mod Properly register array and composite PostgreSQL types with pgtype 2023-02-20 11:42:21 +01:00
go.sum Fix use of API methods not available in Go 1.16 2023-02-13 10:32:26 +01:00
sqitch.conf Setup authentication schema and user relation 2023-01-13 20:30:21 +01:00
sqitch.plan Added SQL views to compute computations amounts and edit them 2023-06-07 15:31:20 +02:00