numerus/pkg
jordi fita mas 1c6375b51d Do not give “false ID” to invoice products that come from quotations
When adding “free-form products” to quotes they do not have a product
ID, but i has coalescing the NULL to zero because product_id is an
integer and can not coalesce a nullable integer to an empty string.

However, that causes problems when trying to create the invoice for that
quote, because it tries to add products that have an ID of 0 and the
foreign key, obviously, fail.

At first i modified NewInvoiceProductArray.EncodeBinary to check for
"0" as well as the empty string, but i realized this was wrong: the
problem was because i gave these products an ID when they do not have
any.  And the solution is to cast product_id to a text, which is what
will get converted anyway because i the only thing i do to it is to
store to a string-backed InputForm field.

Closes #73.
2023-08-11 19:47:10 +02:00
..
company.go Create validation function for SQL domains and for phones 2023-07-03 11:31:59 +02:00
contacts.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00
dashboard.go Compute the total amount, base plus taxes, of all expenses 2023-07-13 20:50:26 +02:00
db.go Allow importing contacts from Holded 2023-07-03 00:05:47 +02:00
expenses.go Add option to export the list of quotes, invoices, and expenses to ODS 2023-07-18 13:29:36 +02:00
form.go Add option to export the list of quotes, invoices, and expenses to ODS 2023-07-18 13:29:36 +02:00
htmx.go Use HTMx to add product rows “inline” in the invoice form 2023-04-24 02:00:38 +02:00
invoices.go Do not give “false ID” to invoice products that come from quotations 2023-08-11 19:47:10 +02:00
locale.go Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
logger.go Reduce the amount of useless data in request’s log 2023-06-13 16:05:40 +02:00
login.go Log the remote address, and only trust localhost proxies 2023-06-13 14:21:54 +02:00
ods.go Add option to export the list of quotes, invoices, and expenses to ODS 2023-07-18 13:29:36 +02:00
pgtypes.go Split contact relation into tax_details, phone, web, and email 2023-06-30 21:32:48 +02:00
products.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00
profile.go Create constants for the HTMX request and response headers used 2023-04-06 12:07:20 +02:00
quote.go Add option to export the list of quotes, invoices, and expenses to ODS 2023-07-18 13:29:36 +02:00
recover.go Gofmt recover.go 2023-01-22 20:37:34 +01:00
router.go Compute the total amount, base plus taxes, of all expenses 2023-07-13 20:50:26 +02:00
slug.go Add the customer name to the invoice’s PDF file name 2023-07-07 11:34:34 +02:00
template.go Add the customer name to the invoice’s PDF file name 2023-07-07 11:34:34 +02:00
uuid.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00
uuid_test.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00