mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix #931
This commit is contained in:
@@ -168,7 +168,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
*/
|
||||
public function get(): Collection
|
||||
{
|
||||
return TransactionCurrency::get();
|
||||
return TransactionCurrency::orderBy('code', 'ASC')->get();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -178,7 +178,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
*/
|
||||
public function getByIds(array $ids): Collection
|
||||
{
|
||||
return TransactionCurrency::whereIn('id', $ids)->get();
|
||||
return TransactionCurrency::orderBy('code', 'ASC')->whereIn('id', $ids)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -351,7 +351,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
$tagsWithAmounts[$tag->id] = strval($tag->amount_sum);
|
||||
}
|
||||
|
||||
$tags = $query->orderBy('tags.id', 'desc')->get(['tags.id', 'tags.tag']);
|
||||
$tags = $allTags->orderBy('tags.id', 'desc')->get(['tags.id', 'tags.tag']);
|
||||
$temporary = [];
|
||||
/** @var Tag $tag */
|
||||
foreach ($tags as $tag) {
|
||||
@@ -364,13 +364,17 @@ class TagRepository implements TagRepositoryInterface
|
||||
|
||||
$temporary[] = [
|
||||
'amount' => $amount,
|
||||
'tag' => $tag,
|
||||
'tag' => [
|
||||
'id' => $tag->id,
|
||||
'tag' => $tag->tag,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/** @var array $entry */
|
||||
foreach ($temporary as $entry) {
|
||||
$scale = $this->cloudScale([12, 20], floatval($entry['amount']), floatval($min), floatval($max));
|
||||
$tagId = $entry['tag']->id;
|
||||
$tagId = $entry['tag']['id'];
|
||||
$return[$tagId] = [
|
||||
'scale' => $scale,
|
||||
'tag' => $entry['tag'],
|
||||
|
Reference in New Issue
Block a user