convert setting('default.currency') to default_currency() helper function..
This commit is contained in:
@ -283,8 +283,8 @@ abstract class Index extends Component
|
||||
$items[] = [
|
||||
'title' => ($key == 'overdue') ? trans('general.overdue') : trans('documents.statuses.' . $key),
|
||||
//'href' => route($route, ['search' => 'status:' . $key]),
|
||||
'amount' => money($total, setting('default.currency'), true)->formatForHumans(),
|
||||
'tooltip' => money($total, setting('default.currency'), true)->format(),
|
||||
'amount' => money($total, default_currency(), true)->formatForHumans(),
|
||||
'tooltip' => money($total, default_currency(), true)->format(),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -291,7 +291,7 @@ abstract class Form extends Component
|
||||
$this->document = $this->model;
|
||||
$this->currencies = $this->getCurrencies($currencies);
|
||||
$this->currency = $this->getCurrency($document, $currency, $currency_code);
|
||||
$this->currency_code = ! empty($this->currency) ? $this->currency->code : setting('default.currency');
|
||||
$this->currency_code = ! empty($this->currency) ? $this->currency->code : default_currency();
|
||||
$this->taxes = Tax::enabled()->orderBy('name')->get()->pluck('title', 'id');
|
||||
|
||||
/* -- Content Start -- */
|
||||
@ -438,7 +438,7 @@ abstract class Form extends Component
|
||||
}
|
||||
|
||||
if (empty($currency)) {
|
||||
$currency = Currency::where('code', setting('default.currency'))->first();
|
||||
$currency = Currency::where('code', default_currency())->first();
|
||||
}
|
||||
|
||||
return $currency;
|
||||
@ -1139,7 +1139,7 @@ abstract class Form extends Component
|
||||
if (! empty($notes)) {
|
||||
return $notes;
|
||||
}
|
||||
|
||||
|
||||
if (! empty($this->document)) {
|
||||
return $this->document->notes;
|
||||
}
|
||||
|
@ -392,8 +392,8 @@ abstract class Index extends Component
|
||||
foreach ($totals as $key => $total) {
|
||||
$title = ($key == 'overdue') ? trans('general.overdue') : trans('documents.statuses.' . $key);
|
||||
$href = route($route, ['search' => 'status:' . $key]);
|
||||
$amount = money($total, setting('default.currency'), true)->formatForHumans();
|
||||
$tooltip = money($total, setting('default.currency'), true)->format();
|
||||
$amount = money($total, default_currency(), true)->formatForHumans();
|
||||
$tooltip = money($total, default_currency(), true)->format();
|
||||
|
||||
$items[] = [
|
||||
'title' => $title,
|
||||
|
Reference in New Issue
Block a user