Simplify some code logic
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 1.6 / OCPP16RequestService.ts
index 1fc89fa8c2d15b1bd0df8e3bed919d3063b6e2c3..3580cc52e18701ff05f8a6939b6714bb5be9113a 100644 (file)
@@ -107,7 +107,7 @@ export default class OCPP16RequestService extends OCPPRequestService {
       }
       const transactionEndMeterValue = OCPP16ServiceUtils.buildTransactionEndMeterValue(this.chargingStation, connectorId, meterStop);
       // FIXME: should be a callback, each OCPP commands implementation must do only one job
-      (this.chargingStation.getBeginEndMeterValues() && !this.chargingStation.getOutOfOrderEndMeterValues())
+      (this.chargingStation.getBeginEndMeterValues() && this.chargingStation.getOcppStrictCompliance() && !this.chargingStation.getOutOfOrderEndMeterValues())
         && await this.sendTransactionEndMeterValues(connectorId, transactionId, transactionEndMeterValue);
       const payload: StopTransactionRequest = {
         transactionId,