sap-labs-france / ev-server

The Open e-Mobility Charging Station management backend server (check also ev-dashboard and ev-mobile)
https://open-e-mobility.fr/
Apache License 2.0
141 stars 132 forks source link

Never calculate the cost of OCPI transaction #4208

Closed mokhairy2019 closed 1 year ago

mokhairy2019 commented 1 year ago

I noticed that total cost is not calculated in the ocpidata part of the transaction in case of ocpi connection. Inside the code I found that total_cost is always set to 0 with a comment beside it saying "Never calculate the cost of OCPI transaction".

Is there a logical reason for this or it is meant to be fixed in the future ?

Another remark is that I couldn't find anything related to the tariff in the dashboard UI, I don't really understand the connection between the pricingDefinations and tariff calculation used in OCPI, could you explain this to me ?

Thanks in Advance

LucasBrazi06 commented 1 year ago

The pricing is defined and calculated at IOP side (Gireve in France) and the billing system is also on their side. So, there must be a single source of truth, that’s why we don’t pass it into the CDR which was most of the time different and triggered an alert on their side. But, CPO are currently migrating their backends to use the OCPI Tariff module and once all of them are done with that, we can reactivate the pricing in the CDR and define the model on our side + use the Tariff module to send it over to the IOP.