mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Add currency symbol to API
This commit is contained in:
@@ -97,6 +97,7 @@ class AccountController extends Controller
|
|||||||
'currency_id' => $currency->id,
|
'currency_id' => $currency->id,
|
||||||
'currency_name' => $currency->name,
|
'currency_name' => $currency->name,
|
||||||
'currency_code' => $currency->code,
|
'currency_code' => $currency->code,
|
||||||
|
'currency_symbol' => $currency->symbol,
|
||||||
'currency_decimal_places' => $currency->decimal_places,
|
'currency_decimal_places' => $currency->decimal_places,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -105,11 +106,14 @@ class AccountController extends Controller
|
|||||||
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
||||||
|
|
||||||
|
|
||||||
usort($return, function ($a, $b) use ($order) {
|
usort(
|
||||||
|
$return, function ($a, $b) use ($order) {
|
||||||
$pos_a = array_search($a['type'], $order);
|
$pos_a = array_search($a['type'], $order);
|
||||||
$pos_b = array_search($b['type'], $order);
|
$pos_b = array_search($b['type'], $order);
|
||||||
|
|
||||||
return $pos_a - $pos_b;
|
return $pos_a - $pos_b;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
return response()->json($return);
|
return response()->json($return);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user