SOLVED: Error message when posting a bank entry: "Field 'ref' doesn't have a default value"

I’m getting the error message “Field ‘ref’ doesn’t have a default value” when trying to post a bank entry, here’s a screenshot.

There’s not even a field 'ref" that I could populate.

Here’s the error log:
dolibarr (2).log (487.5 KB)

I noticed that it makes reference to table llx_bank_categ. I checked and the table is empty, which I believe might be the problem, but I don’t know where/ how to fix that.

I’ve also seen this post with exactly the same error message, but it offers no solution.

Could somebody help me out here?

I solved it. The problem was in table “llx_payment_various”, field “ref”: It needs to allow nulls, but in my installation it was set to not nullable.

I wouldn’t make such change easily, but I compared the field settings to a default installation, and there it was set to nullable. I’m not sure why this happened, my hunch is that in an earlier version, it might have been not nullable, and when I upgraded, at some point in my db it wasn’t changed.

1 Like