bcgov / lcfs

An online application for fuel suppliers to manage their compliance obligations under the Low Carbon Fuels Act
Apache License 2.0
5 stars 3 forks source link

LCFS - Calculate and display available compliance unit balance for the compliance period (Line 17 of the compliance report summary) #756

Closed Grulin closed 1 month ago

Grulin commented 3 months ago

Description: Implement functionality to calculate and display the available compliance unit balance for the compliance period. This involves pulling data from previous compliance reports to account for positive compliance units carried forward, subtracting any future debits recorded in the system, and ensuring the final balance is not negative.

Wireframe: Link

Purpose and benefit to user: To provide users with an accurate and clear view of their available compliance unit balance, ensuring they can monitor and manage their compliance obligations effectively. This helps avoid penalties by ensuring users are aware of their unit balance status.

Acceptance Criteria:

Development Checklist:

Notes:

Grulin commented 1 month ago

Tested and this is currently still reflecting the balance of the total balance, rather than the available balance for this specific year (I was testing 2024). The available balance should only reflect what is available for this year (2024 for this example).

This includes:

Grulin commented 1 month ago

Hi @prv-proton. Thanks for reaching out about this. I can give you an example of this that we recently worked on to better illustrate this calculation. You know the query in Metabase that you helped me with that shows the year by year of units remaining? This available balance calculation adds an additional step to that calculation. I'm going to share the example with you directly through Teams, but wanted to document the comment here on the card for future use.

prv-proton commented 1 month ago

Tested and this is currently still reflecting the balance of the total balance, rather than the available balance for this specific year (I was testing 2024). The available balance should only reflect what is available for this year (2024 for this example).

This includes:

* validations or compliance unit balance changes from assessments listed with a 2024 or prior compliance period
  -reductions listed with a 2024 or prior compliance period
  +compliance units purchased through credit transfers with and effective date on or before March 31st, 2025
  -compliance units sold through credit transfer with an effective date on or before March 31st, 2025
  +compliance unites issued under IA/P3A with an effective date on or before March 31st, 2025
  +/- admin adjustments with an effective date on or before March 31st, 2025
  -all future debits (such as transfers or reductions)

Hi @Grulin , for admin adjustments and initiative agreements, should we only consider the approved transactions?

Grulin commented 1 month ago

Difficult to test as a front end user because we are limited by how far ahead or behind we can report. Will collaborate with the dev team to figure out how to test if this is working the way it is intended to.