@@ 35-37 (lines=3) @@ | ||
32 | public function renderPrice($price): string |
|
33 | { |
|
34 | $unit = ''; |
|
35 | if ($price->getUnitLabel()) { |
|
36 | $unit = ' ' . Yii::t('hipanel:finance', 'per {unit}', ['unit' => $price->getUnitLabel()]); |
|
37 | } |
|
38 | ||
39 | if ($price->isOveruse()) { |
|
40 | $prepaid = ', ' . Yii::t('hipanel:finance', 'prepaid {amount,number}', ['amount' => $price->quantity]); |
@@ 25-27 (lines=3) @@ | ||
22 | $formatter = Yii::$app->formatter; |
|
23 | ||
24 | $unit = ''; |
|
25 | if ($price->getUnitLabel()) { |
|
26 | $unit = ' ' . Yii::t('hipanel:finance', 'per {unit}', ['unit' => $price->getUnitLabel()]); |
|
27 | } |
|
28 | ||
29 | $result = [ |
|
30 | Html::tag('strong', $formatter->asCurrency($price->price, $price->currency) . $unit) |