mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Auto commit for release 'develop' on 2025-01-26
This commit is contained in:
@@ -50,7 +50,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
$this->parameters = new ParameterBag();
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$this->convertToNative = Amount::convertToNative();
|
||||
$this->native = Amount::getNativeCurrency();
|
||||
$this->native = Amount::getNativeCurrency();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
$convertToNative = Amount::convertToNative();
|
||||
|
||||
// get account role (will only work if the type is asset).
|
||||
$native = Amount::getNativeCurrency();
|
||||
$native = Amount::getNativeCurrency();
|
||||
$accountRole = $this->getAccountRole($account, $accountType);
|
||||
$date = $this->getDate();
|
||||
$date->endOfDay();
|
||||
@@ -82,7 +82,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
[$openingBalance, $nativeOpeningBalance, $openingBalanceDate] = $this->getOpeningBalance($account, $accountType, $convertToNative);
|
||||
[$interest, $interestPeriod] = $this->getInterest($account, $accountType);
|
||||
|
||||
$native = $this->native;
|
||||
$native = $this->native;
|
||||
if (!$this->convertToNative) {
|
||||
// reset native currency to NULL, not interesting.
|
||||
$native = null;
|
||||
|
||||
@@ -50,21 +50,21 @@ class AttachmentTransformer extends AbstractTransformer
|
||||
$this->repository->setUser($attachment->user);
|
||||
|
||||
return [
|
||||
'id' => (string) $attachment->id,
|
||||
'created_at' => $attachment->created_at->toAtomString(),
|
||||
'updated_at' => $attachment->updated_at->toAtomString(),
|
||||
'attachable_id' => (string) $attachment->attachable_id,
|
||||
'attachable_type' => str_replace('FireflyIII\Models\\', '', $attachment->attachable_type),
|
||||
'md5' => $attachment->md5,
|
||||
'id' => (string) $attachment->id,
|
||||
'created_at' => $attachment->created_at->toAtomString(),
|
||||
'updated_at' => $attachment->updated_at->toAtomString(),
|
||||
'attachable_id' => (string) $attachment->attachable_id,
|
||||
'attachable_type' => str_replace('FireflyIII\Models\\', '', $attachment->attachable_type),
|
||||
'md5' => $attachment->md5,
|
||||
'hash' => $attachment->md5,
|
||||
'filename' => $attachment->filename,
|
||||
'download_url' => route('api.v1.attachments.download', [$attachment->id]),
|
||||
'upload_url' => route('api.v1.attachments.upload', [$attachment->id]),
|
||||
'title' => $attachment->title,
|
||||
'notes' => $this->repository->getNoteText($attachment),
|
||||
'mime' => $attachment->mime,
|
||||
'size' => (int) $attachment->size,
|
||||
'links' => [
|
||||
'filename' => $attachment->filename,
|
||||
'download_url' => route('api.v1.attachments.download', [$attachment->id]),
|
||||
'upload_url' => route('api.v1.attachments.upload', [$attachment->id]),
|
||||
'title' => $attachment->title,
|
||||
'notes' => $this->repository->getNoteText($attachment),
|
||||
'mime' => $attachment->mime,
|
||||
'size' => (int) $attachment->size,
|
||||
'links' => [
|
||||
[
|
||||
'rel' => 'self',
|
||||
'uri' => '/attachment/'.$attachment->id,
|
||||
|
||||
@@ -95,7 +95,6 @@ class CategoryTransformer extends AbstractTransformer
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
private function beautify(array $array): array
|
||||
{
|
||||
$return = [];
|
||||
|
||||
@@ -56,4 +56,3 @@ class CurrencyTransformer extends AbstractTransformer
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user