Fixed some zero potential customers in a10 rtr report
This commit is contained in:
@@ -60,6 +60,7 @@ class Admin_RtrReporting {
|
||||
die("RTR Raster fehlt ".$raster);
|
||||
}
|
||||
$user_count = $rtr100m->unit_count;
|
||||
$unit_sum = $building->units;
|
||||
|
||||
if(!array_key_exists($raster, $rasterpunkte)) {
|
||||
$rasterpunkte[$raster] = [];
|
||||
@@ -67,10 +68,14 @@ class Admin_RtrReporting {
|
||||
if(!array_key_exists($prod_code, $rasterpunkte[$raster])) {
|
||||
$rasterpunkte[$raster][$prod_code] = [
|
||||
"bb" => $bb,
|
||||
"unit_sum" => 0,
|
||||
"user_count" => 0
|
||||
];
|
||||
}
|
||||
|
||||
$rasterpunkte[$raster][$prod_code]["unit_sum"] += $unit_sum;
|
||||
$rasterpunkte[$raster][$prod_code]["user_count"] = $user_count;
|
||||
|
||||
}
|
||||
|
||||
$building = new Building();
|
||||
@@ -103,6 +108,7 @@ class Admin_RtrReporting {
|
||||
if(!array_key_exists($prod_code, $rasterpunkte[$raster])) {
|
||||
$rasterpunkte[$raster][$prod_code] = [
|
||||
"bb" => $bb,
|
||||
"unit_sum" => 0,
|
||||
"user_count" => 0
|
||||
];
|
||||
}
|
||||
@@ -113,6 +119,7 @@ class Admin_RtrReporting {
|
||||
continue;
|
||||
}
|
||||
|
||||
$rasterpunkte[$raster][$prod_code]["unit_sum"]++;
|
||||
$rasterpunkte[$raster][$prod_code]["user_count"] = $rtr100m->unit_count;
|
||||
|
||||
}
|
||||
@@ -126,7 +133,7 @@ class Admin_RtrReporting {
|
||||
for($i = 0; $i < 16; $i++) {
|
||||
$csv .= $data["bb"] . ";";
|
||||
}
|
||||
$csv .= $data["user_count"];
|
||||
$csv .= ($data["user_count"]) ?: ($data["unit_sum"]) ?: 1;
|
||||
$csv .= "\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user