Revise get_new_project_invoice_line_items (See PR #230) to use organizational data to determine if we should charge DSO Shands customers the $215, external non-profit rate.
ctsi_rcc_billing.org_hierarchies will tell you DEPT_IDs have string::str_detect(dept_name, "DSO-SHANDS"). ctsi_rcc_billing.person_org will tell you which people are in which organization. The orgs of interest all have this pattern:
SELECT * FROM org_hierarchies
where
DEPT_ID like '9501%';
So you can filter for people that work for UF Health Shands like this:
SELECT * FROM ctsi_rcc_billing.person_org
where
primary_uf_fiscal_org like '9501%';
Any PI/Owner who has stringr::str_starts(primary_uf_fiscal_org, "9501") should be charged the $215/hour (or $215/project) rate
Revise
get_new_project_invoice_line_items
(See PR #230) to use organizational data to determine if we should charge DSO Shands customers the $215, external non-profit rate.ctsi_rcc_billing.org_hierarchies
will tell you DEPT_IDs havestring::str_detect(dept_name, "DSO-SHANDS")
.ctsi_rcc_billing.person_org
will tell you which people are in which organization. The orgs of interest all have this pattern:So you can filter for people that work for UF Health Shands like this:
Any PI/Owner who has
stringr::str_starts(primary_uf_fiscal_org, "9501")
should be charged the $215/hour (or $215/project) rate