convert currency function

This commit is contained in:
vedatakdogan 2020-12-02 09:55:47 +03:00
parent 5b788479ee
commit 2594f195cc
2 changed files with 6 additions and 1 deletions

View File

@ -17,7 +17,9 @@
<div class="card-body">
{% if setting_value('visiosoft.theme.base::price_fields') %}
<div class="d-flex justify-content-between align-items-center">
<b>{{ adv.price }} {{ adv.currency }}</b>
<b>{{ adv.price != '0'
? adv.price.currency()
: trans('visiosoft.module.advs::field.free') }}</b>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-center text-truncate">

View File

@ -37,6 +37,9 @@ class Currency
$suffix = $this->symbol($currency);
}
if (is_object($number)) {
$number = $number->getValue();
}
$decimal_value = $this->getDecimalValue($number);