src/Oro/Bundle/SalesBundle/Dashboard/Provider/WidgetOpportunityByLeadSourceProvider.php 1 location
|
@@ 159-165 (lines=7) @@
|
156 |
|
// first sort by value to make sure biggest numbers are not merged to Others (when limit is applied) |
157 |
|
usort( |
158 |
|
$rows, |
159 |
|
function ($a, $b) { |
160 |
|
if ($a['value'] === $b['value']) { |
161 |
|
return 0; |
162 |
|
} |
163 |
|
|
164 |
|
return $a['value'] < $b['value'] ? 1 : -1; |
165 |
|
} |
166 |
|
); |
167 |
|
// get excluded sources (to be merged with Others) |
168 |
|
$others = array_filter( |
src/Oro/Bundle/SalesBundle/Entity/Repository/LeadRepository.php 1 location
|
@@ 128-134 (lines=7) @@
|
125 |
|
{ |
126 |
|
usort( |
127 |
|
$rows, |
128 |
|
function ($a, $b) { |
129 |
|
if ($a['itemCount'] === $b['itemCount']) { |
130 |
|
return 0; |
131 |
|
} |
132 |
|
|
133 |
|
return $a['itemCount'] < $b['itemCount'] ? 1 : -1; |
134 |
|
} |
135 |
|
); |
136 |
|
} |
137 |
|
|