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.
Description
v1
Latest
Languages
PLpgSQL
64.2%
Go
21.4%
CSS
11.6%
JavaScript
2%
Scheme
0.7%