mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
🤖 Auto commit for release 'develop' on 2025-06-02
This commit is contained in:
@@ -34,7 +34,6 @@ use FireflyIII\Support\JsonApi\Enrichments\TransactionGroupEnrichment;
|
|||||||
use FireflyIII\Transformers\TransactionGroupTransformer;
|
use FireflyIII\Transformers\TransactionGroupTransformer;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
|
||||||
|
@@ -147,7 +147,8 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
|
|||||||
$set = Attachment::whereIn('attachable_id', $journals)
|
$set = Attachment::whereIn('attachable_id', $journals)
|
||||||
->where('attachable_type', TransactionJournal::class)
|
->where('attachable_type', TransactionJournal::class)
|
||||||
->where('uploaded', true)
|
->where('uploaded', true)
|
||||||
->whereNull('deleted_at')->get();
|
->whereNull('deleted_at')->get()
|
||||||
|
;
|
||||||
|
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
@@ -174,7 +175,8 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
|
|||||||
/** @var null|Note $note */
|
/** @var null|Note $note */
|
||||||
$note = Note::where('noteable_id', $journalId)
|
$note = Note::where('noteable_id', $journalId)
|
||||||
->where('noteable_type', TransactionJournal::class)
|
->where('noteable_type', TransactionJournal::class)
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
if (null === $note) {
|
if (null === $note) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -197,7 +199,8 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
|
|||||||
)
|
)
|
||||||
->with(['source', 'destination', 'source.transactions'])
|
->with(['source', 'destination', 'source.transactions'])
|
||||||
->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')
|
->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')
|
||||||
->get(['journal_links.*', 'link_types.inward', 'link_types.outward', 'link_types.editable']);
|
->get(['journal_links.*', 'link_types.inward', 'link_types.outward', 'link_types.editable'])
|
||||||
|
;
|
||||||
|
|
||||||
/** @var TransactionJournalLink $entry */
|
/** @var TransactionJournalLink $entry */
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
@@ -297,7 +300,8 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
|
|||||||
->where('transaction_journal_id', $journalId)
|
->where('transaction_journal_id', $journalId)
|
||||||
->whereIn('name', $fields)
|
->whereIn('name', $fields)
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->get(['name', 'data']);
|
->get(['name', 'data'])
|
||||||
|
;
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
foreach ($query as $row) {
|
foreach ($query as $row) {
|
||||||
@@ -316,7 +320,8 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
|
|||||||
->where('transaction_journal_id', $journalId)
|
->where('transaction_journal_id', $journalId)
|
||||||
->whereIn('name', $fields)
|
->whereIn('name', $fields)
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->get(['name', 'data']);
|
->get(['name', 'data'])
|
||||||
|
;
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
foreach ($query as $row) {
|
foreach ($query as $row) {
|
||||||
@@ -338,7 +343,8 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
|
|||||||
$currency = app('amount')->getNativeCurrencyByUserGroup($this->user->userGroup);
|
$currency = app('amount')->getNativeCurrencyByUserGroup($this->user->userGroup);
|
||||||
$data = PiggyBankEvent::whereIn('transaction_journal_id', $journals)
|
$data = PiggyBankEvent::whereIn('transaction_journal_id', $journals)
|
||||||
->with('piggyBank', 'piggyBank.account')
|
->with('piggyBank', 'piggyBank.account')
|
||||||
->get(['piggy_bank_events.*']);
|
->get(['piggy_bank_events.*'])
|
||||||
|
;
|
||||||
|
|
||||||
/** @var PiggyBankEvent $row */
|
/** @var PiggyBankEvent $row */
|
||||||
foreach ($data as $row) {
|
foreach ($data as $row) {
|
||||||
@@ -348,7 +354,8 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
|
|||||||
// get currency preference.
|
// get currency preference.
|
||||||
$currencyPreference = AccountMeta::where('account_id', $row->piggyBank->account_id)
|
$currencyPreference = AccountMeta::where('account_id', $row->piggyBank->account_id)
|
||||||
->where('name', 'currency_id')
|
->where('name', 'currency_id')
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
if (null !== $currencyPreference) {
|
if (null !== $currencyPreference) {
|
||||||
$currency = TransactionCurrency::where('id', $currencyPreference->data)->first();
|
$currency = TransactionCurrency::where('id', $currencyPreference->data)->first();
|
||||||
}
|
}
|
||||||
@@ -382,7 +389,8 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
|
|||||||
->leftJoin('tags', 'tag_transaction_journal.tag_id', '=', 'tags.id')
|
->leftJoin('tags', 'tag_transaction_journal.tag_id', '=', 'tags.id')
|
||||||
->where('tag_transaction_journal.transaction_journal_id', $journalId)
|
->where('tag_transaction_journal.transaction_journal_id', $journalId)
|
||||||
->orderBy('tags.tag', 'ASC')
|
->orderBy('tags.tag', 'ASC')
|
||||||
->get(['tags.tag']);
|
->get(['tags.tag'])
|
||||||
|
;
|
||||||
|
|
||||||
return $result->pluck('tag')->toArray();
|
return $result->pluck('tag')->toArray();
|
||||||
}
|
}
|
||||||
|
@@ -51,9 +51,6 @@ interface TransactionGroupRepositoryInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Small method that returns a hash that can be used to compare two transaction groups.
|
* Small method that returns a hash that can be used to compare two transaction groups.
|
||||||
*
|
|
||||||
* @param TransactionGroup $group
|
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public function getCompareHash(TransactionGroup $group): string;
|
public function getCompareHash(TransactionGroup $group): string;
|
||||||
|
|
||||||
|
@@ -822,7 +822,8 @@ class JournalUpdateService
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isCompareHashChanged(): bool {
|
public function isCompareHashChanged(): bool
|
||||||
|
{
|
||||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$compareHash = $this->transactionGroupRepository->getCompareHash($this->transactionGroup);
|
$compareHash = $this->transactionGroupRepository->getCompareHash($this->transactionGroup);
|
||||||
Log::debug(sprintf('Compare hash is "%s".', $compareHash));
|
Log::debug(sprintf('Compare hash is "%s".', $compareHash));
|
||||||
|
@@ -78,7 +78,7 @@ return [
|
|||||||
'running_balance_column' => env('USE_RUNNING_BALANCE', false),
|
'running_balance_column' => env('USE_RUNNING_BALANCE', false),
|
||||||
// see cer.php for exchange rates feature flag.
|
// see cer.php for exchange rates feature flag.
|
||||||
],
|
],
|
||||||
'version' => 'develop/2025-06-01',
|
'version' => 'develop/2025-06-02',
|
||||||
'api_version' => '2.1.0', // field is no longer used.
|
'api_version' => '2.1.0', // field is no longer used.
|
||||||
'db_version' => 25,
|
'db_version' => 25,
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user