From 758423a7f775dc01cb6e602e4f82efebbeab8702 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Wed, 2 Jul 2014 14:47:10 -0400 Subject: [PATCH] Billing page fix for customers with multiple stations --- airtime_mvc/application/controllers/BillingController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/controllers/BillingController.php b/airtime_mvc/application/controllers/BillingController.php index 696c69319..407123e58 100644 --- a/airtime_mvc/application/controllers/BillingController.php +++ b/airtime_mvc/application/controllers/BillingController.php @@ -475,17 +475,17 @@ class BillingController extends Zend_Controller_Action { //the server's hostname with the client subdomain. Once it finds a match //between the product and the server's hostname/subdomain, then it //returns the ID of that product (aka. the service ID of an Airtime instance) - foreach ($result["products"] as $product) + foreach ($result["products"]["product"] as $product) { - if (strpos($product[0]["groupname"], "Airtime") === FALSE) + if (strpos($product["groupname"], "Airtime") === FALSE) { //Ignore non-Airtime products continue; } else { - if ($product[0]["status"] === "Active") { - $airtimeProduct = $product[0]; + if ($product["status"] === "Active") { + $airtimeProduct = $product; $subdomain = ''; foreach ($airtimeProduct['customfields']['customfield'] as $customField) {