LCFS - BUG Notional amount transferred away resulting in a penalty
- Dominant language
- Python
- Stars
- 6
- Forks
- 6
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 87
Description
**Describe the Bug**
The penalty formula on line 10 incorrectly includes notional transfers of fuel away from the organization in calculating the renewable requirement penalty. As a result, organizations are erroneously penalized for notional transfers of fuel that are reported on another organization's compliance report. For instance, in the example provided, a gasoline category notional transfer away is incorrectly resulting in a renewable requirement penalty.
**Expected Behaviour**
Only received notional transfers of fuel should contribute to the renewable requirement penalty calculation on line 10. Notional transfers away from the organization should be subtracted from the total on line 10.
**Actual Behaviour**
Notional transfers of fuel away from the organization are erroneously feeding into the penalty formula as a positive value, resulting in an incorrect renewable requirement penalty. This is likely due to the formula treating the received and transferred values as the same when adding line 5 in to the line 10 formula. If the value is transferred, it should be negative in the formula and if it is received, it should be positive in the formula.

**Implications**
Organizations may be penalized incorrectly, leading to inaccurate compliance reports and potential financial impacts.
**Steps To Reproduce**
Steps to reproduce the behaviour:
User/Role: BCeID
1. Submit a compliance report with a gasoline category notional transfer away from the organization and no other fuel reported.
2. Review the penalty calculation on line 10.
3. Observe that the penalty incorrectly includes the notional transfer away in the renewable requirement penalty.
Contributor guide
Research direction
Start with the compliance-report submission flow and the line 10 renewable requirement penalty calculation. Reproduce the case using a gasoline category notional transfer away and no other fuel, then compare the calculated penalty with the expected zero contribution from fuel transferred away. Done means received transfers contribute positively, transfers away contribute negatively, and the penalty is correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100