Skip to content

Allowing inactive billing account to be associated with a project #14

@vikasrohit

Description

@vikasrohit

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}'))`)
we have 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions