Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added invoice flowchart and updated README #76

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

The processing script `process_report.py` takes in the monthly invoices and goes through several processing and exporting steps:
1. Combines all provided invoices (more info below)
2. Obtain each PI's institution name
3. Exports the list of non-billable projects (more info below)
4. Apply the New PI credit (more info below)
5. Exports the billable projects as one csv, by PI, for HU PIs only, for HU and BU PIs, and for projects with Lenovo SU Types
2. Check for PI aliases in invoices
3. Obtain each PI's institution name
4. Exports the non-billable invoice (more info below) and Lenovo invoice
5. Apply the New PI credit (more info below)
6. Exports the billable invoice
7. Export the HU-BU invoice, PI-specific invoice, and the BU Internal invoice which applies the BU subsidy

The flowchart below summarizes the invoices being created and their dependencies:

![invoice flowchart](invoice_flowchart.jpg)

The CSV invoices must at least contain the following headers:
- Invoice Month
Expand All @@ -17,12 +23,14 @@ The CSV invoices must at least contain the following headers:
- Cost

```
usage: process_report.py [-h] --pi-file PI_FILE --projects-file PROJECTS_FILE --timed-projects-file TIMED_PROJECTS_FILE [--output-file OUTPUT_FILE]
[--output-folder OUTPUT_FOLDER] [--HU-invoice-file HU_INVOICE_FILE] [--HU-BU-invoice-file HU_BU_INVOICE_FILE] [--old-pi-file OLD_PI_FILE]
csv_files [csv_files ...]
process_report.py: error: the following arguments are required: csv_files, --pi-file, --projects-file, --timed-projects-file

E.g. python process_report.py test1.csv test2.csv --pi-file pi.txt --projects-file projects.txt --timed-projects-file timed_projects.txt --output-file myfile.csv
usage: process_report.py [-h] [--fetch-from-s3] [--upload-to-s3] --invoice-month INVOICE_MONTH --pi-file PI_FILE --projects-file PROJECTS_FILE --timed-projects-file
TIMED_PROJECTS_FILE [--nonbillable-file NONBILLABLE_FILE] [--output-file OUTPUT_FILE] [--output-folder OUTPUT_FOLDER]
[--BU-invoice-file BU_INVOICE_FILE] [--HU-BU-invoice-file HU_BU_INVOICE_FILE] [--Lenovo-file LENOVO_FILE] [--old-pi-file OLD_PI_FILE]
[--alias-file ALIAS_FILE] --BU-subsidy-amount BU_SUBSIDY_AMOUNT
[csv_files ...]
process_report.py: error: the following arguments are required: --invoice-month, --pi-file, --projects-file, --timed-projects-file, --BU-subsidy-amount

E.g. python process_report.py test1.csv test2.csv --invoice-month 2024-02 --pi-file pi.txt --projects-file projects.txt --timed-projects-file timed_projects.txt --BU-subsidy-amount 100
```

## New PI Credit
Expand Down
Binary file added invoice_flowchart.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading