| Conditions | 5 |
| Paths | 5 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | private function getSumsString(array $sumsArray): string |
||
| 45 | { |
||
| 46 | $totals = ''; |
||
| 47 | foreach ($sumsArray as $cur => $sum) { |
||
| 48 | if (!$cur) { |
||
| 49 | continue; |
||
| 50 | } |
||
| 51 | if (is_numeric($sum)) { |
||
| 52 | $totals .= ' <b>' . Yii::$app->formatter->asCurrency($sum, $cur) . '</b>'; |
||
| 53 | } elseif (is_array($sum)) { |
||
| 54 | $totals .= ' <b>' . Yii::$app->formatter->asCurrency($sum['total'], $cur) . '</b>'; |
||
| 55 | $totals .= ' (+<b>' . Yii::$app->formatter->asCurrency($sum['+'] ?? '0', $cur) . '</b>'; |
||
| 56 | $totals .= ' -<b>' . Yii::$app->formatter->asCurrency($sum['-'] ?? '0', $cur) . '</b>)'; |
||
| 57 | } |
||
| 58 | } |
||
| 59 | return $totals; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |