You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the first step to implementing prepayments, we need to implement prepayment processing to the billable invoice. Prepayment processing will require several steps and important requirements:
Information needed for prepayment processing are stored in private CSVs. The location of these CSVs are still in discussion in Add new CSVs for prepaid group billing #80
All discounts (New-PI credit, BU sudsidy) must be applied before a group's prepayment credits are used
Another thing to note about discounts, all invoices except the BU-internal invoice must show that the BU subsidy is not applied, but the final balance must show that the subsidy has been applied (the balance must be decreased by the amount of the subsidy, even if the prepaid group has enough balance to fully pay for the project)
Prepayment credits are applied the same the month they have been added.
Several new prepaid-related rows are to be added to the billable invoice, empty if the project does not belong to a prepaid group:
Prepaid Group Name - Group Name
Prepaid Group Institution - Determined from Group Contact Email
Prepaid Group Balance - Sum of the project's group's current credits, debits, and their debits from the current invoice
Prepaid Group Amount Used - The amount from the prepaid group's balance used to pay for the project/allocation cost
These rows should also be shown in all invoices derived from the billable invoice. This includes the HU-BU or NERC Total invoice, the PI-specific invoices, and the BU Internal invoices.
Detailed specifications of this feature is in the Prepaid Development Scaffolding document.
The text was updated successfully, but these errors were encountered:
@knikolla@naved001 Should the processing script fetch the prepaid group tables (i.e the debits, credits tables) by making calls to the github API, or should it expect these files to be passed via the CLI like with the nonbillable-related files?
In the prepayment scaffolding, we agreed that the Prepayment credit should be applied after all other discounts (New-PI credit, BU subsidy), intent being that PIs should benefit from discounts before paying with their money.
That being said, we’re also told that the BU subsidy should be applied, but not visible in any of the invoices except the BU Internal invoice. This leads to a bit of messiness in our current code since the BU Internal invoice is made after (and is based on) the billable invoice. This means implementing the Prepaid credit would require some restructuring of the current code. @knikolla@naved001 My proposed restructuring is the following:
During the process() step for the billable invoice, could I apply the BU subsidy and add the Subsidy column to the dataframe, but filter it out and “undo” the subsidy during the export() step? When we arrive at the process() step for the BU Internal invoice, I can “redo” the subsidy before exporting. Would this be a good way to restructure the code?
QuanMPhm
changed the title
Implement invoice prepayment groups
Implement prepayment processing in billable invoice
Aug 30, 2024
As the first step to implementing prepayments, we need to implement prepayment processing to the billable invoice. Prepayment processing will require several steps and important requirements:
Several new prepaid-related rows are to be added to the billable invoice, empty if the project does not belong to a prepaid group:
These rows should also be shown in all invoices derived from the billable invoice. This includes the HU-BU or NERC Total invoice, the PI-specific invoices, and the BU Internal invoices.
Detailed specifications of this feature is in the Prepaid Development Scaffolding document.
The text was updated successfully, but these errors were encountered: