Error when update an expense

When i try ti edit an expense, wich was imported from V4 to V5, i get this error
Error expenses

Greetz, Koen


Do you see the selected client on the expense edit screen?

Hi Hillel,

I don’t have clients on my expenses.

Thanks! Can you please use the network tab in the browser console to see what values is being passed up in the client_id field?

@david do you have any ideas?

Hi Hillel,
Do yu mean this?


Is it possible this client was deleted in v4?

@david does the migration include deleted records?

Hi Hillel…

I looked into the table expenses…
Most of the records have client_id “NULL” but some of them has 40.
This number is not in the clients table.

Hillel, i didn’t do a migration.

I exported all the data and imported it into V5.
Did also a lot manual again.
I had a problem with the database, could not save any settings.

Have you made any manual changes to the database?

No… just looked at it…

It’s only with expense wich are imported… the new added expenses are Ok.

Ok, @david may have some ideas

it is possible the expense has been connected to a client that was previously deleted?

Hi David,

I looked into the table…
The ones i have problems with are the ones in imported from V4 to V5, not migrated.
Some of them have a client_id of 40 wich doesn’t excist in the client table, but others have client_id “NULL” and give the same problem.
Even if i select a client name in the expense i get the same error.
New added in V5 are OK.


I’m not sure, having null for a client_id is a valid state for an expense.

Do you have any projects linked to these expenses? i think the problem may be there. In this view i don’t see the project field at all.

Hi David,
I don’t use projects.

Problem solved.
I did not exported projects on V4.

Error records where linked to project_id “1”
Set all to “Null” and replaced client_id with “NULL” because they where linked to an unavaiulable client number.