convert setting('default.currency') to default_currency() helper function..
This commit is contained in:
@ -65,7 +65,7 @@ class Accounts extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$currency = Currency::where('code', '=', setting('default.currency'))->first();
|
||||
$currency = Currency::where('code', '=', default_currency())->first();
|
||||
|
||||
return view('banking.accounts.create', compact('currency'));
|
||||
}
|
||||
@ -279,7 +279,7 @@ class Accounts extends Controller
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
$currency_code = setting('default.currency');
|
||||
$currency_code = default_currency();
|
||||
|
||||
if (isset($account->currency_code)) {
|
||||
$currencies = Currency::enabled()->pluck('name', 'code')->toArray();
|
||||
|
@ -24,8 +24,8 @@ class Reconciliations extends Controller
|
||||
{
|
||||
$reconciliations = Reconciliation::with('account')->collect();
|
||||
|
||||
$reconciled_amount = money($reconciliations->where('reconciled', 1)->sum('closing_balance'), setting('default.currency'), true);
|
||||
$in_progress_amount = money($reconciliations->where('reconciled', 0)->sum('closing_balance'), setting('default.currency'), true);
|
||||
$reconciled_amount = money($reconciliations->where('reconciled', 1)->sum('closing_balance'), default_currency(), true);
|
||||
$in_progress_amount = money($reconciliations->where('reconciled', 0)->sum('closing_balance'), default_currency(), true);
|
||||
|
||||
$summary_amounts = [
|
||||
'amount_exact' => $reconciled_amount->format(),
|
||||
|
@ -56,9 +56,9 @@ class Transactions extends Controller
|
||||
|
||||
$totals['profit'] = $totals['income'] - $totals['expense'];
|
||||
|
||||
$incoming_amount = money($totals['income'], setting('default.currency'), true);
|
||||
$expense_amount = money($totals['expense'], setting('default.currency'), true);
|
||||
$profit_amount = money($totals['profit'], setting('default.currency'), true);
|
||||
$incoming_amount = money($totals['income'], default_currency(), true);
|
||||
$expense_amount = money($totals['expense'], default_currency(), true);
|
||||
$profit_amount = money($totals['profit'], default_currency(), true);
|
||||
|
||||
$summary_amounts = [
|
||||
'incoming_exact' => $incoming_amount->format(),
|
||||
|
@ -50,7 +50,7 @@ class Transfers extends Controller
|
||||
{
|
||||
$accounts = Account::enabled()->orderBy('name')->get()->pluck('title', 'id');
|
||||
|
||||
$currency = Currency::where('code', setting('default.currency'))->first();
|
||||
$currency = Currency::where('code', default_currency())->first();
|
||||
|
||||
return view('banking.transfers.create', compact('accounts', 'currency'));
|
||||
}
|
||||
@ -136,7 +136,7 @@ class Transfers extends Controller
|
||||
{
|
||||
$accounts = Account::enabled()->orderBy('name')->get()->pluck('title', 'id');
|
||||
|
||||
$currency_code = ($transfer->expense_transaction->account) ? $transfer->expense_transaction->account->currency_code : setting('default.currency');
|
||||
$currency_code = ($transfer->expense_transaction->account) ? $transfer->expense_transaction->account->currency_code : default_currency();
|
||||
|
||||
$currency = Currency::where('code', $currency_code)->first();
|
||||
|
||||
|
Reference in New Issue
Block a user