This function is not working properly when filtering transactions made by certain projects.
For example, if we have the following projects and transactions:
Projects:
[
{ id: 1, name: 'Project 1', active: true },
{ id: 2, name: 'Project 2', active: true },
{ id: 3, name: 'Project 3', active: true }
]
Transactions:
[
{
id: 1,
date: '2023-04-29',
description: 'Transaction 1',
value: '1000',
file_path: 'file1.pdf',
has_nif: true,
projects: 'Project 1 / Project 2 / Project 3'
}
]
If we call it to get only the transactions made by Project 1 and Project 2, it returns
[
{
id: 1,
date: '2023-04-29',
description: 'Transaction 1',
value: '1000',
file_path: 'file1.pdf',
has_nif: true,
projects: 'Project 1 / Project 2'
}
]
[
{
id: 1,
date: '2023-04-29',
description: 'Transaction 1',
value: '1000',
file_path: 'file1.pdf',
has_nif: true,
projects: 'Project 1 / Project 2 / Project 3'
}
]