Describe the Bug
There is an inconsistency in the compliance report calculation for the energy content column. The calculation should be based on the formula: quantity x energy density. However, it appears that the system is incorrectly calculating the energy content. For example, a supplier who has supplied 1,000 L of biodiesel at the default carbon intensity should have an energy content calculation of 1,000 L x 35.4 MJ/L = 35,400 MJ. Instead, the energy content is showing as 38,270 MJ, which is incorrect.
Expected Behaviour
The energy content calculation should be based on the formula: quantity x energy density. For an example with biodiesel, the energy density is 35.4 MJ/L, so if a supplier provides 1,000 L, the energy content should be calculated as 1,000 L x 35.4 MJ/L = 35,400 MJ.
Actual Behaviour
The energy content calculation is incorrect. For example, an input of 1,000 L of biodiesel, the energy content is incorrectly displayed as 38,270 MJ instead of the correct value of 35,400 MJ.
Implications
This miscalculation may lead to incorrect reporting of energy content, which could affect compliance assessments and the overall accuracy of the compliance report.
Suppliers may see incorrect energy content values, leading to confusion and potential discrepancies in their reports.
Steps To Reproduce
Steps to reproduce the behaviour:
User/Role: BCeID
Go to the Compliance Report and input a quantity of 1,000 L of biodiesel with the default carbon intensity.
Check the energy content column for the biodiesel line item.
Observe that the energy content is incorrectly calculated and displayed as 38,270 MJ instead of 35,400 MJ.
Notes:
I initially tested this on only the biodiesel fuel type, but am concerned this might be a bigger issue for all calculations of in the "Energy" column of the compliance reports
This moved all the calculations to the backend, so this also includes a fix where selecting a fuel code should now show the fuel codes CI in the table.
Describe the Bug There is an inconsistency in the compliance report calculation for the energy content column. The calculation should be based on the formula: quantity x energy density. However, it appears that the system is incorrectly calculating the energy content. For example, a supplier who has supplied 1,000 L of biodiesel at the default carbon intensity should have an energy content calculation of 1,000 L x 35.4 MJ/L = 35,400 MJ. Instead, the energy content is showing as 38,270 MJ, which is incorrect.
Expected Behaviour The energy content calculation should be based on the formula: quantity x energy density. For an example with biodiesel, the energy density is 35.4 MJ/L, so if a supplier provides 1,000 L, the energy content should be calculated as 1,000 L x 35.4 MJ/L = 35,400 MJ.
Actual Behaviour The energy content calculation is incorrect. For example, an input of 1,000 L of biodiesel, the energy content is incorrectly displayed as 38,270 MJ instead of the correct value of 35,400 MJ.
Implications
Steps To Reproduce Steps to reproduce the behaviour: User/Role: BCeID
Notes:
I initially tested this on only the biodiesel fuel type, but am concerned this might be a bigger issue for all calculations of in the "Energy" column of the compliance reports