billing - invoice item description - cleanup
MODIFY
src/assets/i18n/en.json
src/assets/i18n/en.json
"billing": {
"generatedUser": "Generated user for '{{email}}'",
"chargingAtSiteArea": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {startTime} - Energy Consumption: {{totalConsumption}} kWh at {{siteAreaName}}",
- "chargingAtChargeBox": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} - Energy Consumption: {{totalConsumption}} kWh at charging station {{chargeBoxID}}",
- "chargingStopSiteArea": "Charging {{totalConsumption}} kWh at {{siteAreaName}} (finished at {{stopTime}})",
- "chargingStopChargeBox": "Charging {{totalConsumption}} kWh at charging station {{chargeBoxID}} (finished at {{stopTime}})"
+ "chargingAtChargeBox": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} - Energy Consumption: {{totalConsumption}} kWh at charging station {{chargeBoxID}}"
},
"chargers": {
"chargeBoxSN": "Charge Box S/N",

MODIFY
src/assets/i18n/it.json
src/assets/i18n/it.json
"billing": {
"generatedUser": "Utenza generata per '{{email}}'",
"chargingAtSiteArea": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {startTime} - Energy Consumption: {{totalConsumption}} kWh at {{siteAreaName}}",
- "chargingAtChargeBox": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} - Energy Consumption: {{totalConsumption}} kWh at charging station {{chargeBoxID}}",
- "chargingStopSiteArea": "Caricando {{totalConsumption}} kWh a {{siteAreaName}} (finito a {{stopTime}})",
- "chargingStopChargeBox": "Caricando {{totalConsumption}} kWh alla stazione di ricarica {{chargeBoxID}} (finito a {{stopTime}})"
+ "chargingAtChargeBox": "Charging session: {{sessionID}} - Start Date: {{startDate}} at {{startTime}} - Energy Consumption: {{totalConsumption}} kWh at charging station {{chargeBoxID}}"
},
"chargers": {
"chargeBoxSN": "Charge Box S/N",

MODIFY
src/integration/billing/stripe/StripeBillingIntegration.ts
src/integration/billing/stripe/StripeBillingIntegration.ts
@@ -1185,13 +1185,7 @@ export default class StripeBillingIntegration extends BillingIntegration {
const stopTime = i18nManager.formatDateTime(transaction.stop.timestamp, 'LT');
const formattedConsumptionkWh = this.formatConsumptionToKWh(transaction);
const timeSpent = this.convertTimeSpentToString(transaction);
- // TODO: Determine the description pattern to use according to the billing settings
- let descriptionPattern;
- if (FeatureToggles.isFeatureActive(Feature.BILLING_ITEM_WITH_START_DATE)) {
- descriptionPattern = (chargeBox?.siteArea?.name) ? 'billing.chargingAtSiteArea' : 'billing.chargingAtChargeBox';
- } else {
- descriptionPattern = (chargeBox?.siteArea?.name) ? 'billing.chargingStopSiteArea' : 'billing.chargingStopChargeBox';
- }
+ const descriptionPattern = (chargeBox?.siteArea?.name) ? 'billing.chargingAtSiteArea' : 'billing.chargingAtChargeBox';
// Get the translated line item description
const description = i18nManager.translate(descriptionPattern, {
sessionID,

billing - invoice item description - cleanup