Skip to content

Commit

Permalink
Merge pull request #126 from QuanMPhm/125/prepay_nerc_total
Browse files Browse the repository at this point in the history
Included projects belonging to MGHPCC-managed groups in the NERC total invoice
  • Loading branch information
knikolla authored Jan 23, 2025
2 parents a848c88 + 30dfb47 commit 30ad66b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion process_report/invoices/NERC_total_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ def output_s3_archive_key(self):
return f"Invoices/{self.invoice_month}/Archive/NERC-{self.invoice_month}-Total-Invoice {util.get_iso8601_time()}.csv"

def _prepare_export(self):
def _lower_col(data):
if data:
return str.lower(data)

self.export_data = self.data[
self.data[invoice.IS_BILLABLE_FIELD] & ~self.data[invoice.MISSING_PI_FIELD]
]
self.export_data = self.export_data[
self.export_data[invoice.INSTITUTION_FIELD].isin(self.INCLUDED_INSTITUTIONS)
].copy()
| (self.export_data[invoice.GROUP_MANAGED_FIELD].apply(_lower_col) == "yes")
]

0 comments on commit 30ad66b

Please sign in to comment.