bcgov / tfrs

Transportation Fuels Reporting System
Apache License 2.0
23 stars 40 forks source link

TFRS - Reduction transaction not taken again in report #2381 #2900

Closed Grulin closed 1 month ago

Grulin commented 2 months ago

Describe the Bug Similar to card #2895 -Compliance report no. 2381 in TFRS was originally submitted on March 31st, 2023 and was never accepted. A supplemental report was submitted on June 19th, 2023 which resulted in a compliance unit balance change of +68,111. This 68,111 was credited back to the supplier, but the original negative compliance balance of 235,194 cannot be found in the transaction records.

Expected Behaviour The expected behavior of a compliance report not accepted by the director, and in a submitted status, is that credits are held in reserve. If a supplemental report is received before director acceptance that reduces the debit obligation for this report, then the in-reserve balance should change from the initially reported -235,194 to -96,858, representing a reduction in the debit amount, and that new figure should be held in reserve until the report is accepted. Once accepted, only the -96,858 would be taken from their available balance for that period.

Actual Behaviour What happened with this report is that the system is treating the original report like it was accepted and the original-235,194 obligation was reduced from the supplier’s balance. Therefore, after submitting a final supplemental report, the system has credited back the units of +70,225.

However, according to the transaction records in TFRS, the original -235,194 was never deducted from the supplier balance. This is because the original report was not accepted and should have been disregarded after the final supplemental report was submitted and accepted. To rectify this balance error, the following actions should be undertaken: • The +70,225 validation should be replaced with a reduction. • The true compliance balance owing of -96,858 should be taken from the available balance in 2022.

Implications The implication is that the supplier now erroneously still has the +96,858 compliance units and an additional +70,225 compliance unit adjustment in their available balance for the 2023 period. It also incorrectly shows their total balance today as erroneously inflated by +167,083.

Steps To Reproduce Steps to reproduce the behaviour: User/Role:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error