1.3 #1

Merged
meteo merged 11 commits from 1.3 into main 2026-07-08 21:37:31 +00:00
Showing only changes of commit 68c9e00afb - Show all commits

View File

@@ -126,6 +126,7 @@ class API_inserve extends API
public function syncCompaniesFromSentri()
{
# init the cloudDistributor name
if (!isset($this->inserve_custom_data['cloudDistributor']) || $this->inserve_custom_data['cloudDistributor'] === '') {
$this->apiOutput(400, ['error' => 'missing cloudDistributor in custom source data']);
} else {
@@ -474,7 +475,6 @@ class API_inserve extends API
}
unset($item);
foreach ($subscriptionCounts as $key => $item) {
// if subscriptionInserveExists but the countInserve is null skip creation
if ($item['subscriptionInserveExists'] === false && (int)$item['countSentri'] === 0) {
@@ -488,6 +488,7 @@ class API_inserve extends API
"cloud_subscription_id" => "sentri-servers", # Mark all the sentri-servers subscriptions so we can filter the subscriptions better
"name" => $item['subscriptionSentriName'],
"quantity" => ($row['server_state'] === 'deleted') ? 0 : $item['countSentri'],
"cloud_distributor" => $this->cloudDistributor,
"cloud_distribution_company_id" => $item['sentriCompanyId'], # this is generated by inserve
"status" => $item['SentriStatus'],
"period_type" => 0, # 0 = monthly, 1 = annual, 2 = one time cost
@@ -511,6 +512,7 @@ class API_inserve extends API
) {
$payload = [
"quantity" => ($row['server_state'] === 'deleted') ? 0 : $item['countSentri'],
"cloud_distributor" => $this->cloudDistributor,
"cloud_distribution_company_id" => (int)$item['sentriCompanyId'],
"name" => $item['subscriptionSentriName'],
"status" => $item['SentriStatus']