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
2023-01-30 16:42:15 +01:00
2023-01-15 04:08:35 +01:00
Description
No description provided
https://numerus.cat/ 6.5 MiB
v1 Latest
2023-07-03 09:33:09 +00:00
Languages
PLpgSQL 64.2%
Go 21.4%
CSS 11.6%
JavaScript 2%
Scheme 0.7%