-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Although, it is not good to allow inactive billing accounts to be associated with a project but we might need to allow syncing the old billing account. Right now at
| directAccessIds = await connection.queryAsync(`select p.project_id as id from time_oltp:project as p left join time_oltp:client_project as cp on p.project_id = cp.project_id left join time_oltp:client c on c.client_id = cp.client_id and (c.is_deleted = 0 or c.is_deleted is null) where p.active = 1 and p.start_date <= current and current <= p.end_date and p.active = 1 and p.project_id in (SELECT distinct project_id FROM time_oltp:project_manager p, time_oltp:user_account u WHERE p.user_account_id = u.user_account_id and p.active = 1 and upper(u.user_name) = upper('${userName}') union SELECT distinct project_id FROM time_oltp:project_worker p, time_oltp:user_account u WHERE p.start_date <= current and current <= p.end_date and p.active =1 and p.user_account_id = u.user_account_id and upper(u.user_name) = upper('${userName}'))`) |
where p.active = 1 and p.start_date <= current and current <= p.end_date and p.active = 1 as filter which is correct theoretically but I can see some of our API callers might be trying to associate a billing account which has ended because they might get that billing account renewed soon.
We don't need to start working on it yet.
Metadata
Metadata
Assignees
Labels
No labels