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

Implement processor for prepayments #115

Open
QuanMPhm opened this issue Nov 13, 2024 · 1 comment
Open

Implement processor for prepayments #115

QuanMPhm opened this issue Nov 13, 2024 · 1 comment
Assignees

Comments

@QuanMPhm
Copy link
Contributor

QuanMPhm commented Nov 13, 2024

Dependant on #102.

We want to implement a processor class for handling group prepayments. Based on the prepayment scaffolding document, these are the changes I believe should be made

  • A new processor, PrepaymentProcessor, subclassing DiscountProcessor, should be made. Placed after every other current processors. This processor will set IS_DISCOUNT_BY_NERC to True
  • A new command line argument, --prepayment-dir, will be added to determine a local directory which contains the CSVs needed to process prepayments (the prepaid group debit and credit tables, etc). If this directory is not provided, then the script will default to fetching the prepayment documents from Github.
  • Aside from fetching from Github, new functions will be added to have the modified prepayment documents pushed back to Github
  • A couple of new columns will be added to all invoices except the Lenovo and Non-billable invoice:
    • Prepaid Group Name - Group Name
    • Prepaid Group Institution - calculate institution from Group Contact Email
    • Prepaid Group Balance - SUM(Credits) - SUM(Debits)
    • Prepaid Group Amount Used - the sum of all project costs for this month
  • A new set of unit tests will be added.

@naved001 @knikolla @joachimweyl These are questions I would like your considerations on, more may pop-up as I progress through this issue:

  • Do we want to backup the prepayment CSVs (credit and debit tables, etc) after each run of the processing script? Where should we back them up to?
@QuanMPhm QuanMPhm self-assigned this Nov 13, 2024
@joachimweyl
Copy link
Contributor

sounds right to me.
As for backups, I assume follow the same rules as the invoice backups?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants