- async stop(reason: StopTransactionReason = StopTransactionReason.NONE): Promise<void> {
- logger.info(this._logPrefix() + ' ATG OVER => STOPPING ALL TRANSACTIONS');
- for (const connector in this._chargingStation.connectors) {
- if (this._chargingStation.getConnector(Utils.convertToInt(connector)).transactionStarted) {
- logger.info(this._logPrefix(Utils.convertToInt(connector)) + ' ATG OVER. Stop transaction ' + this._chargingStation.getConnector(Utils.convertToInt(connector)).transactionId.toString());
- await this._chargingStation.sendStopTransaction(this._chargingStation.getConnector(Utils.convertToInt(connector)).transactionId, reason);
+ public async stop(reason: StopTransactionReason = StopTransactionReason.NONE): Promise<void> {
+ logger.info(this.logPrefix() + ' ATG OVER => STOPPING ALL TRANSACTIONS');
+ for (const connector in this.chargingStation.connectors) {
+ const transactionId = this.chargingStation.getConnector(Utils.convertToInt(connector)).transactionId;
+ if (this.chargingStation.getConnector(Utils.convertToInt(connector)).transactionStarted) {
+ logger.info(this.logPrefix(Utils.convertToInt(connector)) + ' ATG OVER. Stop transaction ' + transactionId.toString());
+ await this.chargingStation.ocppRequestService.sendStopTransaction(transactionId, this.chargingStation.getEnergyActiveImportRegisterByTransactionId(transactionId),
+ this.chargingStation.getTransactionIdTag(transactionId), reason);