src/grid/presenters/price/TemplatePricePresenter.php 1 location
|
@@ 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) |
src/grid/presenters/price/PricePresenter.php 1 location
|
@@ 36-38 (lines=3) @@
|
| 33 |
|
public function renderPrice(Price $price): string |
| 34 |
|
{ |
| 35 |
|
$unit = $formula = ''; |
| 36 |
|
if ($price->getUnitLabel()) { |
| 37 |
|
$unit = ' ' . Yii::t('hipanel:finance', 'per {unit}', ['unit' => $price->getUnitLabel()]); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
if (count($price->formulaLines()) > 0) { |
| 41 |
|
$formula = ArraySpoiler::widget([ |