Project

General

Profile

Bug #2579

Charger Rate Correction

Added by Yashaditya Singh about 2 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Start date:
05/05/2026
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

The charger rate displayed in the vendor sessions/revenue screen is not consistently correct when multiple rate fields are available. Currently, the system directly uses energy_rate, which can lead to incorrect or null values in scenarios where ocpi_energy_rate (markup rate) is present.

To ensure accurate pricing, the charger rate should follow a fallback logic:

Use ocpi_energy_rate (markup energy rate) if available
Otherwise fallback to energy_rate
If both are null, default to 0

#1

Updated by Yashaditya Singh about 1 month ago

  • Status changed from New to Resolved

Applied fix for charger rate calculation in vendor sessions.

Updated repository query in `GetVendorSessionsForExportPagedAsync` to use:
COALESCE for CostPerKwh.

Verified database values where ocpi_energy_rate is present and confirmed API now returns correct charger rate. Also validated that transaction amount, GST, total amount, and payout calculations remain unaffected.

Tested API response and UI reflects correct values.

#2

Updated by Yashaditya Singh about 1 month ago

  • Status changed from Resolved to Closed
#3

Updated by Yashaditya Singh about 1 month ago

  • Status changed from Closed to Resolved

Also available in: Atom PDF