diff --git a/CounterServer/module.php b/CounterServer/module.php index 0c0b459..bd1a7ce 100644 --- a/CounterServer/module.php +++ b/CounterServer/module.php @@ -66,18 +66,18 @@ class CounterServer extends IPSModule // ---------- UPSERT ---------- $sql = " INSERT INTO meter_devices - (project_id, client_id, counter_id, meter_uuid, meter_name, external_id, meter_type, billing_unit, description, is_active) + (project_id, counter_id, meter_uuid, meter_name, external_id, external_name, meter_type, billing_unit, is_active) VALUES ( " . ($projectId === 'NULL' ? 'NULL' : $projectId) . ", - '" . $this->esc($clientId) . "', '" . $this->esc($counterId) . "', '" . $this->esc($clientId . '_' . $counterId) . "', '" . $this->esc($counterName) . "', '" . $this->esc($counterId) . "', + '" . $this->esc($clientId) . "', + '" . $this->esc($clientName) . "', '" . $this->esc($type) . "', '" . $this->esc($unit) . "', - '" . $this->esc('Client: ' . $clientName) . "', 1 ) ON DUPLICATE KEY UPDATE diff --git a/library.json b/library.json index 980d66a..cd5158a 100644 --- a/library.json +++ b/library.json @@ -8,6 +8,6 @@ "date": 1491343200 }, "version": "1.0", - "build": 2, + "build": 3, "date": 0 } \ No newline at end of file