mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-07 18:37:55 +00:00
Compare commits
29 Commits
develop-20
...
develop-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed265f68ba | ||
|
|
d2e9b64bf5 | ||
|
|
3811aff206 | ||
|
|
762d898fee | ||
|
|
5e6034fc86 | ||
|
|
9da10459d6 | ||
|
|
ff80cedd6b | ||
|
|
b213148ae8 | ||
|
|
c8646e20cb | ||
|
|
76a41fec50 | ||
|
|
0e705bd038 | ||
|
|
f33ffb98ff | ||
|
|
faa0d59340 | ||
|
|
5af0219884 | ||
|
|
dafd99f155 | ||
|
|
3560f0388c | ||
|
|
b2954658d8 | ||
|
|
44581d9983 | ||
|
|
02dcfeb227 | ||
|
|
d8bafb349d | ||
|
|
889598a4c8 | ||
|
|
7e37d10016 | ||
|
|
ebaebb09d1 | ||
|
|
531a3a4b6c | ||
|
|
b3e313821b | ||
|
|
51958af422 | ||
|
|
e3b21ccdba | ||
|
|
31bb208835 | ||
|
|
8c97e805a2 |
12
.ci/php-cs-fixer/composer.lock
generated
12
.ci/php-cs-fixer/composer.lock
generated
@@ -406,16 +406,16 @@
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v3.60.0",
|
||||
"version": "v3.61.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
|
||||
"reference": "e595e4e070d17c5d42ed8c4206f630fcc5f401a4"
|
||||
"reference": "94a87189f55814e6cabca2d9a33b06de384a2ab8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/e595e4e070d17c5d42ed8c4206f630fcc5f401a4",
|
||||
"reference": "e595e4e070d17c5d42ed8c4206f630fcc5f401a4",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/94a87189f55814e6cabca2d9a33b06de384a2ab8",
|
||||
"reference": "94a87189f55814e6cabca2d9a33b06de384a2ab8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -497,7 +497,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.60.0"
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.61.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -505,7 +505,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-25T09:26:51+00:00"
|
||||
"time": "2024-07-31T14:33:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
parameters:
|
||||
scanFiles:
|
||||
- ../_ide_helper_models.php
|
||||
universalObjectCratesClasses:
|
||||
- Illuminate\Database\Eloquent\Model
|
||||
# TODO: slowly remove these parameters and fix the issues found.
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
checkGenericClassInNonGenericObjectType: false # remove this rule when all other issues are solved.
|
||||
ignoreErrors:
|
||||
# TODO: slowly remove these exceptions and fix the issues found.
|
||||
- '#Dynamic call to static method#' # all the Laravel ORM things depend on this.
|
||||
@@ -11,6 +12,7 @@ parameters:
|
||||
- '#with no value type specified in iterable type array#' # remove this rule when all other issues are solved.
|
||||
- '#has no value type specified in iterable type array#' # remove this rule when all other issues are solved.
|
||||
- '#is not allowed to extend#'
|
||||
- '#does not specify its types#'
|
||||
- '#switch is forbidden to use#'
|
||||
- '#is neither abstract nor final#'
|
||||
- '#on left side of \?\?\= always exists and is not nullable#'
|
||||
|
||||
1
.github/pull_request_template.md
vendored
1
.github/pull_request_template.md
vendored
@@ -6,6 +6,7 @@ Thank you for submitting new code to Firefly III, or any of the related projects
|
||||
- Please do not open PRs to "discuss" possible solutions or to "get feedback" on your code. I simply don't have time for that.
|
||||
- Pull requests for the MAIN branch will be closed.
|
||||
- DO NOT include translated strings in your PR.
|
||||
- PRs (or parts thereof) that only fix issues inside code comments will not be accepted.
|
||||
|
||||
If it feels necessary to open an issue first, please do so, before you open a PR.
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ Over time, many people have contributed to Firefly III. Their efforts are not al
|
||||
Please find below all the people who contributed to the Firefly III code. Their names are mentioned in the year of their first contribution.
|
||||
|
||||
## 2024
|
||||
- withbest
|
||||
- Steve Wasiura
|
||||
- imlonghao
|
||||
- Rahman Yusuf
|
||||
|
||||
@@ -69,7 +69,7 @@ class UpdateController extends Controller
|
||||
*/
|
||||
public function update(UpdateRequest $request, TransactionGroup $transactionGroup): JsonResponse
|
||||
{
|
||||
app('log')->debug('Now in update routine for transaction group!');
|
||||
app('log')->debug('Now in update routine for transaction group');
|
||||
$data = $request->getAll();
|
||||
|
||||
// Fixes 8750.
|
||||
|
||||
@@ -34,6 +34,7 @@ use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||
use FireflyIII\Transformers\CurrencyTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
@@ -164,6 +165,7 @@ class UpdateController extends Controller
|
||||
public function update(UpdateRequest $request, TransactionCurrency $currency): JsonResponse
|
||||
{
|
||||
$data = $request->getAll();
|
||||
Log::debug(__METHOD__, $data);
|
||||
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
@@ -173,6 +175,11 @@ class UpdateController extends Controller
|
||||
if (array_key_exists('enabled', $data) && false === $data['enabled'] && 1 === count($set) && $set->first()->id === $currency->id) {
|
||||
return response()->json([], 409);
|
||||
}
|
||||
// second safety catch on currency disable.
|
||||
if (array_key_exists('enabled', $data) && false === $data['enabled'] && $this->repository->currencyInUse($currency)) {
|
||||
return response()->json([], 409);
|
||||
}
|
||||
|
||||
$currency = $this->repository->update($currency, $data);
|
||||
|
||||
app('preferences')->mark();
|
||||
|
||||
@@ -102,6 +102,8 @@ class PreferencesController extends Controller
|
||||
* TODO This endpoint is not documented.
|
||||
*
|
||||
* Return a single preference by name.
|
||||
*
|
||||
* @param Collection<int, Preference> $collection
|
||||
*/
|
||||
public function showList(Collection $collection): JsonResponse
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ class BalanceController extends Controller
|
||||
private AccountRepositoryInterface $repository;
|
||||
private GroupCollectorInterface $collector;
|
||||
private ChartData $chartData;
|
||||
private TransactionCurrency $default;
|
||||
// private TransactionCurrency $default;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -61,7 +61,7 @@ class BalanceController extends Controller
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
$this->collector->setUserGroup($userGroup);
|
||||
$this->chartData = new ChartData();
|
||||
$this->default = app('amount')->getDefaultCurrency();
|
||||
// $this->default = app('amount')->getDefaultCurrency();
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class AccountController extends Controller
|
||||
use Actions\Destroy;
|
||||
use Actions\DetachRelationship;
|
||||
|
||||
// use Actions\FetchMany;
|
||||
use Actions\FetchMany;
|
||||
// use Actions\FetchOne;
|
||||
use Actions\FetchRelated;
|
||||
use Actions\FetchRelationship;
|
||||
@@ -81,12 +81,13 @@ class AccountController extends Controller
|
||||
*/
|
||||
public function show(AccountSchema $schema, AccountSingleQuery $request, Account $account)
|
||||
{
|
||||
$model = $schema
|
||||
->repository()
|
||||
Log::debug(__METHOD__);
|
||||
$model = $schema->repository()
|
||||
->queryOne($account)
|
||||
->withRequest($request)
|
||||
->first()
|
||||
;
|
||||
Log::debug(sprintf('%s again!', __METHOD__));
|
||||
|
||||
// do something custom...
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace FireflyIII\Console\Commands\Correction;
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
@@ -38,14 +40,18 @@ class FixUnevenAmount extends Command
|
||||
|
||||
protected $description = 'Fix journals with uneven amounts.';
|
||||
protected $signature = 'firefly-iii:fix-uneven-amount';
|
||||
private int $count;
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
$this->count = 0;
|
||||
$this->convertOldStyleTransfers();
|
||||
$this->fixUnevenAmounts();
|
||||
$this->matchCurrencies();
|
||||
AccountBalanceCalculator::forceRecalculateAll();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -71,6 +77,7 @@ class FixUnevenAmount extends Command
|
||||
);
|
||||
Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete();
|
||||
TransactionJournal::where('id', $journal->id ?? 0)->forceDelete();
|
||||
++$this->count;
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -92,20 +99,33 @@ class FixUnevenAmount extends Command
|
||||
|
||||
Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete();
|
||||
TransactionJournal::where('id', $journal->id ?? 0)->forceDelete();
|
||||
++$this->count;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// may still be able to salvage this journal if it is a transfer with foreign currency info
|
||||
if ($this->isForeignCurrencyTransfer($journal)) {
|
||||
Log::debug(sprintf('Can skip foreign currency transfer #%d.', $journal->id));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$message = sprintf('Sum of journal #%d is not zero, journal is broken and now fixed.', $journal->id);
|
||||
|
||||
$this->friendlyWarning($message);
|
||||
app('log')->warning($message);
|
||||
|
||||
$destination->amount = $amount;
|
||||
$destination->save();
|
||||
|
||||
$message = sprintf('Corrected amount in transaction journal #%d', $param);
|
||||
$this->friendlyInfo($message);
|
||||
++$this->count;
|
||||
}
|
||||
|
||||
private function fixUnevenAmounts(): void
|
||||
{
|
||||
$count = 0;
|
||||
$journals = \DB::table('transactions')
|
||||
->groupBy('transaction_journal_id')
|
||||
->whereNull('deleted_at')
|
||||
@@ -126,7 +146,7 @@ class FixUnevenAmount extends Command
|
||||
);
|
||||
$this->friendlyWarning($message);
|
||||
app('log')->warning($message);
|
||||
++$count;
|
||||
++$this->count;
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -140,18 +160,10 @@ class FixUnevenAmount extends Command
|
||||
Log::error($e->getTraceAsString());
|
||||
}
|
||||
if (0 !== $res) {
|
||||
$message = sprintf(
|
||||
'Sum of journal #%d is %s instead of zero.',
|
||||
$entry->transaction_journal_id,
|
||||
$entry->the_sum
|
||||
);
|
||||
$this->friendlyWarning($message);
|
||||
app('log')->warning($message);
|
||||
$this->fixJournal($entry->transaction_journal_id);
|
||||
++$count;
|
||||
}
|
||||
}
|
||||
if (0 === $count) {
|
||||
if (0 === $this->count) {
|
||||
$this->friendlyPositive('Database amount integrity is OK');
|
||||
}
|
||||
}
|
||||
@@ -162,16 +174,119 @@ class FixUnevenAmount extends Command
|
||||
->where('transactions.transaction_currency_id', '!=', \DB::raw('transaction_journals.transaction_currency_id'))
|
||||
->get(['transaction_journals.*'])
|
||||
;
|
||||
if (0 === $journals->count()) {
|
||||
|
||||
$count = 0;
|
||||
|
||||
/** @var TransactionJournal $journal */
|
||||
foreach ($journals as $journal) {
|
||||
if (!$this->isForeignCurrencyTransfer($journal)) {
|
||||
Transaction::where('transaction_journal_id', $journal->id)->update(['transaction_currency_id' => $journal->transaction_currency_id]);
|
||||
++$count;
|
||||
|
||||
continue;
|
||||
}
|
||||
Log::debug(sprintf('Can skip foreign currency transfer #%d.', $journal->id));
|
||||
}
|
||||
if (0 === $count) {
|
||||
$this->friendlyPositive('Journal currency integrity is OK');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var TransactionJournal $journal */
|
||||
foreach ($journals as $journal) {
|
||||
Transaction::where('transaction_journal_id', $journal->id)->update(['transaction_currency_id' => $journal->transaction_currency_id]);
|
||||
}
|
||||
$this->friendlyPositive(sprintf('Fixed %d journal(s) with mismatched currencies.', $journals->count()));
|
||||
}
|
||||
|
||||
private function isForeignCurrencyTransfer(TransactionJournal $journal): bool
|
||||
{
|
||||
if (TransactionType::TRANSFER !== $journal->transactionType->type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @var Transaction $destination */
|
||||
$destination = $journal->transactions()->where('amount', '>', 0)->first();
|
||||
|
||||
/** @var Transaction $source */
|
||||
$source = $journal->transactions()->where('amount', '<', 0)->first();
|
||||
|
||||
// safety catch on NULL should not be necessary, we just had that catch.
|
||||
// source amount = dest foreign amount
|
||||
// source currency = dest foreign currency
|
||||
// dest amount = source foreign currency
|
||||
// dest currency = source foreign currency
|
||||
|
||||
// Log::debug(sprintf('[a] %s', bccomp(app('steam')->positive($source->amount), app('steam')->positive($destination->foreign_amount))));
|
||||
// Log::debug(sprintf('[b] %s', bccomp(app('steam')->positive($destination->amount), app('steam')->positive($source->foreign_amount))));
|
||||
// Log::debug(sprintf('[c] %s', var_export($source->transaction_currency_id === $destination->foreign_currency_id,true)));
|
||||
// Log::debug(sprintf('[d] %s', var_export((int) $destination->transaction_currency_id ===(int) $source->foreign_currency_id, true)));
|
||||
|
||||
if (0 === bccomp(app('steam')->positive($source->amount), app('steam')->positive($destination->foreign_amount))
|
||||
&& $source->transaction_currency_id === $destination->foreign_currency_id
|
||||
&& 0 === bccomp(app('steam')->positive($destination->amount), app('steam')->positive($source->foreign_amount))
|
||||
&& (int) $destination->transaction_currency_id === (int) $source->foreign_currency_id
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function convertOldStyleTransfers(): void
|
||||
{
|
||||
Log::debug('convertOldStyleTransfers()');
|
||||
// select transactions with a foreign amount and a foreign currency. and it's a transfer. and they are different.
|
||||
$transactions = Transaction::distinct()
|
||||
->whereNotNull('foreign_currency_id')
|
||||
->whereNotNull('foreign_amount')->get(['transactions.transaction_journal_id'])
|
||||
;
|
||||
$count = 0;
|
||||
|
||||
Log::debug(sprintf('Found %d potential journal(s)', $transactions->count()));
|
||||
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($transactions as $transaction) {
|
||||
/** @var null|TransactionJournal $journal */
|
||||
$journal = TransactionJournal::find($transaction->transaction_journal_id);
|
||||
if (null === $journal) {
|
||||
Log::debug('Found no journal, continue.');
|
||||
|
||||
continue;
|
||||
}
|
||||
// needs to be a transfer.
|
||||
if (TransactionType::TRANSFER !== $journal->transactionType->type) {
|
||||
Log::debug('Must be a transfer, continue.');
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
/** @var null|Transaction $destination */
|
||||
$destination = $journal->transactions()->where('amount', '>', 0)->first();
|
||||
|
||||
/** @var null|Transaction $source */
|
||||
$source = $journal->transactions()->where('amount', '<', 0)->first();
|
||||
if (null === $destination || null === $source) {
|
||||
Log::debug('Source or destination transaction is NULL, continue.');
|
||||
|
||||
// will be picked up later.
|
||||
continue;
|
||||
}
|
||||
if ($source->transaction_currency_id === $destination->transaction_currency_id) {
|
||||
Log::debug('Ready to swap data between transactions.');
|
||||
$destination->foreign_currency_id = $source->transaction_currency_id;
|
||||
$destination->foreign_amount = app('steam')->positive($source->amount);
|
||||
$destination->transaction_currency_id = $source->foreign_currency_id;
|
||||
$destination->amount = app('steam')->positive($source->foreign_amount);
|
||||
$destination->balance_dirty = true;
|
||||
$source->balance_dirty = true;
|
||||
$destination->save();
|
||||
$source->save();
|
||||
$this->friendlyWarning(sprintf('Corrected foreign amounts of transfer #%d.', $journal->id));
|
||||
++$count;
|
||||
}
|
||||
}
|
||||
if (0 === $count) {
|
||||
$this->friendlyPositive('No "old style" foreign currency transfers.');
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,9 +44,10 @@ class CorrectAccountBalance extends Command
|
||||
|
||||
return 0;
|
||||
}
|
||||
$this->correctBalanceAmounts();
|
||||
$this->friendlyWarning('This command has been disabled.');
|
||||
$this->markAsExecuted();
|
||||
|
||||
// $this->correctBalanceAmounts();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class OtherCurrenciesCorrections extends Command
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool)$configVar->data;
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -120,7 +120,7 @@ class OtherCurrenciesCorrections extends Command
|
||||
$this->journalRepos->setUser($journal->user);
|
||||
$this->cliRepos->setUser($journal->user);
|
||||
|
||||
$leadTransaction = $this->getLeadTransaction($journal);
|
||||
$leadTransaction = $this->getLeadTransaction($journal);
|
||||
|
||||
if (null === $leadTransaction) {
|
||||
$this->friendlyError(sprintf('Could not reliably determine which transaction is in the lead for transaction journal #%d.', $journal->id));
|
||||
@@ -128,8 +128,9 @@ class OtherCurrenciesCorrections extends Command
|
||||
return;
|
||||
}
|
||||
|
||||
$account = $leadTransaction->account;
|
||||
$currency = $this->getCurrency($account);
|
||||
$account = $leadTransaction->account;
|
||||
$currency = $this->getCurrency($account);
|
||||
$isMultiCurrency = $this->isMultiCurrency($account);
|
||||
if (null === $currency) {
|
||||
$this->friendlyError(
|
||||
sprintf(
|
||||
@@ -145,14 +146,14 @@ class OtherCurrenciesCorrections extends Command
|
||||
}
|
||||
// fix each transaction:
|
||||
$journal->transactions->each(
|
||||
static function (Transaction $transaction) use ($currency): void {
|
||||
static function (Transaction $transaction) use ($currency, $isMultiCurrency): void {
|
||||
if (null === $transaction->transaction_currency_id) {
|
||||
$transaction->transaction_currency_id = $currency->id;
|
||||
$transaction->save();
|
||||
}
|
||||
|
||||
// when mismatch in transaction:
|
||||
if ($transaction->transaction_currency_id !== $currency->id) {
|
||||
if ($transaction->transaction_currency_id !== $currency->id && !$isMultiCurrency) {
|
||||
$transaction->foreign_currency_id = $transaction->transaction_currency_id;
|
||||
$transaction->foreign_amount = $transaction->amount;
|
||||
$transaction->transaction_currency_id = $currency->id;
|
||||
@@ -161,7 +162,9 @@ class OtherCurrenciesCorrections extends Command
|
||||
}
|
||||
);
|
||||
// also update the journal, of course:
|
||||
$journal->transaction_currency_id = $currency->id;
|
||||
if (!$isMultiCurrency) {
|
||||
$journal->transaction_currency_id = $currency->id;
|
||||
}
|
||||
++$this->count;
|
||||
$journal->save();
|
||||
}
|
||||
@@ -239,4 +242,14 @@ class OtherCurrenciesCorrections extends Command
|
||||
{
|
||||
app('fireflyconfig')->set(self::CONFIG_NAME, true);
|
||||
}
|
||||
|
||||
private function isMultiCurrency(Account $account): bool
|
||||
{
|
||||
$value = $this->accountRepos->getMetaValue($account, 'is_multi_currency', false);
|
||||
if (false === $value || null === $value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return '1' === $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ use FireflyIII\Support\NullArrayObject;
|
||||
use FireflyIII\User;
|
||||
use FireflyIII\Validation\AccountValidator;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class TransactionJournalFactory
|
||||
@@ -261,8 +262,24 @@ class TransactionJournalFactory
|
||||
$transactionFactory->setForeignCurrency($foreignCurrency);
|
||||
$transactionFactory->setReconciled($row['reconciled'] ?? false);
|
||||
|
||||
// if the foreign currency is set and is different, and the transaction type is a transfer,
|
||||
// Firefly III will save the foreign currency information in such a way that both
|
||||
// asset accounts can look at the "amount" and "transaction_currency_id" column and
|
||||
// see the currency they expect to see.
|
||||
$amount = (string)$row['amount'];
|
||||
$foreignAmount = (string)$row['foreign_amount'];
|
||||
if (null !== $foreignCurrency && $foreignCurrency->id !== $currency->id
|
||||
&& TransactionType::TRANSFER === $type->type
|
||||
) {
|
||||
$transactionFactory->setCurrency($foreignCurrency);
|
||||
$transactionFactory->setForeignCurrency($currency);
|
||||
$amount = (string)$row['foreign_amount'];
|
||||
$foreignAmount = (string)$row['amount'];
|
||||
Log::debug('Swap native/foreign amounts in transfer for new save method.');
|
||||
}
|
||||
|
||||
try {
|
||||
$transactionFactory->createPositive((string)$row['amount'], (string)$row['foreign_amount']);
|
||||
$transactionFactory->createPositive($amount, $foreignAmount);
|
||||
} catch (FireflyException $e) {
|
||||
app('log')->error(sprintf('Exception creating positive transaction: %s', $e->getMessage()));
|
||||
$this->forceTrDelete($negative);
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace FireflyIII\Handlers\Observer;
|
||||
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class TransactionObserver
|
||||
@@ -39,13 +40,19 @@ class TransactionObserver
|
||||
|
||||
public function updated(Transaction $transaction): void
|
||||
{
|
||||
app('log')->debug('Observe "updated" of a transaction.');
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
Log::debug('Observe "updated" of a transaction.');
|
||||
if (1 === bccomp($transaction->amount, '0')) {
|
||||
Log::debug('Trigger recalculateForJournal');
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
}
|
||||
}
|
||||
|
||||
public function created(Transaction $transaction): void
|
||||
{
|
||||
app('log')->debug('Observe "created" of a transaction.');
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
Log::debug('Observe "created" of a transaction.');
|
||||
if (1 === bccomp($transaction->amount, '0')) {
|
||||
Log::debug('Trigger recalculateForJournal');
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Support\Http\Controllers\GetConfigurationData;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
@@ -94,6 +95,7 @@ class DebugController extends Controller
|
||||
|
||||
// also do some recalculations.
|
||||
Artisan::call('firefly-iii:trigger-credit-recalculation');
|
||||
AccountBalanceCalculator::forceRecalculateAll();
|
||||
|
||||
try {
|
||||
Artisan::call('twig:clean');
|
||||
|
||||
@@ -5,7 +5,10 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\JsonApi\V2\Accounts;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Rules\Account\IsValidAccountType;
|
||||
use FireflyIII\Rules\IsAllowedGroupAction;
|
||||
use FireflyIII\Rules\IsDateOrTime;
|
||||
use FireflyIII\Rules\IsValidDateRange;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\Laravel\Http\Requests\ResourceQuery;
|
||||
use LaravelJsonApi\Validation\Rule as JsonApiRule;
|
||||
@@ -18,6 +21,7 @@ class AccountCollectionQuery extends ResourceQuery
|
||||
public function rules(): array
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
$validFilters = config('api.valid_api_filters')[Account::class];
|
||||
|
||||
return [
|
||||
'fields' => [
|
||||
@@ -25,15 +29,28 @@ class AccountCollectionQuery extends ResourceQuery
|
||||
'array',
|
||||
JsonApiRule::fieldSets(),
|
||||
],
|
||||
'user_group_id' => [
|
||||
'userGroupId' => [
|
||||
'nullable',
|
||||
'integer',
|
||||
new IsAllowedGroupAction(Account::class, request()->method()),
|
||||
],
|
||||
'startPeriod' => [
|
||||
'nullable',
|
||||
'date',
|
||||
new IsDateOrTime(),
|
||||
new IsValidDateRange(),
|
||||
],
|
||||
'endPeriod' => [
|
||||
'nullable',
|
||||
'date',
|
||||
new IsDateOrTime(),
|
||||
new IsValidDateRange(),
|
||||
],
|
||||
'filter' => [
|
||||
'nullable',
|
||||
'array',
|
||||
JsonApiRule::filter(),
|
||||
JsonApiRule::filter($validFilters),
|
||||
new IsValidAccountType(),
|
||||
],
|
||||
'include' => [
|
||||
'nullable',
|
||||
|
||||
@@ -27,6 +27,7 @@ use FireflyIII\Models\Account;
|
||||
use FireflyIII\Support\JsonApi\Concerns\UsergroupAware;
|
||||
use FireflyIII\Support\JsonApi\Enrichments\AccountEnrichment;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\Contracts\Store\CreatesResources;
|
||||
use LaravelJsonApi\Contracts\Store\QueriesAll;
|
||||
use LaravelJsonApi\NonEloquent\AbstractRepository;
|
||||
use LaravelJsonApi\NonEloquent\Capabilities\CrudRelations;
|
||||
@@ -43,7 +44,7 @@ use LaravelJsonApi\NonEloquent\Concerns\HasRelationsCapability;
|
||||
* This is necessary because the user can't just query all accounts (it would return other user's data)
|
||||
* and because we also need to collect all kinds of metadata, like the currency and user info.
|
||||
*/
|
||||
class AccountRepository extends AbstractRepository implements QueriesAll
|
||||
class AccountRepository extends AbstractRepository implements QueriesAll, CreatesResources
|
||||
{
|
||||
use HasCrudCapability;
|
||||
use HasRelationsCapability;
|
||||
@@ -52,17 +53,22 @@ class AccountRepository extends AbstractRepository implements QueriesAll
|
||||
/**
|
||||
* SiteRepository constructor.
|
||||
*/
|
||||
public function __construct() {}
|
||||
public function __construct()
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
}
|
||||
|
||||
public function exists(string $resourceId): bool
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
$result = null !== Account::find((int) $resourceId);
|
||||
Log::debug(sprintf('%s: %s', __METHOD__, var_export($result, true)));
|
||||
|
||||
return null !== Account::find((int) $resourceId);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function find(string $resourceId): ?object
|
||||
{
|
||||
exit(__METHOD__);
|
||||
Log::debug(__METHOD__);
|
||||
// throw new \RuntimeException('trace me');
|
||||
$account = Account::find((int) $resourceId);
|
||||
@@ -88,11 +94,15 @@ class AccountRepository extends AbstractRepository implements QueriesAll
|
||||
|
||||
protected function crud(): Capabilities\CrudAccount
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
|
||||
return Capabilities\CrudAccount::make();
|
||||
}
|
||||
|
||||
protected function relations(): CrudRelations
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
|
||||
return Capabilities\CrudAccountRelations::make();
|
||||
}
|
||||
}
|
||||
|
||||
33
app/JsonApi/V2/Accounts/AccountRequest.php
Normal file
33
app/JsonApi/V2/Accounts/AccountRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\JsonApi\V2\Accounts;
|
||||
|
||||
use FireflyIII\Rules\BelongsUser;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\Laravel\Http\Requests\ResourceRequest;
|
||||
|
||||
class AccountRequest extends ResourceRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules for the resource.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
|
||||
exit('am i used');
|
||||
|
||||
return [
|
||||
'type' => [
|
||||
new BelongsUser(),
|
||||
],
|
||||
'name' => [
|
||||
'nullable',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,6 @@ class AccountResource extends JsonApiResource
|
||||
*/
|
||||
public function id(): string
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
|
||||
return (string) $this->resource->id;
|
||||
}
|
||||
|
||||
@@ -31,7 +29,7 @@ class AccountResource extends JsonApiResource
|
||||
*/
|
||||
public function attributes($request): iterable
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
// Log::debug(__METHOD__);
|
||||
|
||||
return [
|
||||
'created_at' => $this->resource->created_at,
|
||||
@@ -39,24 +37,36 @@ class AccountResource extends JsonApiResource
|
||||
'name' => $this->resource->name,
|
||||
'active' => $this->resource->active,
|
||||
'order' => $this->resource->order,
|
||||
'iban' => $this->resource->iban,
|
||||
'type' => $this->resource->account_type_string,
|
||||
'account_role' => $this->resource->account_role,
|
||||
'account_number' => '' === $this->resource->account_number ? null : $this->resource->account_number,
|
||||
|
||||
// currency
|
||||
// currency (if the account has a currency setting, otherwise NULL).
|
||||
'currency_id' => $this->resource->currency_id,
|
||||
'currency_name' => $this->resource->currency_name,
|
||||
'currency_code' => $this->resource->currency_code,
|
||||
'currency_symbol' => $this->resource->currency_symbol,
|
||||
'currency_decimal_places' => $this->resource->currency_decimal_places,
|
||||
'is_multi_currency' => '1' === $this->resource->is_multi_currency,
|
||||
|
||||
// balances
|
||||
'balance' => $this->resource->balance,
|
||||
'native_balance' => $this->resource->native_balance,
|
||||
|
||||
// liability things
|
||||
'liability_direction' => $this->resource->liability_direction,
|
||||
'interest' => $this->resource->interest,
|
||||
'interest_period' => $this->resource->interest_period,
|
||||
'current_debt' => $this->resource->current_debt,
|
||||
'current_debt' => $this->resource->current_debt, // TODO may be removed in the future.
|
||||
|
||||
// other things
|
||||
'last_activity' => $this->resource->last_activity,
|
||||
|
||||
// object group
|
||||
'object_group_id' => $this->resource->object_group_id,
|
||||
'object_group_title' => $this->resource->object_group_title,
|
||||
'object_group_order' => $this->resource->object_group_order,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ use LaravelJsonApi\Eloquent\Fields\Relations\HasOne;
|
||||
use LaravelJsonApi\NonEloquent\Fields\Attribute;
|
||||
use LaravelJsonApi\NonEloquent\Fields\ID;
|
||||
use LaravelJsonApi\NonEloquent\Filters\Filter;
|
||||
use LaravelJsonApi\NonEloquent\Pagination\EnumerablePagination;
|
||||
|
||||
class AccountSchema extends Schema
|
||||
{
|
||||
@@ -35,12 +36,13 @@ class AccountSchema extends Schema
|
||||
Attribute::make('updated_at'),
|
||||
|
||||
// basic info and meta data
|
||||
Attribute::make('name'),
|
||||
Attribute::make('active'),
|
||||
Attribute::make('order'),
|
||||
Attribute::make('name')->sortable(),
|
||||
Attribute::make('active')->sortable(),
|
||||
Attribute::make('order')->sortable(),
|
||||
Attribute::make('iban')->sortable(),
|
||||
Attribute::make('type'),
|
||||
Attribute::make('account_role'),
|
||||
Attribute::make('account_number'),
|
||||
Attribute::make('account_number')->sortable(),
|
||||
|
||||
// currency
|
||||
Attribute::make('currency_id'),
|
||||
@@ -48,16 +50,28 @@ class AccountSchema extends Schema
|
||||
Attribute::make('currency_code'),
|
||||
Attribute::make('currency_symbol'),
|
||||
Attribute::make('currency_decimal_places'),
|
||||
Attribute::make('is_multi_currency'),
|
||||
|
||||
// balance
|
||||
Attribute::make('balance')->sortable(),
|
||||
Attribute::make('native_balance')->sortable(),
|
||||
|
||||
// liability things
|
||||
Attribute::make('liability_direction'),
|
||||
Attribute::make('interest'),
|
||||
Attribute::make('interest_period'),
|
||||
Attribute::make('current_debt'),
|
||||
Attribute::make('current_debt')->sortable(),
|
||||
|
||||
// dynamic data
|
||||
Attribute::make('last_activity'),
|
||||
Attribute::make('last_activity')->sortable(),
|
||||
Attribute::make('balance_difference')->sortable(), // only used for sort.
|
||||
|
||||
// group
|
||||
Attribute::make('object_group_id'),
|
||||
Attribute::make('object_group_title'),
|
||||
Attribute::make('object_group_order'),
|
||||
|
||||
// relations.
|
||||
HasOne::make('user')->readOnly(),
|
||||
];
|
||||
}
|
||||
@@ -68,10 +82,13 @@ class AccountSchema extends Schema
|
||||
public function filters(): array
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
$array = [];
|
||||
$config = config('api.valid_api_filters')[Account::class];
|
||||
foreach ($config as $entry) {
|
||||
$array[] = Filter::make($entry);
|
||||
}
|
||||
|
||||
return [
|
||||
Filter::make('id'),
|
||||
];
|
||||
return $array;
|
||||
}
|
||||
|
||||
public function repository(): AccountRepository
|
||||
@@ -85,4 +102,11 @@ class AccountSchema extends Schema
|
||||
->withUserGroup($this->userGroup)
|
||||
;
|
||||
}
|
||||
|
||||
public function pagination(): EnumerablePagination
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
|
||||
return EnumerablePagination::make();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,66 +23,119 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\JsonApi\V2\Accounts\Capabilities;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
use FireflyIII\Support\JsonApi\CollectsCustomParameters;
|
||||
use FireflyIII\Support\JsonApi\Concerns\UsergroupAware;
|
||||
use FireflyIII\Support\JsonApi\Enrichments\AccountEnrichment;
|
||||
use FireflyIII\Support\JsonApi\ExpandsQuery;
|
||||
use FireflyIII\Support\JsonApi\FiltersPagination;
|
||||
use FireflyIII\Support\JsonApi\SortsCollection;
|
||||
use FireflyIII\Support\JsonApi\SortsQueryResults;
|
||||
use FireflyIII\Support\JsonApi\ValidateSortParameters;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\Contracts\Pagination\Page;
|
||||
use LaravelJsonApi\Contracts\Store\HasPagination;
|
||||
use LaravelJsonApi\NonEloquent\Capabilities\QueryAll;
|
||||
use LaravelJsonApi\NonEloquent\Concerns\PaginatesEnumerables;
|
||||
|
||||
class AccountQuery extends QueryAll implements HasPagination
|
||||
{
|
||||
use AccountFilter;
|
||||
use CollectsCustomParameters;
|
||||
use ExpandsQuery;
|
||||
use FiltersPagination;
|
||||
use PaginatesEnumerables;
|
||||
use SortsCollection;
|
||||
use SortsQueryResults;
|
||||
use UsergroupAware;
|
||||
use ValidateSortParameters;
|
||||
|
||||
// use PaginatesEnumerables;
|
||||
|
||||
#[\Override]
|
||||
/**
|
||||
* This method returns all accounts, given a bunch of filters and sort fields, together with pagination.
|
||||
*
|
||||
* It is only used on the index, and nowhere else.
|
||||
*/
|
||||
public function get(): iterable
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
// collect filters
|
||||
$filters = $this->queryParameters->filter();
|
||||
// collect sort options
|
||||
$sort = $this->queryParameters->sortFields();
|
||||
$sort = $this->queryParameters->sortFields();
|
||||
|
||||
// collect pagination based on the page
|
||||
$pagination = $this->filtersPagination($this->queryParameters->page());
|
||||
$pagination = $this->filtersPagination($this->queryParameters->page());
|
||||
|
||||
// check if we need all accounts, regardless of pagination
|
||||
// This is necessary when the user wants to sort on specific params.
|
||||
$needsAll = $this->needsFullDataset('account', $sort);
|
||||
$needsAll = $this->needsFullDataset(Account::class, $sort);
|
||||
|
||||
// params that were not recognised, may be my own custom stuff.
|
||||
$otherParams = $this->getOtherParams($this->queryParameters->unrecognisedParameters());
|
||||
|
||||
// start the query
|
||||
$query = $this->userGroup->accounts();
|
||||
|
||||
// add pagination to the query, limiting the results.
|
||||
if (!$needsAll) {
|
||||
$query = $this->addPagination($query, $pagination);
|
||||
}
|
||||
$query = $this->userGroup->accounts();
|
||||
|
||||
// add sort and filter parameters to the query.
|
||||
$query = $this->addSortParams($query, $sort);
|
||||
$query = $this->addFilterParams('account', $query, $filters);
|
||||
$query = $this->addSortParams(Account::class, $query, $sort);
|
||||
$query = $this->addFilterParams(Account::class, $query, $this->queryParameters->filter());
|
||||
|
||||
// collect the result.
|
||||
$collection = $query->get(['accounts.*']);
|
||||
|
||||
// enrich the collected data
|
||||
$enrichment = new AccountEnrichment();
|
||||
$collection = $enrichment->enrich($collection);
|
||||
|
||||
// TODO add filters after the query, if there are filters that cannot be applied to the database but only
|
||||
// to the enriched results.
|
||||
|
||||
$collection = $query->get(['accounts.*']);
|
||||
// sort the data after the query, and return it right away.
|
||||
return $this->sortCollection($collection, $sort);
|
||||
$collection = $this->sortCollection(Account::class, $collection, $sort);
|
||||
|
||||
// if the entire collection needs to be enriched and sorted, do so now:
|
||||
$totalCount = $collection->count();
|
||||
Log::debug(sprintf('Total is %d', $totalCount));
|
||||
if ($needsAll) {
|
||||
Log::debug('Needs the entire collection');
|
||||
// enrich the entire collection
|
||||
$enrichment = new AccountEnrichment();
|
||||
$enrichment->setStart($otherParams['start'] ?? null);
|
||||
$enrichment->setEnd($otherParams['end'] ?? null);
|
||||
$collection = $enrichment->enrich($collection);
|
||||
|
||||
// TODO sort the set based on post-query sort options:
|
||||
$collection = $this->postQuerySort(Account::class, $collection, $sort);
|
||||
|
||||
// take the current page from the enriched set.
|
||||
$currentPage = $collection->skip(($pagination['number'] - 1) * $pagination['size'])->take($pagination['size']);
|
||||
}
|
||||
if (!$needsAll) {
|
||||
Log::debug('Needs only partial collection');
|
||||
// take from the collection the filtered page + page number:
|
||||
$currentPage = $collection->skip(($pagination['number'] - 1) * $pagination['size'])->take($pagination['size']);
|
||||
|
||||
// enrich only the current page.
|
||||
$enrichment = new AccountEnrichment();
|
||||
$enrichment->setStart($otherParams['start'] ?? null);
|
||||
$enrichment->setEnd($otherParams['end'] ?? null);
|
||||
$currentPage = $enrichment->enrich($currentPage);
|
||||
}
|
||||
// get current page?
|
||||
Log::debug(sprintf('Skip %d, take %d', ($pagination['number'] - 1) * $pagination['size'], $pagination['size']));
|
||||
// $currentPage = $collection->skip(($pagination['number'] - 1) * $pagination['size'])->take($pagination['size']);
|
||||
Log::debug(sprintf('New collection size: %d', $currentPage->count()));
|
||||
|
||||
// TODO add filters after the query, if there are filters that cannot be applied to the database
|
||||
// TODO same for sort things.
|
||||
|
||||
return new LengthAwarePaginator($currentPage, $totalCount, $pagination['size'], $pagination['number']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function paginate(array $page): Page
|
||||
{
|
||||
exit('here weare');
|
||||
// TODO: Implement paginate() method.
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getOrPaginate(?array $page): iterable
|
||||
{
|
||||
exit('here weare');
|
||||
// TODO: Implement getOrPaginate() method.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,19 +24,35 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\JsonApi\V2\Accounts\Capabilities;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Support\JsonApi\CollectsCustomParameters;
|
||||
use FireflyIII\Support\JsonApi\Enrichments\AccountEnrichment;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\NonEloquent\Capabilities\CrudResource;
|
||||
|
||||
class CrudAccount extends CrudResource
|
||||
{
|
||||
use CollectsCustomParameters;
|
||||
|
||||
/**
|
||||
* Read the supplied site.
|
||||
*/
|
||||
public function read(Account $account): ?Account
|
||||
{
|
||||
$otherParams = $this->getOtherParams($this->request->query->all());
|
||||
|
||||
Log::debug(__METHOD__);
|
||||
// enrich the collected data
|
||||
$enrichment = new AccountEnrichment();
|
||||
$enrichment = new AccountEnrichment();
|
||||
|
||||
// set start and date, if present.
|
||||
$enrichment->setStart($otherParams['start'] ?? null);
|
||||
$enrichment->setEnd($otherParams['end'] ?? null);
|
||||
|
||||
return $enrichment->enrichSingle($account);
|
||||
}
|
||||
|
||||
public function create(array $validatedData): Account
|
||||
{
|
||||
exit('here we are');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class Server extends BaseServer
|
||||
*/
|
||||
protected function allSchemas(): array
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
// Log::debug(__METHOD__);
|
||||
|
||||
return [
|
||||
AccountSchema::class,
|
||||
|
||||
@@ -23,15 +23,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -39,83 +36,10 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Class Account
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $account_type_id
|
||||
* @property string $account_type_string
|
||||
* @property string $name
|
||||
* @property string $virtual_balance
|
||||
* @property null|string $iban
|
||||
* @property bool $active
|
||||
* @property bool $encrypted
|
||||
* @property int $order
|
||||
* @property AccountMeta[]|Collection $accountMeta
|
||||
* @property null|int $account_meta_count
|
||||
* @property AccountType $accountType
|
||||
* @property Attachment[]|Collection $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property string $account_number
|
||||
* @property string $edit_name
|
||||
* @property Collection|Location[] $locations
|
||||
* @property null|int $locations_count
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
* @property Collection|ObjectGroup[] $objectGroups
|
||||
* @property null|int $object_groups_count
|
||||
* @property Collection|PiggyBank[] $piggyBanks
|
||||
* @property null|int $piggy_banks_count
|
||||
* @property Collection|Transaction[] $transactions
|
||||
* @property null|int $transactions_count
|
||||
* @property User $user
|
||||
* @property string $last_activity
|
||||
*
|
||||
* @method static EloquentBuilder|Account accountTypeIn($types)
|
||||
* @method static EloquentBuilder|Account newModelQuery()
|
||||
* @method static EloquentBuilder|Account newQuery()
|
||||
* @method static Builder|Account onlyTrashed()
|
||||
* @method static EloquentBuilder|Account query()
|
||||
* @method static EloquentBuilder|Account whereAccountTypeId($value)
|
||||
* @method static EloquentBuilder|Account whereActive($value)
|
||||
* @method static EloquentBuilder|Account whereCreatedAt($value)
|
||||
* @method static EloquentBuilder|Account whereDeletedAt($value)
|
||||
* @method static EloquentBuilder|Account whereEncrypted($value)
|
||||
* @method static EloquentBuilder|Account whereIban($value)
|
||||
* @method static EloquentBuilder|Account whereId($value)
|
||||
* @method static EloquentBuilder|Account whereName($value)
|
||||
* @method static EloquentBuilder|Account whereOrder($value)
|
||||
* @method static EloquentBuilder|Account whereUpdatedAt($value)
|
||||
* @method static EloquentBuilder|Account whereUserId($value)
|
||||
* @method static EloquentBuilder|Account whereVirtualBalance($value)
|
||||
* @method static Builder|Account withTrashed()
|
||||
* @method static Builder|Account withoutTrashed()
|
||||
*
|
||||
* @property Carbon $lastActivityDate
|
||||
* @property string $startBalance
|
||||
* @property string $endBalance
|
||||
* @property string $difference
|
||||
* @property string $interest
|
||||
* @property string $interestPeriod
|
||||
* @property string $accountTypeString
|
||||
* @property Location $location
|
||||
* @property string $liability_direction
|
||||
* @property string $current_debt
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static EloquentBuilder|Account whereUserGroupId($value)
|
||||
*
|
||||
* @property null|UserGroup $userGroup
|
||||
* @property mixed $account_id
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperAccount
|
||||
*/
|
||||
class Account extends Model
|
||||
{
|
||||
|
||||
@@ -8,6 +8,9 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* @mixin IdeHelperAccountBalance
|
||||
*/
|
||||
class AccountBalance extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
@@ -23,35 +23,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* Class AccountMeta
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $account_id
|
||||
* @property string $name
|
||||
* @property mixed $data
|
||||
* @property Account $account
|
||||
*
|
||||
* @method static Builder|AccountMeta newModelQuery()
|
||||
* @method static Builder|AccountMeta newQuery()
|
||||
* @method static Builder|AccountMeta query()
|
||||
* @method static Builder|AccountMeta whereAccountId($value)
|
||||
* @method static Builder|AccountMeta whereCreatedAt($value)
|
||||
* @method static Builder|AccountMeta whereData($value)
|
||||
* @method static Builder|AccountMeta whereId($value)
|
||||
* @method static Builder|AccountMeta whereName($value)
|
||||
* @method static Builder|AccountMeta whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperAccountMeta
|
||||
*/
|
||||
class AccountMeta extends Model
|
||||
{
|
||||
|
||||
@@ -23,33 +23,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\AccountType
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property string $type
|
||||
* @property Account[]|Collection $accounts
|
||||
* @property null|int $accounts_count
|
||||
*
|
||||
* @method static Builder|AccountType newModelQuery()
|
||||
* @method static Builder|AccountType newQuery()
|
||||
* @method static Builder|AccountType query()
|
||||
* @method static Builder|AccountType whereCreatedAt($value)
|
||||
* @method static Builder|AccountType whereId($value)
|
||||
* @method static Builder|AccountType whereType($value)
|
||||
* @method static Builder|AccountType whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperAccountType
|
||||
*/
|
||||
class AccountType extends Model
|
||||
{
|
||||
|
||||
@@ -23,71 +23,19 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Attachment
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $attachable_id
|
||||
* @property string $attachable_type
|
||||
* @property bool $file_exists
|
||||
* @property string $md5
|
||||
* @property string $filename
|
||||
* @property null|string $title
|
||||
* @property null|string $description
|
||||
* @property string $mime
|
||||
* @property int|string $size
|
||||
* @property bool $uploaded
|
||||
* @property string $notes_text
|
||||
* @property \Eloquent|Model $attachable
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment newQuery()
|
||||
* @method static Builder|Attachment onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereAttachableId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereAttachableType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereFilename($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereMd5($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereMime($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereSize($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUploaded($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUserId($value)
|
||||
* @method static Builder|Attachment withTrashed()
|
||||
* @method static Builder|Attachment withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperAttachment
|
||||
*/
|
||||
class Attachment extends Model
|
||||
{
|
||||
|
||||
@@ -24,53 +24,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
/**
|
||||
* Class AuditLogEntry
|
||||
*
|
||||
* @property \Eloquent|Model $auditable
|
||||
* @property \Eloquent|Model $changer
|
||||
*
|
||||
* @method static Builder|AuditLogEntry newModelQuery()
|
||||
* @method static Builder|AuditLogEntry newQuery()
|
||||
* @method static \Illuminate\Database\Query\Builder|AuditLogEntry onlyTrashed()
|
||||
* @method static Builder|AuditLogEntry query()
|
||||
* @method static \Illuminate\Database\Query\Builder|AuditLogEntry withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|AuditLogEntry withoutTrashed()
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $auditable_id
|
||||
* @property string $auditable_type
|
||||
* @property int $changer_id
|
||||
* @property string $changer_type
|
||||
* @property string $action
|
||||
* @property null|array $before
|
||||
* @property null|array $after
|
||||
*
|
||||
* @method static Builder|AuditLogEntry whereAction($value)
|
||||
* @method static Builder|AuditLogEntry whereAfter($value)
|
||||
* @method static Builder|AuditLogEntry whereAuditableId($value)
|
||||
* @method static Builder|AuditLogEntry whereAuditableType($value)
|
||||
* @method static Builder|AuditLogEntry whereBefore($value)
|
||||
* @method static Builder|AuditLogEntry whereChangerId($value)
|
||||
* @method static Builder|AuditLogEntry whereChangerType($value)
|
||||
* @method static Builder|AuditLogEntry whereCreatedAt($value)
|
||||
* @method static Builder|AuditLogEntry whereDeletedAt($value)
|
||||
* @method static Builder|AuditLogEntry whereId($value)
|
||||
* @method static Builder|AuditLogEntry whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperAuditLogEntry
|
||||
*/
|
||||
class AuditLogEntry extends Model
|
||||
{
|
||||
|
||||
@@ -24,47 +24,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\AutoBudget
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $budget_id
|
||||
* @property int $transaction_currency_id
|
||||
* @property int|string $auto_budget_type
|
||||
* @property string $amount
|
||||
* @property string $period
|
||||
* @property Budget $budget
|
||||
* @property TransactionCurrency $transactionCurrency
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newQuery()
|
||||
* @method static Builder|AutoBudget onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereAutoBudgetType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereBudgetId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget wherePeriod($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereTransactionCurrencyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereUpdatedAt($value)
|
||||
* @method static Builder|AutoBudget withTrashed()
|
||||
* @method static Builder|AutoBudget withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperAutoBudget
|
||||
*/
|
||||
class AutoBudget extends Model
|
||||
{
|
||||
|
||||
@@ -23,8 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
@@ -32,45 +30,10 @@ use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\AvailableBudget
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $transaction_currency_id
|
||||
* @property string $amount
|
||||
* @property Carbon $start_date
|
||||
* @property Carbon $end_date
|
||||
* @property TransactionCurrency $transactionCurrency
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newQuery()
|
||||
* @method static Builder|AvailableBudget onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereEndDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereStartDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereTransactionCurrencyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUserId($value)
|
||||
* @method static Builder|AvailableBudget withTrashed()
|
||||
* @method static Builder|AvailableBudget withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperAvailableBudget
|
||||
*/
|
||||
class AvailableBudget extends Model
|
||||
{
|
||||
|
||||
@@ -23,88 +23,20 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Bill
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $transaction_currency_id
|
||||
* @property string $name
|
||||
* @property string $match
|
||||
* @property string $amount_min
|
||||
* @property string $amount_max
|
||||
* @property Carbon $date
|
||||
* @property null|Carbon $end_date
|
||||
* @property null|Carbon $extension_date
|
||||
* @property string $repeat_freq
|
||||
* @property int $skip
|
||||
* @property bool $automatch
|
||||
* @property bool $active
|
||||
* @property bool $name_encrypted
|
||||
* @property bool $match_encrypted
|
||||
* @property int $order
|
||||
* @property Attachment[]|Collection $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
* @property Collection|ObjectGroup[] $objectGroups
|
||||
* @property null|int $object_groups_count
|
||||
* @property null|TransactionCurrency $transactionCurrency
|
||||
* @property Collection|TransactionJournal[] $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill newQuery()
|
||||
* @method static Builder|Bill onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereAmountMax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereAmountMin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereAutomatch($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereEndDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereExtensionDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereMatch($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereMatchEncrypted($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereNameEncrypted($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereRepeatFreq($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereSkip($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereTransactionCurrencyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereUserId($value)
|
||||
* @method static Builder|Bill withTrashed()
|
||||
* @method static Builder|Bill withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Bill whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperBill
|
||||
*/
|
||||
class Bill extends Model
|
||||
{
|
||||
|
||||
@@ -23,71 +23,20 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Budget
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property string $name
|
||||
* @property bool $active
|
||||
* @property bool $encrypted
|
||||
* @property int $order
|
||||
* @property Attachment[]|Collection $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property AutoBudget[]|Collection $autoBudgets
|
||||
* @property null|int $auto_budgets_count
|
||||
* @property BudgetLimit[]|Collection $budgetlimits
|
||||
* @property null|int $budgetlimits_count
|
||||
* @property Collection|TransactionJournal[] $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property Collection|Transaction[] $transactions
|
||||
* @property null|int $transactions_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget newQuery()
|
||||
* @method static Builder|Budget onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereEncrypted($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserId($value)
|
||||
* @method static Builder|Budget withTrashed()
|
||||
* @method static Builder|Budget withoutTrashed()
|
||||
*
|
||||
* @property string $email
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserGroupId($value)
|
||||
*
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperBudget
|
||||
*/
|
||||
class Budget extends Model
|
||||
{
|
||||
|
||||
@@ -23,50 +23,17 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Events\Model\BudgetLimit\Created;
|
||||
use FireflyIII\Events\Model\BudgetLimit\Deleted;
|
||||
use FireflyIII\Events\Model\BudgetLimit\Updated;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\BudgetLimit
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $budget_id
|
||||
* @property int $transaction_currency_id
|
||||
* @property Carbon $start_date
|
||||
* @property null|Carbon $end_date
|
||||
* @property string $amount
|
||||
* @property string $spent
|
||||
* @property null|string $period
|
||||
* @property int|string $generated
|
||||
* @property Budget $budget
|
||||
* @property null|TransactionCurrency $transactionCurrency
|
||||
*
|
||||
* @method static Builder|BudgetLimit newModelQuery()
|
||||
* @method static Builder|BudgetLimit newQuery()
|
||||
* @method static Builder|BudgetLimit query()
|
||||
* @method static Builder|BudgetLimit whereAmount($value)
|
||||
* @method static Builder|BudgetLimit whereBudgetId($value)
|
||||
* @method static Builder|BudgetLimit whereCreatedAt($value)
|
||||
* @method static Builder|BudgetLimit whereEndDate($value)
|
||||
* @method static Builder|BudgetLimit whereGenerated($value)
|
||||
* @method static Builder|BudgetLimit whereId($value)
|
||||
* @method static Builder|BudgetLimit wherePeriod($value)
|
||||
* @method static Builder|BudgetLimit whereStartDate($value)
|
||||
* @method static Builder|BudgetLimit whereTransactionCurrencyId($value)
|
||||
* @method static Builder|BudgetLimit whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperBudgetLimit
|
||||
*/
|
||||
class BudgetLimit extends Model
|
||||
{
|
||||
|
||||
@@ -23,60 +23,18 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Category
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property string $name
|
||||
* @property Carbon $lastActivity
|
||||
* @property bool $encrypted
|
||||
* @property Attachment[]|Collection $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
* @property Collection|TransactionJournal[] $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property Collection|Transaction[] $transactions
|
||||
* @property null|int $transactions_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category newQuery()
|
||||
* @method static Builder|Category onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereEncrypted($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereUserId($value)
|
||||
* @method static Builder|Category withTrashed()
|
||||
* @method static Builder|Category withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperCategory
|
||||
*/
|
||||
class Category extends Model
|
||||
{
|
||||
|
||||
@@ -23,37 +23,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Configuration
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property mixed $data
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration newQuery()
|
||||
* @method static Builder|Configuration onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereData($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereUpdatedAt($value)
|
||||
* @method static Builder|Configuration withTrashed()
|
||||
* @method static Builder|Configuration withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperConfiguration
|
||||
*/
|
||||
class Configuration extends Model
|
||||
{
|
||||
|
||||
@@ -23,56 +23,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
/**
|
||||
* Class CurrencyExchangeRate
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|string $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $from_currency_id
|
||||
* @property int $to_currency_id
|
||||
* @property Carbon $date
|
||||
* @property string $rate
|
||||
* @property string $user_rate
|
||||
* @property TransactionCurrency $fromCurrency
|
||||
* @property TransactionCurrency $toCurrency
|
||||
* @property User $user
|
||||
*
|
||||
* @method static Builder|CurrencyExchangeRate newModelQuery()
|
||||
* @method static Builder|CurrencyExchangeRate newQuery()
|
||||
* @method static Builder|CurrencyExchangeRate query()
|
||||
* @method static Builder|CurrencyExchangeRate whereCreatedAt($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereDate($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereDeletedAt($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereFromCurrencyId($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereId($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereRate($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereToCurrencyId($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereUpdatedAt($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereUserId($value)
|
||||
* @method static Builder|CurrencyExchangeRate whereUserRate($value)
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static Builder|CurrencyExchangeRate whereUserGroupId($value)
|
||||
* @method static Builder|CurrencyExchangeRate onlyTrashed()
|
||||
* @method static Builder|CurrencyExchangeRate withTrashed()
|
||||
* @method static Builder|CurrencyExchangeRate withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperCurrencyExchangeRate
|
||||
*/
|
||||
class CurrencyExchangeRate extends Model
|
||||
{
|
||||
|
||||
@@ -24,42 +24,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* Class GroupMembership
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|string $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $user_group_id
|
||||
* @property int $user_role_id
|
||||
* @property User $user
|
||||
* @property UserGroup $userGroup
|
||||
* @property UserRole $userRole
|
||||
*
|
||||
* @method static Builder|GroupMembership newModelQuery()
|
||||
* @method static Builder|GroupMembership newQuery()
|
||||
* @method static Builder|GroupMembership query()
|
||||
* @method static Builder|GroupMembership whereCreatedAt($value)
|
||||
* @method static Builder|GroupMembership whereDeletedAt($value)
|
||||
* @method static Builder|GroupMembership whereId($value)
|
||||
* @method static Builder|GroupMembership whereUpdatedAt($value)
|
||||
* @method static Builder|GroupMembership whereUserGroupId($value)
|
||||
* @method static Builder|GroupMembership whereUserId($value)
|
||||
* @method static Builder|GroupMembership whereUserRoleId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperGroupMembership
|
||||
*/
|
||||
class GroupMembership extends Model
|
||||
{
|
||||
|
||||
@@ -24,46 +24,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Class InvitedUser
|
||||
*
|
||||
* @property User $user
|
||||
*
|
||||
* @method static Builder|InvitedUser newModelQuery()
|
||||
* @method static Builder|InvitedUser newQuery()
|
||||
* @method static Builder|InvitedUser query()
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $user_id
|
||||
* @property string $email
|
||||
* @property string $invite_code
|
||||
* @property Carbon $expires
|
||||
* @property bool $redeemed
|
||||
*
|
||||
* @method static Builder|InvitedUser whereCreatedAt($value)
|
||||
* @method static Builder|InvitedUser whereEmail($value)
|
||||
* @method static Builder|InvitedUser whereExpires($value)
|
||||
* @method static Builder|InvitedUser whereId($value)
|
||||
* @method static Builder|InvitedUser whereInviteCode($value)
|
||||
* @method static Builder|InvitedUser whereRedeemed($value)
|
||||
* @method static Builder|InvitedUser whereUpdatedAt($value)
|
||||
* @method static Builder|InvitedUser whereUserId($value)
|
||||
*
|
||||
* @property mixed $user_group_id
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperInvitedUser
|
||||
*/
|
||||
class InvitedUser extends Model
|
||||
{
|
||||
|
||||
@@ -23,47 +23,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\LinkType
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property string $outward
|
||||
* @property string $inward
|
||||
* @property int $journalCount
|
||||
* @property bool $editable
|
||||
* @property Collection|TransactionJournalLink[] $transactionJournalLinks
|
||||
* @property null|int $transaction_journal_links_count
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType newQuery()
|
||||
* @method static Builder|LinkType onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType whereEditable($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType whereInward($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType whereOutward($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|LinkType whereUpdatedAt($value)
|
||||
* @method static Builder|LinkType withTrashed()
|
||||
* @method static Builder|LinkType withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperLinkType
|
||||
*/
|
||||
class LinkType extends Model
|
||||
{
|
||||
|
||||
@@ -24,49 +24,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Location
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $locatable_id
|
||||
* @property string $locatable_type
|
||||
* @property null|float $latitude
|
||||
* @property null|float $longitude
|
||||
* @property null|int $zoom_level
|
||||
* @property Account[]|Collection $accounts
|
||||
* @property null|int $accounts_count
|
||||
* @property \Eloquent|Model $locatable
|
||||
*
|
||||
* @method static Builder|Location newModelQuery()
|
||||
* @method static Builder|Location newQuery()
|
||||
* @method static Builder|Location query()
|
||||
* @method static Builder|Location whereCreatedAt($value)
|
||||
* @method static Builder|Location whereDeletedAt($value)
|
||||
* @method static Builder|Location whereId($value)
|
||||
* @method static Builder|Location whereLatitude($value)
|
||||
* @method static Builder|Location whereLocatableId($value)
|
||||
* @method static Builder|Location whereLocatableType($value)
|
||||
* @method static Builder|Location whereLongitude($value)
|
||||
* @method static Builder|Location whereUpdatedAt($value)
|
||||
* @method static Builder|Location whereZoomLevel($value)
|
||||
*
|
||||
* @property Collection<int, TransactionJournal> $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperLocation
|
||||
*/
|
||||
class Location extends Model
|
||||
{
|
||||
|
||||
@@ -23,44 +23,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Note
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $noteable_id
|
||||
* @property string $noteable_type
|
||||
* @property null|string $title
|
||||
* @property null|string $text
|
||||
* @property \Eloquent|Model $noteable
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note newQuery()
|
||||
* @method static Builder|Note onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note whereNoteableId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note whereNoteableType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note whereText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Note whereUpdatedAt($value)
|
||||
* @method static Builder|Note withTrashed()
|
||||
* @method static Builder|Note withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperNote
|
||||
*/
|
||||
class Note extends Model
|
||||
{
|
||||
|
||||
@@ -24,53 +24,17 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\ObjectGroup
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property string $title
|
||||
* @property int $order
|
||||
* @property Account[]|Collection $accounts
|
||||
* @property null|int $accounts_count
|
||||
* @property Bill[]|Collection $bills
|
||||
* @property null|int $bills_count
|
||||
* @property Collection|PiggyBank[] $piggyBanks
|
||||
* @property null|int $piggy_banks_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static Builder|ObjectGroup newModelQuery()
|
||||
* @method static Builder|ObjectGroup newQuery()
|
||||
* @method static Builder|ObjectGroup query()
|
||||
* @method static Builder|ObjectGroup whereCreatedAt($value)
|
||||
* @method static Builder|ObjectGroup whereDeletedAt($value)
|
||||
* @method static Builder|ObjectGroup whereId($value)
|
||||
* @method static Builder|ObjectGroup whereOrder($value)
|
||||
* @method static Builder|ObjectGroup whereTitle($value)
|
||||
* @method static Builder|ObjectGroup whereUpdatedAt($value)
|
||||
* @method static Builder|ObjectGroup whereUserId($value)
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static Builder|ObjectGroup whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperObjectGroup
|
||||
*/
|
||||
class ObjectGroup extends Model
|
||||
{
|
||||
|
||||
@@ -23,67 +23,18 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\PiggyBank
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $account_id
|
||||
* @property string $name
|
||||
* @property string $targetamount
|
||||
* @property null|Carbon $startdate
|
||||
* @property null|Carbon $targetdate
|
||||
* @property int $order
|
||||
* @property bool $active
|
||||
* @property bool $encrypted
|
||||
* @property Account $account
|
||||
* @property Attachment[]|Collection $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
* @property Collection|ObjectGroup[] $objectGroups
|
||||
* @property null|int $object_groups_count
|
||||
* @property Collection|PiggyBankEvent[] $piggyBankEvents
|
||||
* @property null|int $piggy_bank_events_count
|
||||
* @property Collection|PiggyBankRepetition[] $piggyBankRepetitions
|
||||
* @property null|int $piggy_bank_repetitions_count
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newQuery()
|
||||
* @method static Builder|PiggyBank onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereAccountId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereEncrypted($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereStartdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereTargetamount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereTargetdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereUpdatedAt($value)
|
||||
* @method static Builder|PiggyBank withTrashed()
|
||||
* @method static Builder|PiggyBank withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperPiggyBank
|
||||
*/
|
||||
class PiggyBank extends Model
|
||||
{
|
||||
|
||||
@@ -23,39 +23,13 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\PiggyBankEvent
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $piggy_bank_id
|
||||
* @property null|int $transaction_journal_id
|
||||
* @property Carbon $date
|
||||
* @property string $amount
|
||||
* @property PiggyBank $piggyBank
|
||||
* @property null|TransactionJournal $transactionJournal
|
||||
*
|
||||
* @method static Builder|PiggyBankEvent newModelQuery()
|
||||
* @method static Builder|PiggyBankEvent newQuery()
|
||||
* @method static Builder|PiggyBankEvent query()
|
||||
* @method static Builder|PiggyBankEvent whereAmount($value)
|
||||
* @method static Builder|PiggyBankEvent whereCreatedAt($value)
|
||||
* @method static Builder|PiggyBankEvent whereDate($value)
|
||||
* @method static Builder|PiggyBankEvent whereId($value)
|
||||
* @method static Builder|PiggyBankEvent wherePiggyBankId($value)
|
||||
* @method static Builder|PiggyBankEvent whereTransactionJournalId($value)
|
||||
* @method static Builder|PiggyBankEvent whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperPiggyBankEvent
|
||||
*/
|
||||
class PiggyBankEvent extends Model
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
@@ -32,31 +31,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\PiggyBankRepetition
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $piggy_bank_id
|
||||
* @property null|Carbon $startdate
|
||||
* @property null|Carbon $targetdate
|
||||
* @property string $currentamount
|
||||
* @property PiggyBank $piggyBank
|
||||
*
|
||||
* @method static EloquentBuilder|PiggyBankRepetition newModelQuery()
|
||||
* @method static EloquentBuilder|PiggyBankRepetition newQuery()
|
||||
* @method static EloquentBuilder|PiggyBankRepetition onDates(Carbon $start, Carbon $target)
|
||||
* @method static EloquentBuilder|PiggyBankRepetition query()
|
||||
* @method static EloquentBuilder|PiggyBankRepetition relevantOnDate(Carbon $date)
|
||||
* @method static EloquentBuilder|PiggyBankRepetition whereCreatedAt($value)
|
||||
* @method static EloquentBuilder|PiggyBankRepetition whereCurrentamount($value)
|
||||
* @method static EloquentBuilder|PiggyBankRepetition whereId($value)
|
||||
* @method static EloquentBuilder|PiggyBankRepetition wherePiggyBankId($value)
|
||||
* @method static EloquentBuilder|PiggyBankRepetition whereStartdate($value)
|
||||
* @method static EloquentBuilder|PiggyBankRepetition whereTargetdate($value)
|
||||
* @method static EloquentBuilder|PiggyBankRepetition whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperPiggyBankRepetition
|
||||
*/
|
||||
class PiggyBankRepetition extends Model
|
||||
{
|
||||
|
||||
@@ -23,40 +23,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Preference
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $user_id
|
||||
* @property string $name
|
||||
* @property null|array|bool|int|string $data
|
||||
* @property User $user
|
||||
*
|
||||
* @method static Builder|Preference newModelQuery()
|
||||
* @method static Builder|Preference newQuery()
|
||||
* @method static Builder|Preference query()
|
||||
* @method static Builder|Preference whereCreatedAt($value)
|
||||
* @method static Builder|Preference whereData($value)
|
||||
* @method static Builder|Preference whereId($value)
|
||||
* @method static Builder|Preference whereName($value)
|
||||
* @method static Builder|Preference whereUpdatedAt($value)
|
||||
* @method static Builder|Preference whereUserId($value)
|
||||
*
|
||||
* @property mixed $user_group_id
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperPreference
|
||||
*/
|
||||
class Preference extends Model
|
||||
{
|
||||
|
||||
@@ -23,78 +23,19 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Recurrence
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $transaction_type_id
|
||||
* @property string $title
|
||||
* @property string $description
|
||||
* @property null|Carbon $first_date
|
||||
* @property null|Carbon $repeat_until
|
||||
* @property null|Carbon $latest_date
|
||||
* @property int|string $repetitions
|
||||
* @property bool $apply_rules
|
||||
* @property bool $active
|
||||
* @property Attachment[]|Collection $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
* @property Collection|RecurrenceMeta[] $recurrenceMeta
|
||||
* @property null|int $recurrence_meta_count
|
||||
* @property Collection|RecurrenceRepetition[] $recurrenceRepetitions
|
||||
* @property null|int $recurrence_repetitions_count
|
||||
* @property Collection|RecurrenceTransaction[] $recurrenceTransactions
|
||||
* @property null|int $recurrence_transactions_count
|
||||
* @property TransactionCurrency $transactionCurrency
|
||||
* @property TransactionType $transactionType
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence newQuery()
|
||||
* @method static Builder|Recurrence onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereApplyRules($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereFirstDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereLatestDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereRepeatUntil($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereRepetitions($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereTransactionTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUserId($value)
|
||||
* @method static Builder|Recurrence withTrashed()
|
||||
* @method static Builder|Recurrence withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRecurrence
|
||||
*/
|
||||
class Recurrence extends Model
|
||||
{
|
||||
|
||||
@@ -23,42 +23,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\RecurrenceMeta
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $recurrence_id
|
||||
* @property string $name
|
||||
* @property mixed $value
|
||||
* @property Recurrence $recurrence
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newQuery()
|
||||
* @method static Builder|RecurrenceMeta onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereRecurrenceId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereValue($value)
|
||||
* @method static Builder|RecurrenceMeta withTrashed()
|
||||
* @method static Builder|RecurrenceMeta withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRecurrenceMeta
|
||||
*/
|
||||
class RecurrenceMeta extends Model
|
||||
{
|
||||
|
||||
@@ -23,46 +23,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\RecurrenceRepetition
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $recurrence_id
|
||||
* @property string $repetition_type
|
||||
* @property string $repetition_moment
|
||||
* @property int $repetition_skip
|
||||
* @property int $weekend
|
||||
* @property Recurrence $recurrence
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newQuery()
|
||||
* @method static Builder|RecurrenceRepetition onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereRecurrenceId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereRepetitionMoment($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereRepetitionSkip($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereRepetitionType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereWeekend($value)
|
||||
* @method static Builder|RecurrenceRepetition withTrashed()
|
||||
* @method static Builder|RecurrenceRepetition withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRecurrenceRepetition
|
||||
*/
|
||||
class RecurrenceRepetition extends Model
|
||||
{
|
||||
|
||||
@@ -23,67 +23,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\RecurrenceTransaction
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $recurrence_id
|
||||
* @property int $transaction_currency_id
|
||||
* @property null|int|string $foreign_currency_id
|
||||
* @property int $source_id
|
||||
* @property int $destination_id
|
||||
* @property string $amount
|
||||
* @property string $foreign_amount
|
||||
* @property string $description
|
||||
* @property Account $destinationAccount
|
||||
* @property null|TransactionCurrency $foreignCurrency
|
||||
* @property Recurrence $recurrence
|
||||
* @property Collection|RecurrenceTransactionMeta[] $recurrenceTransactionMeta
|
||||
* @property null|int $recurrence_transaction_meta_count
|
||||
* @property Account $sourceAccount
|
||||
* @property TransactionCurrency $transactionCurrency
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newQuery()
|
||||
* @method static Builder|RecurrenceTransaction onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereDestinationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereForeignAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereForeignCurrencyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereRecurrenceId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereSourceId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionCurrencyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereUpdatedAt($value)
|
||||
* @method static Builder|RecurrenceTransaction withTrashed()
|
||||
* @method static Builder|RecurrenceTransaction withoutTrashed()
|
||||
*
|
||||
* @property null|int $transaction_type_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionTypeId($value)
|
||||
*
|
||||
* @property null|TransactionType $transactionType
|
||||
* @property mixed $user_id
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRecurrenceTransaction
|
||||
*/
|
||||
class RecurrenceTransaction extends Model
|
||||
{
|
||||
|
||||
@@ -23,42 +23,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\RecurrenceTransactionMeta
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int|string $rt_id
|
||||
* @property string $name
|
||||
* @property mixed $value
|
||||
* @property RecurrenceTransaction $recurrenceTransaction
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newQuery()
|
||||
* @method static Builder|RecurrenceTransactionMeta onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereRtId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereValue($value)
|
||||
* @method static Builder|RecurrenceTransactionMeta withTrashed()
|
||||
* @method static Builder|RecurrenceTransactionMeta withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRecurrenceTransactionMeta
|
||||
*/
|
||||
class RecurrenceTransactionMeta extends Model
|
||||
{
|
||||
|
||||
@@ -23,38 +23,13 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Role
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property string $name
|
||||
* @property null|string $display_name
|
||||
* @property null|string $description
|
||||
* @property Collection|User[] $users
|
||||
* @property null|int $users_count
|
||||
*
|
||||
* @method static Builder|Role newModelQuery()
|
||||
* @method static Builder|Role newQuery()
|
||||
* @method static Builder|Role query()
|
||||
* @method static Builder|Role whereCreatedAt($value)
|
||||
* @method static Builder|Role whereDescription($value)
|
||||
* @method static Builder|Role whereDisplayName($value)
|
||||
* @method static Builder|Role whereId($value)
|
||||
* @method static Builder|Role whereName($value)
|
||||
* @method static Builder|Role whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRole
|
||||
*/
|
||||
class Role extends Model
|
||||
{
|
||||
|
||||
@@ -23,69 +23,18 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Rule
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $rule_group_id
|
||||
* @property string $title
|
||||
* @property null|string $description
|
||||
* @property int $order
|
||||
* @property bool $active
|
||||
* @property bool $stop_processing
|
||||
* @property bool $strict
|
||||
* @property string $action_value
|
||||
* @property Collection|RuleAction[] $ruleActions
|
||||
* @property null|int $rule_actions_count
|
||||
* @property RuleGroup $ruleGroup
|
||||
* @property Collection|RuleTrigger[] $ruleTriggers
|
||||
* @property null|int $rule_triggers_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule newQuery()
|
||||
* @method static Builder|Rule onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereRuleGroupId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereStopProcessing($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereStrict($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereUserId($value)
|
||||
* @method static Builder|Rule withTrashed()
|
||||
* @method static Builder|Rule withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Rule whereUserGroupId($value)
|
||||
*
|
||||
* @property null|UserGroup $userGroup
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRule
|
||||
*/
|
||||
class Rule extends Model
|
||||
{
|
||||
|
||||
@@ -23,11 +23,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\TransactionRules\Expressions\ActionExpression;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -35,33 +32,7 @@ use Illuminate\Support\Facades\Log;
|
||||
use Symfony\Component\ExpressionLanguage\SyntaxError;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\RuleAction
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $rule_id
|
||||
* @property null|string $action_type
|
||||
* @property null|string $action_value
|
||||
* @property int $order
|
||||
* @property bool $active
|
||||
* @property bool $stop_processing
|
||||
* @property Rule $rule
|
||||
*
|
||||
* @method static Builder|RuleAction newModelQuery()
|
||||
* @method static Builder|RuleAction newQuery()
|
||||
* @method static Builder|RuleAction query()
|
||||
* @method static Builder|RuleAction whereActionType($value)
|
||||
* @method static Builder|RuleAction whereActionValue($value)
|
||||
* @method static Builder|RuleAction whereActive($value)
|
||||
* @method static Builder|RuleAction whereCreatedAt($value)
|
||||
* @method static Builder|RuleAction whereId($value)
|
||||
* @method static Builder|RuleAction whereOrder($value)
|
||||
* @method static Builder|RuleAction whereRuleId($value)
|
||||
* @method static Builder|RuleAction whereStopProcessing($value)
|
||||
* @method static Builder|RuleAction whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRuleAction
|
||||
*/
|
||||
class RuleAction extends Model
|
||||
{
|
||||
|
||||
@@ -23,59 +23,18 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\RuleGroup
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property null|string $title
|
||||
* @property null|string $description
|
||||
* @property int $order
|
||||
* @property bool $active
|
||||
* @property bool $stop_processing
|
||||
* @property Collection|Rule[] $rules
|
||||
* @property null|int $rules_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newQuery()
|
||||
* @method static Builder|RuleGroup onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereStopProcessing($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereUserId($value)
|
||||
* @method static Builder|RuleGroup withTrashed()
|
||||
* @method static Builder|RuleGroup withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRuleGroup
|
||||
*/
|
||||
class RuleGroup extends Model
|
||||
{
|
||||
|
||||
@@ -23,42 +23,13 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\RuleTrigger
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $rule_id
|
||||
* @property null|string $trigger_type
|
||||
* @property null|string $trigger_value
|
||||
* @property int $order
|
||||
* @property bool $active
|
||||
* @property bool $stop_processing
|
||||
* @property Rule $rule
|
||||
*
|
||||
* @method static Builder|RuleTrigger newModelQuery()
|
||||
* @method static Builder|RuleTrigger newQuery()
|
||||
* @method static Builder|RuleTrigger query()
|
||||
* @method static Builder|RuleTrigger whereActive($value)
|
||||
* @method static Builder|RuleTrigger whereCreatedAt($value)
|
||||
* @method static Builder|RuleTrigger whereId($value)
|
||||
* @method static Builder|RuleTrigger whereOrder($value)
|
||||
* @method static Builder|RuleTrigger whereRuleId($value)
|
||||
* @method static Builder|RuleTrigger whereStopProcessing($value)
|
||||
* @method static Builder|RuleTrigger whereTriggerType($value)
|
||||
* @method static Builder|RuleTrigger whereTriggerValue($value)
|
||||
* @method static Builder|RuleTrigger whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperRuleTrigger
|
||||
*/
|
||||
class RuleTrigger extends Model
|
||||
{
|
||||
|
||||
@@ -23,67 +23,18 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Tag
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property string $tag
|
||||
* @property string $tagMode
|
||||
* @property null|Carbon $date
|
||||
* @property null|string $description
|
||||
* @property null|float $latitude
|
||||
* @property null|float $longitude
|
||||
* @property null|int $zoomLevel
|
||||
* @property Attachment[]|Collection $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property Collection|Location[] $locations
|
||||
* @property null|int $locations_count
|
||||
* @property Collection|TransactionJournal[] $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag newQuery()
|
||||
* @method static Builder|Tag onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereLatitude($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereLongitude($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereTag($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereTagMode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereZoomLevel($value)
|
||||
* @method static Builder|Tag withTrashed()
|
||||
* @method static Builder|Tag withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tag whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperTag
|
||||
*/
|
||||
class Tag extends Model
|
||||
{
|
||||
|
||||
@@ -24,12 +24,10 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -37,60 +35,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Transaction
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property bool $reconciled
|
||||
* @property int $account_id
|
||||
* @property int $transaction_journal_id
|
||||
* @property null|string $description
|
||||
* @property null|int $transaction_currency_id
|
||||
* @property null|int|string $modified
|
||||
* @property null|int|string $modified_foreign
|
||||
* @property string $date
|
||||
* @property string $max_date
|
||||
* @property string $amount
|
||||
* @property null|string $foreign_amount
|
||||
* @property null|int $foreign_currency_id
|
||||
* @property int $identifier
|
||||
* @property Account $account
|
||||
* @property Budget[]|Collection $budgets
|
||||
* @property null|int $budgets_count
|
||||
* @property Category[]|Collection $categories
|
||||
* @property null|int $categories_count
|
||||
* @property null|TransactionCurrency $foreignCurrency
|
||||
* @property null|TransactionCurrency $transactionCurrency
|
||||
* @property TransactionJournal $transactionJournal
|
||||
*
|
||||
* @method static Builder|Transaction after(Carbon $date)
|
||||
* @method static Builder|Transaction before(Carbon $date)
|
||||
* @method static Builder|Transaction newModelQuery()
|
||||
* @method static Builder|Transaction newQuery()
|
||||
* @method static \Illuminate\Database\Query\Builder|Transaction onlyTrashed()
|
||||
* @method static Builder|Transaction query()
|
||||
* @method static Builder|Transaction transactionTypes($types)
|
||||
* @method static Builder|Transaction whereAccountId($value)
|
||||
* @method static Builder|Transaction whereAmount($value)
|
||||
* @method static Builder|Transaction whereCreatedAt($value)
|
||||
* @method static Builder|Transaction whereDeletedAt($value)
|
||||
* @method static Builder|Transaction whereDescription($value)
|
||||
* @method static Builder|Transaction whereForeignAmount($value)
|
||||
* @method static Builder|Transaction whereForeignCurrencyId($value)
|
||||
* @method static Builder|Transaction whereId($value)
|
||||
* @method static Builder|Transaction whereIdentifier($value)
|
||||
* @method static Builder|Transaction whereReconciled($value)
|
||||
* @method static Builder|Transaction whereTransactionCurrencyId($value)
|
||||
* @method static Builder|Transaction whereTransactionJournalId($value)
|
||||
* @method static Builder|Transaction whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|Transaction withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|Transaction withoutTrashed()
|
||||
*
|
||||
* @property int|string $the_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperTransaction
|
||||
*/
|
||||
class Transaction extends Model
|
||||
{
|
||||
@@ -108,6 +53,7 @@ class Transaction extends Model
|
||||
'encrypted' => 'boolean', // model does not have these fields though
|
||||
'bill_name_encrypted' => 'boolean',
|
||||
'reconciled' => 'boolean',
|
||||
'balance_dirty' => 'boolean',
|
||||
'date' => 'datetime',
|
||||
];
|
||||
|
||||
@@ -233,6 +179,13 @@ class Transaction extends Model
|
||||
);
|
||||
}
|
||||
|
||||
protected function balanceDirty(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: static fn ($value) => 1 === (int)$value,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount
|
||||
*/
|
||||
|
||||
@@ -23,62 +23,17 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\TransactionCurrency
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property bool $enabled
|
||||
* @property null|bool $userGroupDefault
|
||||
* @property null|bool $userGroupEnabled
|
||||
* @property string $code
|
||||
* @property string $name
|
||||
* @property string $symbol
|
||||
* @property int $decimal_places
|
||||
* @property BudgetLimit[]|Collection $budgetLimits
|
||||
* @property null|int $budget_limits_count
|
||||
* @property Collection|TransactionJournal[] $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property Collection|Transaction[] $transactions
|
||||
* @property null|int $transactions_count
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency newQuery()
|
||||
* @method static Builder|TransactionCurrency onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereDecimalPlaces($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereEnabled($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereSymbol($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionCurrency whereUpdatedAt($value)
|
||||
* @method static Builder|TransactionCurrency withTrashed()
|
||||
* @method static Builder|TransactionCurrency withoutTrashed()
|
||||
*
|
||||
* @property Collection<int, UserGroup> $userGroups
|
||||
* @property null|int $user_groups_count
|
||||
* @property Collection<int, User> $users
|
||||
* @property null|int $users_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperTransactionCurrency
|
||||
*/
|
||||
class TransactionCurrency extends Model
|
||||
{
|
||||
|
||||
@@ -23,52 +23,17 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\TransactionGroup
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property null|string $title
|
||||
* @property Collection|TransactionJournal[] $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup newQuery()
|
||||
* @method static Builder|TransactionGroup onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereUserId($value)
|
||||
* @method static Builder|TransactionGroup withTrashed()
|
||||
* @method static Builder|TransactionGroup withoutTrashed()
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereUserGroupId($value)
|
||||
*
|
||||
* @property null|UserGroup $userGroup
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperTransactionGroup
|
||||
*/
|
||||
class TransactionGroup extends Model
|
||||
{
|
||||
|
||||
@@ -24,14 +24,12 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -42,92 +40,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\TransactionJournal
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property int $transaction_type_id
|
||||
* @property null|int|string $transaction_group_id
|
||||
* @property null|int|string $bill_id
|
||||
* @property null|int|string $transaction_currency_id
|
||||
* @property null|string $description
|
||||
* @property Carbon $date
|
||||
* @property null|Carbon $interest_date
|
||||
* @property null|Carbon $book_date
|
||||
* @property null|Carbon $process_date
|
||||
* @property int $order
|
||||
* @property int $tag_count
|
||||
* @property string $transaction_type_type
|
||||
* @property bool $encrypted
|
||||
* @property bool $completed
|
||||
* @property Attachment[]|Collection $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property null|Bill $bill
|
||||
* @property Budget[]|Collection $budgets
|
||||
* @property null|int $budgets_count
|
||||
* @property Category[]|Collection $categories
|
||||
* @property null|int $categories_count
|
||||
* @property Collection|TransactionJournalLink[] $destJournalLinks
|
||||
* @property null|int $dest_journal_links_count
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
* @property Collection|PiggyBankEvent[] $piggyBankEvents
|
||||
* @property null|int $piggy_bank_events_count
|
||||
* @property Collection|TransactionJournalLink[] $sourceJournalLinks
|
||||
* @property null|int $source_journal_links_count
|
||||
* @property Collection|Tag[] $tags
|
||||
* @property null|int $tags_count
|
||||
* @property null|TransactionCurrency $transactionCurrency
|
||||
* @property null|TransactionGroup $transactionGroup
|
||||
* @property Collection|TransactionJournalMeta[] $transactionJournalMeta
|
||||
* @property null|int $transaction_journal_meta_count
|
||||
* @property TransactionType $transactionType
|
||||
* @property Collection|Transaction[] $transactions
|
||||
* @property null|int $transactions_count
|
||||
* @property User $user
|
||||
*
|
||||
* @method static EloquentBuilder|TransactionJournal after(Carbon $date)
|
||||
* @method static EloquentBuilder|TransactionJournal before(Carbon $date)
|
||||
* @method static EloquentBuilder|TransactionJournal newModelQuery()
|
||||
* @method static EloquentBuilder|TransactionJournal newQuery()
|
||||
* @method static \Illuminate\Database\Query\Builder|TransactionJournal onlyTrashed()
|
||||
* @method static EloquentBuilder|TransactionJournal query()
|
||||
* @method static EloquentBuilder|TransactionJournal transactionTypes($types)
|
||||
* @method static EloquentBuilder|TransactionJournal whereBillId($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereBookDate($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereCompleted($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereCreatedAt($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereDate($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereDeletedAt($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereDescription($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereEncrypted($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereId($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereInterestDate($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereOrder($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereProcessDate($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereTagCount($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereTransactionCurrencyId($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereTransactionGroupId($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereTransactionTypeId($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereUpdatedAt($value)
|
||||
* @method static EloquentBuilder|TransactionJournal whereUserId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|TransactionJournal withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|TransactionJournal withoutTrashed()
|
||||
*
|
||||
* @property Collection|Location[] $locations
|
||||
* @property null|int $locations_count
|
||||
* @property int|string $the_count
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static EloquentBuilder|TransactionJournal whereUserGroupId($value)
|
||||
*
|
||||
* @property Collection<int, AuditLogEntry> $auditLogEntries
|
||||
* @property null|int $audit_log_entries_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperTransactionJournal
|
||||
*/
|
||||
class TransactionJournal extends Model
|
||||
{
|
||||
|
||||
@@ -23,47 +23,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\TransactionJournalLink
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $link_type_id
|
||||
* @property int $source_id
|
||||
* @property int $destination_id
|
||||
* @property null|string $comment
|
||||
* @property TransactionJournal $destination
|
||||
* @property LinkType $linkType
|
||||
* @property Collection|Note[] $notes
|
||||
* @property null|int $notes_count
|
||||
* @property TransactionJournal $source
|
||||
* @property string $inward
|
||||
* @property string $outward
|
||||
*
|
||||
* @method static Builder|TransactionJournalLink newModelQuery()
|
||||
* @method static Builder|TransactionJournalLink newQuery()
|
||||
* @method static Builder|TransactionJournalLink query()
|
||||
* @method static Builder|TransactionJournalLink whereComment($value)
|
||||
* @method static Builder|TransactionJournalLink whereCreatedAt($value)
|
||||
* @method static Builder|TransactionJournalLink whereDestinationId($value)
|
||||
* @method static Builder|TransactionJournalLink whereId($value)
|
||||
* @method static Builder|TransactionJournalLink whereLinkTypeId($value)
|
||||
* @method static Builder|TransactionJournalLink whereSourceId($value)
|
||||
* @method static Builder|TransactionJournalLink whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperTransactionJournalLink
|
||||
*/
|
||||
class TransactionJournalLink extends Model
|
||||
{
|
||||
|
||||
@@ -23,44 +23,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\TransactionJournalMeta
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property int $transaction_journal_id
|
||||
* @property string $name
|
||||
* @property mixed $data
|
||||
* @property string $hash
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property TransactionJournal $transactionJournal
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta newQuery()
|
||||
* @method static Builder|TransactionJournalMeta onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta whereData($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta whereHash($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta whereTransactionJournalId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionJournalMeta whereUpdatedAt($value)
|
||||
* @method static Builder|TransactionJournalMeta withTrashed()
|
||||
* @method static Builder|TransactionJournalMeta withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperTransactionJournalMeta
|
||||
*/
|
||||
class TransactionJournalMeta extends Model
|
||||
{
|
||||
|
||||
@@ -23,40 +23,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\TransactionType
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property string $type
|
||||
* @property Collection|TransactionJournal[] $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType newQuery()
|
||||
* @method static Builder|TransactionType onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType whereType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType whereUpdatedAt($value)
|
||||
* @method static Builder|TransactionType withTrashed()
|
||||
* @method static Builder|TransactionType withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperTransactionType
|
||||
*/
|
||||
class TransactionType extends Model
|
||||
{
|
||||
|
||||
@@ -24,13 +24,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Enums\UserRoleEnum;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@@ -38,61 +34,7 @@ use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Class UserGroup
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|string $deleted_at
|
||||
* @property string $title
|
||||
* @property Collection|GroupMembership[] $groupMemberships
|
||||
* @property null|int $group_memberships_count
|
||||
*
|
||||
* @method static Builder|UserGroup newModelQuery()
|
||||
* @method static Builder|UserGroup newQuery()
|
||||
* @method static Builder|UserGroup query()
|
||||
* @method static Builder|UserGroup whereCreatedAt($value)
|
||||
* @method static Builder|UserGroup whereDeletedAt($value)
|
||||
* @method static Builder|UserGroup whereId($value)
|
||||
* @method static Builder|UserGroup whereTitle($value)
|
||||
* @method static Builder|UserGroup whereUpdatedAt($value)
|
||||
*
|
||||
* @property Collection<int, Account> $accounts
|
||||
* @property null|int $accounts_count
|
||||
* @property Collection<int, AvailableBudget> $availableBudgets
|
||||
* @property null|int $available_budgets_count
|
||||
* @property Collection<int, Bill> $bills
|
||||
* @property null|int $bills_count
|
||||
* @property Collection<int, Budget> $budgets
|
||||
* @property null|int $budgets_count
|
||||
* @property Collection<int, PiggyBank> $piggyBanks
|
||||
* @property null|int $piggy_banks_count
|
||||
* @property Collection<int, TransactionJournal> $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property Collection<int, Attachment> $attachments
|
||||
* @property null|int $attachments_count
|
||||
* @property Collection<int, Category> $categories
|
||||
* @property null|int $categories_count
|
||||
* @property Collection<int, CurrencyExchangeRate> $currencyExchangeRates
|
||||
* @property null|int $currency_exchange_rates_count
|
||||
* @property Collection<int, ObjectGroup> $objectGroups
|
||||
* @property null|int $object_groups_count
|
||||
* @property Collection<int, Recurrence> $recurrences
|
||||
* @property null|int $recurrences_count
|
||||
* @property Collection<int, RuleGroup> $ruleGroups
|
||||
* @property null|int $rule_groups_count
|
||||
* @property Collection<int, Rule> $rules
|
||||
* @property null|int $rules_count
|
||||
* @property Collection<int, Tag> $tags
|
||||
* @property null|int $tags_count
|
||||
* @property Collection<int, TransactionGroup> $transactionGroups
|
||||
* @property null|int $transaction_groups_count
|
||||
* @property Collection<int, Webhook> $webhooks
|
||||
* @property null|int $webhooks_count
|
||||
* @property Collection<int, TransactionCurrency> $currencies
|
||||
* @property null|int $currencies_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperUserGroup
|
||||
*/
|
||||
class UserGroup extends Model
|
||||
{
|
||||
|
||||
@@ -24,35 +24,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
/**
|
||||
* Class UserRole
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|string $deleted_at
|
||||
* @property string $title
|
||||
* @property Collection|GroupMembership[] $groupMemberships
|
||||
* @property null|int $group_memberships_count
|
||||
*
|
||||
* @method static Builder|UserRole newModelQuery()
|
||||
* @method static Builder|UserRole newQuery()
|
||||
* @method static Builder|UserRole query()
|
||||
* @method static Builder|UserRole whereCreatedAt($value)
|
||||
* @method static Builder|UserRole whereDeletedAt($value)
|
||||
* @method static Builder|UserRole whereId($value)
|
||||
* @method static Builder|UserRole whereTitle($value)
|
||||
* @method static Builder|UserRole whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperUserRole
|
||||
*/
|
||||
class UserRole extends Model
|
||||
{
|
||||
|
||||
@@ -23,16 +23,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Enums\WebhookDelivery;
|
||||
use FireflyIII\Enums\WebhookResponse;
|
||||
use FireflyIII\Enums\WebhookTrigger;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@@ -40,50 +36,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Webhook
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property int $user_id
|
||||
* @property bool $active
|
||||
* @property int $trigger
|
||||
* @property int $response
|
||||
* @property int $delivery
|
||||
* @property string $url
|
||||
* @property User $user
|
||||
* @property Collection|WebhookMessage[] $webhookMessages
|
||||
* @property null|int $webhook_messages_count
|
||||
*
|
||||
* @method static Builder|Webhook newModelQuery()
|
||||
* @method static Builder|Webhook newQuery()
|
||||
* @method static \Illuminate\Database\Query\Builder|Webhook onlyTrashed()
|
||||
* @method static Builder|Webhook query()
|
||||
* @method static Builder|Webhook whereActive($value)
|
||||
* @method static Builder|Webhook whereCreatedAt($value)
|
||||
* @method static Builder|Webhook whereDeletedAt($value)
|
||||
* @method static Builder|Webhook whereDelivery($value)
|
||||
* @method static Builder|Webhook whereId($value)
|
||||
* @method static Builder|Webhook whereResponse($value)
|
||||
* @method static Builder|Webhook whereTrigger($value)
|
||||
* @method static Builder|Webhook whereUpdatedAt($value)
|
||||
* @method static Builder|Webhook whereUrl($value)
|
||||
* @method static Builder|Webhook whereUserId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|Webhook withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|Webhook withoutTrashed()
|
||||
*
|
||||
* @property string $title
|
||||
* @property string $secret
|
||||
*
|
||||
* @method static Builder|Webhook whereSecret($value)
|
||||
* @method static Builder|Webhook whereTitle($value)
|
||||
*
|
||||
* @property int $user_group_id
|
||||
*
|
||||
* @method static Builder|Webhook whereUserGroupId($value)
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperWebhook
|
||||
*/
|
||||
class Webhook extends Model
|
||||
{
|
||||
|
||||
@@ -23,46 +23,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Class WebhookAttempt
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|string $deleted_at
|
||||
* @property int $webhook_message_id
|
||||
* @property int|string $status_code
|
||||
* @property null|string $logs
|
||||
* @property null|string $response
|
||||
* @property WebhookMessage $webhookMessage
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereLogs($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereResponse($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereStatusCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebhookAttempt whereWebhookMessageId($value)
|
||||
* @method static Builder|WebhookAttempt onlyTrashed()
|
||||
* @method static Builder|WebhookAttempt withTrashed()
|
||||
* @method static Builder|WebhookAttempt withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperWebhookAttempt
|
||||
*/
|
||||
class WebhookAttempt extends Model
|
||||
{
|
||||
|
||||
@@ -23,53 +23,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\WebhookMessage
|
||||
*
|
||||
* @property int $id
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|string $deleted_at
|
||||
* @property int $webhook_id
|
||||
* @property bool $sent
|
||||
* @property bool $errored
|
||||
* @property int $attempts
|
||||
* @property string $uuid
|
||||
* @property array $message
|
||||
* @property null|array $logs
|
||||
* @property Webhook $webhook
|
||||
*
|
||||
* @method static Builder|WebhookMessage newModelQuery()
|
||||
* @method static Builder|WebhookMessage newQuery()
|
||||
* @method static Builder|WebhookMessage query()
|
||||
* @method static Builder|WebhookMessage whereAttempts($value)
|
||||
* @method static Builder|WebhookMessage whereCreatedAt($value)
|
||||
* @method static Builder|WebhookMessage whereDeletedAt($value)
|
||||
* @method static Builder|WebhookMessage whereErrored($value)
|
||||
* @method static Builder|WebhookMessage whereId($value)
|
||||
* @method static Builder|WebhookMessage whereLogs($value)
|
||||
* @method static Builder|WebhookMessage whereMessage($value)
|
||||
* @method static Builder|WebhookMessage whereSent($value)
|
||||
* @method static Builder|WebhookMessage whereUpdatedAt($value)
|
||||
* @method static Builder|WebhookMessage whereUuid($value)
|
||||
* @method static Builder|WebhookMessage whereWebhookId($value)
|
||||
*
|
||||
* @property Collection|WebhookAttempt[] $webhookAttempts
|
||||
* @property null|int $webhook_attempts_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperWebhookMessage
|
||||
*/
|
||||
class WebhookMessage extends Model
|
||||
{
|
||||
|
||||
@@ -25,16 +25,15 @@ namespace FireflyIII\Policies;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class AccountPolicy
|
||||
{
|
||||
/**
|
||||
* TODO needs better authentication.
|
||||
* TODO needs better authentication, also for group.
|
||||
*/
|
||||
public function view(User $user, Account $account): bool
|
||||
{
|
||||
return true;
|
||||
|
||||
return auth()->check() && $user->id === $account->user_id;
|
||||
}
|
||||
|
||||
@@ -45,7 +44,7 @@ class AccountPolicy
|
||||
*/
|
||||
public function viewAny(): bool
|
||||
{
|
||||
return true;
|
||||
Log::debug(__METHOD__);
|
||||
|
||||
return auth()->check();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ use FireflyIII\Services\Password\Verifier;
|
||||
use FireflyIII\Services\Webhook\StandardWebhookSender;
|
||||
use FireflyIII\Services\Webhook\WebhookSenderInterface;
|
||||
use FireflyIII\Support\Amount;
|
||||
use FireflyIII\Support\Balance;
|
||||
use FireflyIII\Support\ExpandedForm;
|
||||
use FireflyIII\Support\FireflyConfig;
|
||||
use FireflyIII\Support\Form\AccountForm;
|
||||
@@ -133,6 +134,12 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
return new Steam();
|
||||
}
|
||||
);
|
||||
$this->app->bind(
|
||||
'balance',
|
||||
static function () {
|
||||
return new Balance();
|
||||
}
|
||||
);
|
||||
$this->app->bind(
|
||||
'expandedform',
|
||||
static function () {
|
||||
|
||||
@@ -84,6 +84,14 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
return 'account_meta';
|
||||
}
|
||||
|
||||
// second search using integer check.
|
||||
$meta = AccountMeta::where('name', 'currency_id')->where('data', json_encode((int)$currency->id))->count();
|
||||
if ($meta > 0) {
|
||||
app('log')->info(sprintf('Used in %d accounts as currency_id, return true. ', $meta));
|
||||
|
||||
return 'account_meta';
|
||||
}
|
||||
|
||||
// is being used in bills:
|
||||
$bills = Bill::where('transaction_currency_id', $currency->id)->count();
|
||||
if ($bills > 0) {
|
||||
|
||||
55
app/Rules/Account/IsValidAccountType.php
Normal file
55
app/Rules/Account/IsValidAccountType.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/*
|
||||
* IsValidAccountType.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Rules\Account;
|
||||
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
|
||||
class IsValidAccountType implements ValidationRule
|
||||
{
|
||||
use AccountFilter;
|
||||
|
||||
#[\Override]
|
||||
public function validate(string $attribute, mixed $value, \Closure $fail): void
|
||||
{
|
||||
// only check the type.
|
||||
if (array_key_exists('type', $value)) {
|
||||
$value = $value['type'];
|
||||
if (!is_array($value)) {
|
||||
$value = [$value];
|
||||
}
|
||||
|
||||
$filtered = [];
|
||||
$keys = array_keys($this->types);
|
||||
|
||||
/** @var mixed $entry */
|
||||
foreach ($value as $entry) {
|
||||
$entry = (string) $entry;
|
||||
if (!in_array($entry, $keys, true)) {
|
||||
$fail('something');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
80
app/Rules/IsValidDateRange.php
Normal file
80
app/Rules/IsValidDateRange.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/*
|
||||
* IsValidDateRange.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Rules;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Carbon\Exceptions\InvalidDateException;
|
||||
use Carbon\Exceptions\InvalidFormatException;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
|
||||
class IsValidDateRange implements ValidationRule
|
||||
{
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function validate(string $attribute, mixed $value, \Closure $fail): void
|
||||
{
|
||||
$value = (string) $value;
|
||||
if ('' === $value) {
|
||||
$fail('validation.date_or_time')->translate();
|
||||
|
||||
return;
|
||||
}
|
||||
$other = 'startPeriod';
|
||||
if ('startPeriod' === $attribute) {
|
||||
$other = 'endPeriod';
|
||||
}
|
||||
$otherValue = request()->get($other);
|
||||
|
||||
// parse date, twice.
|
||||
try {
|
||||
$left = Carbon::parse($value);
|
||||
$right = Carbon::parse($otherValue);
|
||||
} catch (InvalidDateException $e) { // @phpstan-ignore-line
|
||||
app('log')->error(sprintf('"%s" or "%s" is not a valid date or time: %s', $value, $otherValue, $e->getMessage()));
|
||||
|
||||
$fail('validation.date_or_time')->translate();
|
||||
|
||||
return;
|
||||
} catch (InvalidFormatException $e) {
|
||||
app('log')->error(sprintf('"%s" or "%s" is of an invalid format: %s', $value, $otherValue, $e->getMessage()));
|
||||
|
||||
$fail('validation.date_or_time')->translate();
|
||||
|
||||
return;
|
||||
}
|
||||
// start must be before end.
|
||||
if ('startPeriod' === $attribute) {
|
||||
if ($left->gt($right)) {
|
||||
$fail('validation.date_after')->translate();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
// end must be after start
|
||||
if ($left->lt($right)) {
|
||||
$fail('validation.date_after')->translate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ use FireflyIII\Factory\TransactionJournalMetaFactory;
|
||||
use FireflyIII\Factory\TransactionTypeFactory;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
@@ -44,6 +45,7 @@ use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Services\Internal\Support\JournalServiceTrait;
|
||||
use FireflyIII\Support\NullArrayObject;
|
||||
use FireflyIII\Validation\AccountValidator;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class to centralise code that updates a journal given the input by system.
|
||||
@@ -166,6 +168,7 @@ class JournalUpdateService
|
||||
app('preferences')->mark();
|
||||
|
||||
$this->transactionJournal->refresh();
|
||||
Log::debug('Done with update journal routine');
|
||||
}
|
||||
|
||||
private function hasValidAccounts(): bool
|
||||
@@ -331,7 +334,7 @@ class JournalUpdateService
|
||||
}
|
||||
|
||||
$sourceInfo = [
|
||||
'id' => (int)($this->data['source_id'] ?? null),
|
||||
'id' => (int) ($this->data['source_id'] ?? null),
|
||||
'name' => $this->data['source_name'] ?? null,
|
||||
'iban' => $this->data['source_iban'] ?? null,
|
||||
'number' => $this->data['source_number'] ?? null,
|
||||
@@ -395,7 +398,7 @@ class JournalUpdateService
|
||||
}
|
||||
|
||||
$destInfo = [
|
||||
'id' => (int)($this->data['destination_id'] ?? null),
|
||||
'id' => (int) ($this->data['destination_id'] ?? null),
|
||||
'name' => $this->data['destination_name'] ?? null,
|
||||
'iban' => $this->data['destination_iban'] ?? null,
|
||||
'number' => $this->data['destination_number'] ?? null,
|
||||
@@ -461,8 +464,8 @@ class JournalUpdateService
|
||||
)
|
||||
&& TransactionType::WITHDRAWAL === $type
|
||||
) {
|
||||
$billId = (int)($this->data['bill_id'] ?? 0);
|
||||
$billName = (string)($this->data['bill_name'] ?? '');
|
||||
$billId = (int) ($this->data['bill_id'] ?? 0);
|
||||
$billName = (string) ($this->data['bill_name'] ?? '');
|
||||
$bill = $this->billRepository->findBill($billId, $billName);
|
||||
$this->transactionJournal->bill_id = $bill?->id;
|
||||
app('log')->debug('Updated bill ID');
|
||||
@@ -474,7 +477,7 @@ class JournalUpdateService
|
||||
*/
|
||||
private function updateField(string $fieldName): void
|
||||
{
|
||||
if (array_key_exists($fieldName, $this->data) && '' !== (string)$this->data[$fieldName]) {
|
||||
if (array_key_exists($fieldName, $this->data) && '' !== (string) $this->data[$fieldName]) {
|
||||
$value = $this->data[$fieldName];
|
||||
|
||||
if ('date' === $fieldName) {
|
||||
@@ -546,7 +549,7 @@ class JournalUpdateService
|
||||
{
|
||||
// update notes.
|
||||
if ($this->hasFields(['notes'])) {
|
||||
$notes = '' === (string)$this->data['notes'] ? null : $this->data['notes'];
|
||||
$notes = '' === (string) $this->data['notes'] ? null : $this->data['notes'];
|
||||
$this->storeNotes($this->transactionJournal, $notes);
|
||||
}
|
||||
}
|
||||
@@ -594,7 +597,7 @@ class JournalUpdateService
|
||||
foreach ($this->metaDate as $field) {
|
||||
if ($this->hasFields([$field])) {
|
||||
try {
|
||||
$value = '' === (string)$this->data[$field] ? null : new Carbon($this->data[$field]);
|
||||
$value = '' === (string) $this->data[$field] ? null : new Carbon($this->data[$field]);
|
||||
} catch (InvalidDateException|InvalidFormatException $e) { // @phpstan-ignore-line
|
||||
app('log')->debug(sprintf('%s is not a valid date value: %s', $this->data[$field], $e->getMessage()));
|
||||
|
||||
@@ -645,7 +648,7 @@ class JournalUpdateService
|
||||
return;
|
||||
}
|
||||
|
||||
$value = $this->data['amount'] ?? '';
|
||||
$value = $this->data['amount'] ?? '';
|
||||
app('log')->debug(sprintf('Amount is now "%s"', $value));
|
||||
|
||||
try {
|
||||
@@ -655,11 +658,14 @@ class JournalUpdateService
|
||||
|
||||
return;
|
||||
}
|
||||
$origSourceTransaction = $this->getSourceTransaction();
|
||||
$origSourceTransaction->amount = app('steam')->negative($amount);
|
||||
|
||||
$origSourceTransaction = $this->getSourceTransaction();
|
||||
$origSourceTransaction->amount = app('steam')->negative($amount);
|
||||
$origSourceTransaction->balance_dirty = true;
|
||||
$origSourceTransaction->save();
|
||||
$destTransaction = $this->getDestinationTransaction();
|
||||
$destTransaction->amount = app('steam')->positive($amount);
|
||||
$destTransaction = $this->getDestinationTransaction();
|
||||
$destTransaction->amount = app('steam')->positive($amount);
|
||||
$destTransaction->balance_dirty = true;
|
||||
$destTransaction->save();
|
||||
// refresh transactions.
|
||||
$this->sourceTransaction->refresh();
|
||||
@@ -698,8 +704,21 @@ class JournalUpdateService
|
||||
$source->foreign_currency_id = $foreignCurrency->id;
|
||||
$source->foreign_amount = app('steam')->negative($foreignAmount);
|
||||
$source->save();
|
||||
$dest->foreign_currency_id = $foreignCurrency->id;
|
||||
$dest->foreign_amount = app('steam')->positive($foreignAmount);
|
||||
|
||||
// if the transaction is a TRANSFER, and the foreign amount and currency are set (like they seem to be)
|
||||
// the correct fields to update in the destination transaction are NOT the foreign amount and currency
|
||||
// but rather the normal amount and currency. This is new behavior.
|
||||
|
||||
if (TransactionType::TRANSFER === $this->transactionJournal->transactionType->type) {
|
||||
Log::debug('Switch amounts, store in amount and not foreign_amount');
|
||||
$dest->transaction_currency_id = $foreignCurrency->id;
|
||||
$dest->amount = app('steam')->positive($foreignAmount);
|
||||
}
|
||||
if (TransactionType::TRANSFER !== $this->transactionJournal->transactionType->type) {
|
||||
$dest->foreign_currency_id = $foreignCurrency->id;
|
||||
$dest->foreign_amount = app('steam')->positive($foreignAmount);
|
||||
}
|
||||
|
||||
$dest->save();
|
||||
|
||||
app('log')->debug(
|
||||
@@ -733,4 +752,6 @@ class JournalUpdateService
|
||||
$this->sourceTransaction->refresh();
|
||||
$this->destinationTransaction->refresh();
|
||||
}
|
||||
|
||||
private function collectCurrency(): TransactionCurrency {}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,13 @@ class Amount
|
||||
return $this->formatFlat($format->symbol, $format->decimal_places, $amount, $coloured);
|
||||
}
|
||||
|
||||
public function formatByCurrencyId(int $currencyId, string $amount, ?bool $coloured = null): string
|
||||
{
|
||||
$format = TransactionCurrency::find($currencyId);
|
||||
|
||||
return $this->formatFlat($format->symbol, $format->decimal_places, $amount, $coloured);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will properly format the given number, in color or "black and white",
|
||||
* as a currency, given two things: the currency required and the current locale.
|
||||
|
||||
73
app/Support/Balance.php
Normal file
73
app/Support/Balance.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/*
|
||||
* Balance.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class Balance
|
||||
{
|
||||
/**
|
||||
* Returns the accounts balances as an array, on the account ID.
|
||||
*/
|
||||
public function getAccountBalances(Collection $accounts, Carbon $date): array
|
||||
{
|
||||
Log::debug(sprintf('getAccountBalances(<collection>, "%s")', $date->format('Y-m-d')));
|
||||
$return = [];
|
||||
$currencies = [];
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
$cache->addProperty('getAccountBalances');
|
||||
$cache->addProperty($date);
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$query = Transaction::whereIn('transactions.account_id', $accounts->pluck('id')->toArray())
|
||||
->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->orderBy('transaction_journals.date', 'desc')
|
||||
->orderBy('transaction_journals.order', 'asc')
|
||||
->orderBy('transaction_journals.description', 'desc')
|
||||
->orderBy('transactions.amount', 'desc')
|
||||
->where('transaction_journals.date', '<=', $date)
|
||||
;
|
||||
|
||||
$result = $query->get(['transactions.account_id', 'transactions.transaction_currency_id', 'transactions.balance_after']);
|
||||
foreach ($result as $entry) {
|
||||
$accountId = (int) $entry->account_id;
|
||||
$currencyId = (int) $entry->transaction_currency_id;
|
||||
$currencies[$currencyId] ??= TransactionCurrency::find($currencyId);
|
||||
$return[$accountId] ??= [];
|
||||
if (array_key_exists($currencyId, $return[$accountId])) {
|
||||
continue;
|
||||
}
|
||||
$return[$accountId][$currencyId] = ['currency' => $currencies[$currencyId], 'balance' => $entry->balance_after, 'date' => clone $date];
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
37
app/Support/Facades/Balance.php
Normal file
37
app/Support/Facades/Balance.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*
|
||||
* Balance.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Facades;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
class Balance extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return 'balance';
|
||||
}
|
||||
}
|
||||
@@ -30,63 +30,63 @@ use FireflyIII\Models\AccountType;
|
||||
*/
|
||||
trait AccountFilter
|
||||
{
|
||||
protected array $types = [
|
||||
'all' => [
|
||||
AccountType::DEFAULT,
|
||||
AccountType::CASH,
|
||||
AccountType::ASSET,
|
||||
AccountType::EXPENSE,
|
||||
AccountType::REVENUE,
|
||||
AccountType::INITIAL_BALANCE,
|
||||
AccountType::BENEFICIARY,
|
||||
AccountType::IMPORT,
|
||||
AccountType::RECONCILIATION,
|
||||
AccountType::LOAN,
|
||||
AccountType::DEBT,
|
||||
AccountType::MORTGAGE,
|
||||
],
|
||||
'asset' => [AccountType::DEFAULT, AccountType::ASSET],
|
||||
'cash' => [AccountType::CASH],
|
||||
'expense' => [AccountType::EXPENSE, AccountType::BENEFICIARY],
|
||||
'revenue' => [AccountType::REVENUE],
|
||||
'special' => [AccountType::CASH, AccountType::INITIAL_BALANCE, AccountType::IMPORT, AccountType::RECONCILIATION],
|
||||
'hidden' => [AccountType::INITIAL_BALANCE, AccountType::IMPORT, AccountType::RECONCILIATION],
|
||||
'liability' => [AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::CREDITCARD],
|
||||
'liabilities' => [AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::CREDITCARD],
|
||||
AccountType::DEFAULT => [AccountType::DEFAULT],
|
||||
AccountType::CASH => [AccountType::CASH],
|
||||
AccountType::ASSET => [AccountType::ASSET],
|
||||
AccountType::EXPENSE => [AccountType::EXPENSE],
|
||||
AccountType::REVENUE => [AccountType::REVENUE],
|
||||
AccountType::INITIAL_BALANCE => [AccountType::INITIAL_BALANCE],
|
||||
AccountType::BENEFICIARY => [AccountType::BENEFICIARY],
|
||||
AccountType::IMPORT => [AccountType::IMPORT],
|
||||
AccountType::RECONCILIATION => [AccountType::RECONCILIATION],
|
||||
AccountType::LOAN => [AccountType::LOAN],
|
||||
AccountType::MORTGAGE => [AccountType::MORTGAGE],
|
||||
AccountType::DEBT => [AccountType::DEBT],
|
||||
AccountType::CREDITCARD => [AccountType::CREDITCARD],
|
||||
'default account' => [AccountType::DEFAULT],
|
||||
'cash account' => [AccountType::CASH],
|
||||
'asset account' => [AccountType::ASSET],
|
||||
'expense account' => [AccountType::EXPENSE],
|
||||
'revenue account' => [AccountType::REVENUE],
|
||||
'initial balance account' => [AccountType::INITIAL_BALANCE],
|
||||
'reconciliation' => [AccountType::RECONCILIATION],
|
||||
'loan' => [AccountType::LOAN],
|
||||
'mortgage' => [AccountType::MORTGAGE],
|
||||
'debt' => [AccountType::DEBT],
|
||||
'credit card' => [AccountType::CREDITCARD],
|
||||
'credit-card' => [AccountType::CREDITCARD],
|
||||
'creditcard' => [AccountType::CREDITCARD],
|
||||
'cc' => [AccountType::CREDITCARD],
|
||||
];
|
||||
|
||||
/**
|
||||
* All the available types.
|
||||
*/
|
||||
protected function mapAccountTypes(string $type): array
|
||||
{
|
||||
$types = [
|
||||
'all' => [
|
||||
AccountType::DEFAULT,
|
||||
AccountType::CASH,
|
||||
AccountType::ASSET,
|
||||
AccountType::EXPENSE,
|
||||
AccountType::REVENUE,
|
||||
AccountType::INITIAL_BALANCE,
|
||||
AccountType::BENEFICIARY,
|
||||
AccountType::IMPORT,
|
||||
AccountType::RECONCILIATION,
|
||||
AccountType::LOAN,
|
||||
AccountType::DEBT,
|
||||
AccountType::MORTGAGE,
|
||||
],
|
||||
'asset' => [AccountType::DEFAULT, AccountType::ASSET],
|
||||
'cash' => [AccountType::CASH],
|
||||
'expense' => [AccountType::EXPENSE, AccountType::BENEFICIARY],
|
||||
'revenue' => [AccountType::REVENUE],
|
||||
'special' => [AccountType::CASH, AccountType::INITIAL_BALANCE, AccountType::IMPORT, AccountType::RECONCILIATION],
|
||||
'hidden' => [AccountType::INITIAL_BALANCE, AccountType::IMPORT, AccountType::RECONCILIATION],
|
||||
'liability' => [AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::CREDITCARD],
|
||||
'liabilities' => [AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::CREDITCARD],
|
||||
AccountType::DEFAULT => [AccountType::DEFAULT],
|
||||
AccountType::CASH => [AccountType::CASH],
|
||||
AccountType::ASSET => [AccountType::ASSET],
|
||||
AccountType::EXPENSE => [AccountType::EXPENSE],
|
||||
AccountType::REVENUE => [AccountType::REVENUE],
|
||||
AccountType::INITIAL_BALANCE => [AccountType::INITIAL_BALANCE],
|
||||
AccountType::BENEFICIARY => [AccountType::BENEFICIARY],
|
||||
AccountType::IMPORT => [AccountType::IMPORT],
|
||||
AccountType::RECONCILIATION => [AccountType::RECONCILIATION],
|
||||
AccountType::LOAN => [AccountType::LOAN],
|
||||
AccountType::MORTGAGE => [AccountType::MORTGAGE],
|
||||
AccountType::DEBT => [AccountType::DEBT],
|
||||
AccountType::CREDITCARD => [AccountType::CREDITCARD],
|
||||
'default account' => [AccountType::DEFAULT],
|
||||
'cash account' => [AccountType::CASH],
|
||||
'asset account' => [AccountType::ASSET],
|
||||
'expense account' => [AccountType::EXPENSE],
|
||||
'revenue account' => [AccountType::REVENUE],
|
||||
'initial balance account' => [AccountType::INITIAL_BALANCE],
|
||||
'reconciliation' => [AccountType::RECONCILIATION],
|
||||
'loan' => [AccountType::LOAN],
|
||||
'mortgage' => [AccountType::MORTGAGE],
|
||||
'debt' => [AccountType::DEBT],
|
||||
'credit card' => [AccountType::CREDITCARD],
|
||||
'credit-card' => [AccountType::CREDITCARD],
|
||||
'creditcard' => [AccountType::CREDITCARD],
|
||||
'cc' => [AccountType::CREDITCARD],
|
||||
];
|
||||
|
||||
return $types[$type] ?? $types['all'];
|
||||
return $this->types[$type] ?? $this->types['all'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,12 +44,17 @@ class ExchangeRateConverter
|
||||
private array $prepared = [];
|
||||
private int $queryCount = 0;
|
||||
|
||||
public function enabled(): bool
|
||||
{
|
||||
return false !== config('cer.enabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function convert(TransactionCurrency $from, TransactionCurrency $to, Carbon $date, string $amount): string
|
||||
{
|
||||
if (false === config('cer.enabled')) {
|
||||
if (false === $this->enabled()) {
|
||||
Log::debug('ExchangeRateConverter: disabled, return amount as is.');
|
||||
|
||||
return $amount;
|
||||
@@ -64,7 +69,7 @@ class ExchangeRateConverter
|
||||
*/
|
||||
public function getCurrencyRate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): string
|
||||
{
|
||||
if (false === config('cer.enabled')) {
|
||||
if (false === $this->enabled()) {
|
||||
Log::debug('ExchangeRateConverter: disabled, return "1".');
|
||||
|
||||
return '1';
|
||||
@@ -254,7 +259,7 @@ class ExchangeRateConverter
|
||||
*/
|
||||
public function prepare(TransactionCurrency $from, TransactionCurrency $to, Carbon $start, Carbon $end): void
|
||||
{
|
||||
if (false === config('cer.enabled')) {
|
||||
if (false === $this->enabled()) {
|
||||
return;
|
||||
}
|
||||
Log::debug('prepare()');
|
||||
@@ -329,7 +334,7 @@ class ExchangeRateConverter
|
||||
|
||||
public function summarize(): void
|
||||
{
|
||||
if (false === config('cer.enabled')) {
|
||||
if (false === $this->enabled()) {
|
||||
return;
|
||||
}
|
||||
Log::debug(sprintf('ExchangeRateConverter ran %d queries.', $this->queryCount));
|
||||
|
||||
@@ -441,7 +441,7 @@ trait PeriodOverview
|
||||
$cache->addProperty('tag-period-entries');
|
||||
$cache->addProperty($tag->id);
|
||||
if ($cache->has()) {
|
||||
// return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
/** @var array $dates */
|
||||
|
||||
45
app/Support/JsonApi/CollectsCustomParameters.php
Normal file
45
app/Support/JsonApi/CollectsCustomParameters.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
* CollectsCustomParameters.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\JsonApi;
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
trait CollectsCustomParameters
|
||||
{
|
||||
protected function getOtherParams(array $params): array
|
||||
{
|
||||
$return = [];
|
||||
if (array_key_exists('startPeriod', $params)) {
|
||||
$return['start'] = Carbon::parse($params['startPeriod']);
|
||||
}
|
||||
if (array_key_exists('endPeriod', $params)) {
|
||||
$return['end'] = Carbon::parse($params['endPeriod']);
|
||||
}
|
||||
if (array_key_exists('currentMoment', $params)) {
|
||||
$return['today'] = Carbon::parse($params['currentMoment']);
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
@@ -24,11 +24,14 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Support\JsonApi\Enrichments;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\ObjectGroup;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Repositories\UserGroups\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Support\Facades\Balance;
|
||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -40,8 +43,14 @@ use Illuminate\Support\Facades\Log;
|
||||
*/
|
||||
class AccountEnrichment implements EnrichmentInterface
|
||||
{
|
||||
private Collection $collection;
|
||||
private array $currencies;
|
||||
private Collection $collection;
|
||||
private array $currencies;
|
||||
private array $objectGroups;
|
||||
private array $grouped;
|
||||
private array $balances;
|
||||
private TransactionCurrency $default;
|
||||
private ?Carbon $start;
|
||||
private ?Carbon $end;
|
||||
|
||||
private AccountRepositoryInterface $repository;
|
||||
private CurrencyRepositoryInterface $currencyRepository;
|
||||
@@ -50,6 +59,8 @@ class AccountEnrichment implements EnrichmentInterface
|
||||
{
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$this->currencyRepository = app(CurrencyRepositoryInterface::class);
|
||||
$this->start = null;
|
||||
$this->end = null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
@@ -60,14 +71,19 @@ class AccountEnrichment implements EnrichmentInterface
|
||||
{
|
||||
Log::debug(sprintf('Now doing account enrichment for %d account(s)', $collection->count()));
|
||||
// prep local fields
|
||||
$this->collection = $collection;
|
||||
$this->currencies = [];
|
||||
$this->collection = $collection;
|
||||
$this->default = app('amount')->getDefaultCurrency();
|
||||
$this->currencies = [];
|
||||
$this->balances = [];
|
||||
$this->objectGroups = [];
|
||||
$this->grouped = [];
|
||||
|
||||
// do everything here:
|
||||
$this->getLastActivity();
|
||||
$this->collectAccountTypes();
|
||||
$this->collectMetaData();
|
||||
// $this->getMetaBalances();
|
||||
$this->getMetaBalances();
|
||||
$this->getObjectGroups();
|
||||
|
||||
// $this->collection->transform(function (Account $account) {
|
||||
// $account->user_array = ['id' => 1, 'bla bla' => 'bla'];
|
||||
@@ -94,22 +110,74 @@ class AccountEnrichment implements EnrichmentInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO this method refers to a single-use method inside Steam that could be moved here.
|
||||
*/
|
||||
private function getMetaBalances(): void
|
||||
{
|
||||
try {
|
||||
$array = app('steam')->balancesByAccountsConverted($this->collection, today());
|
||||
} catch (FireflyException $e) {
|
||||
Log::error(sprintf('Could not load balances: %s', $e->getMessage()));
|
||||
$this->balances = Balance::getAccountBalances($this->collection, today());
|
||||
$balances = $this->balances;
|
||||
$default = $this->default;
|
||||
|
||||
return;
|
||||
// get start and end, so the balance difference can be generated.
|
||||
$start = null;
|
||||
$end = null;
|
||||
if (null !== $this->start) {
|
||||
$start = Balance::getAccountBalances($this->collection, $this->start);
|
||||
}
|
||||
foreach ($array as $accountId => $row) {
|
||||
$this->collection->where('id', $accountId)->first()->balance = $row['balance'];
|
||||
$this->collection->where('id', $accountId)->first()->native_balance = $row['native_balance'];
|
||||
if (null !== $this->end) {
|
||||
$end = Balance::getAccountBalances($this->collection, $this->end);
|
||||
}
|
||||
|
||||
$this->collection->transform(function (Account $account) use ($balances, $default, $start, $end) {
|
||||
$converter = new ExchangeRateConverter();
|
||||
$native = [
|
||||
'currency_id' => $this->default->id,
|
||||
'currency_name' => $this->default->name,
|
||||
'currency_code' => $this->default->code,
|
||||
'currency_symbol' => $this->default->symbol,
|
||||
'currency_decimal_places' => $this->default->decimal_places,
|
||||
'balance' => '0',
|
||||
'period_start_balance' => null,
|
||||
'period_end_balance' => null,
|
||||
'balance_difference' => null,
|
||||
];
|
||||
if (array_key_exists($account->id, $balances)) {
|
||||
$set = [];
|
||||
foreach ($balances[$account->id] as $currencyId => $entry) {
|
||||
$left = $start[$account->id][$currencyId]['balance'] ?? null;
|
||||
$right = $end[$account->id][$currencyId]['balance'] ?? null;
|
||||
$diff = null;
|
||||
if (null !== $left && null !== $right) {
|
||||
$diff = bcsub($right, $left);
|
||||
}
|
||||
|
||||
$item = [
|
||||
'currency_id' => $entry['currency']->id,
|
||||
'currency_name' => $entry['currency']->name,
|
||||
'currency_code' => $entry['currency']->code,
|
||||
'currency_symbol' => $entry['currency']->symbol,
|
||||
'currency_decimal_places' => $entry['currency']->decimal_places,
|
||||
'balance' => $entry['balance'],
|
||||
'period_start_balance' => $left,
|
||||
'period_end_balance' => $right,
|
||||
'balance_difference' => $diff,
|
||||
];
|
||||
$set[] = $item;
|
||||
if ($converter->enabled()) {
|
||||
$native['balance'] = bcadd($native['balance'], $converter->convert($entry['currency'], $default, today(), $entry['balance']));
|
||||
if (null !== $diff) {
|
||||
$native['period_start_balance'] = $converter->convert($entry['currency'], $default, today(), $item['period_start_balance']);
|
||||
$native['period_end_balance'] = $converter->convert($entry['currency'], $default, today(), $item['period_end_balance']);
|
||||
$native['balance_difference'] = bcsub($native['period_end_balance'], $native['period_start_balance']);
|
||||
}
|
||||
}
|
||||
}
|
||||
$account->balance = $set;
|
||||
if ($converter->enabled()) {
|
||||
$account->native_balance = $native;
|
||||
}
|
||||
}
|
||||
|
||||
return $account;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +201,7 @@ class AccountEnrichment implements EnrichmentInterface
|
||||
|
||||
private function collectMetaData(): void
|
||||
{
|
||||
$metaFields = $this->repository->getMetaValues($this->collection, ['currency_id', 'account_role', 'account_number', 'liability_direction', 'interest', 'interest_period', 'current_debt']);
|
||||
$metaFields = $this->repository->getMetaValues($this->collection, ['is_multi_currency', 'currency_id', 'account_role', 'account_number', 'liability_direction', 'interest', 'interest_period', 'current_debt']);
|
||||
$currencyIds = $metaFields->where('name', 'currency_id')->pluck('data')->toArray();
|
||||
|
||||
$currencies = [];
|
||||
@@ -160,7 +228,7 @@ class AccountEnrichment implements EnrichmentInterface
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function enrichSingle(Model $model): Model
|
||||
public function enrichSingle(Model $model): Account
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
$collection = new Collection([$model]);
|
||||
@@ -168,4 +236,46 @@ class AccountEnrichment implements EnrichmentInterface
|
||||
|
||||
return $collection->first();
|
||||
}
|
||||
|
||||
public function setStart(?Carbon $start): void
|
||||
{
|
||||
$this->start = $start;
|
||||
}
|
||||
|
||||
public function setEnd(?Carbon $end): void
|
||||
{
|
||||
$this->end = $end;
|
||||
}
|
||||
|
||||
private function getObjectGroups(): void
|
||||
{
|
||||
$set = \DB::table('object_groupables')
|
||||
->where('object_groupable_type', Account::class)
|
||||
->whereIn('object_groupable_id', $this->collection->pluck('id')->toArray())
|
||||
->distinct()
|
||||
->get(['object_groupables.object_groupable_id', 'object_groupables.object_group_id'])
|
||||
;
|
||||
// get the groups:
|
||||
$groupIds = $set->pluck('object_group_id')->toArray();
|
||||
$groups = ObjectGroup::whereIn('id', $groupIds)->get();
|
||||
|
||||
/** @var ObjectGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
$this->objectGroups[$group->id] = $group;
|
||||
}
|
||||
|
||||
/** @var \stdClass $entry */
|
||||
foreach ($set as $entry) {
|
||||
$this->grouped[(int) $entry->object_groupable_id] = (int) $entry->object_group_id;
|
||||
}
|
||||
$this->collection->transform(function (Account $account) {
|
||||
$account->object_group_id = $this->grouped[$account->id] ?? null;
|
||||
if (null !== $account->object_group_id) {
|
||||
$account->object_group_title = $this->objectGroups[$account->object_group_id]->title;
|
||||
$account->object_group_order = $this->objectGroups[$account->object_group_id]->order;
|
||||
}
|
||||
|
||||
return $account;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\JsonApi;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
use Illuminate\Contracts\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\Core\Query\FilterParameters;
|
||||
use LaravelJsonApi\Core\Query\SortFields;
|
||||
|
||||
@@ -39,44 +41,96 @@ trait ExpandsQuery
|
||||
return $query->skip($skip)->take($pagination['size']);
|
||||
}
|
||||
|
||||
final protected function addSortParams(Builder $query, ?SortFields $sort): Builder
|
||||
final protected function addSortParams(string $class, Builder $query, ?SortFields $sort): Builder
|
||||
{
|
||||
$config = config('api.valid_query_sort')[$class] ?? [];
|
||||
if (null === $sort) {
|
||||
return $query;
|
||||
}
|
||||
foreach ($sort->all() as $sortField) {
|
||||
$query->orderBy($sortField->name(), $sortField->isAscending() ? 'ASC' : 'DESC');
|
||||
if (in_array($sortField->name(), $config, true)) {
|
||||
$query->orderBy($sortField->name(), $sortField->isAscending() ? 'ASC' : 'DESC');
|
||||
}
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
private function parseAccountTypeFilter(array $value): array
|
||||
{
|
||||
$return = [];
|
||||
foreach ($value as $entry) {
|
||||
$return = array_merge($return, $this->mapAccountTypes($entry));
|
||||
}
|
||||
|
||||
return array_unique($return);
|
||||
}
|
||||
|
||||
private function parseAllFilters(string $class, FilterParameters $filters): array
|
||||
{
|
||||
$config = config('api.valid_api_filters')[$class];
|
||||
$parsed = [];
|
||||
foreach ($filters->all() as $filter) {
|
||||
$key = $filter->key();
|
||||
if (!in_array($key, $config, true)) {
|
||||
continue;
|
||||
}
|
||||
// make array if not array:
|
||||
$value = $filter->value();
|
||||
if (null === $value) {
|
||||
continue;
|
||||
}
|
||||
if (!is_array($value)) {
|
||||
$value = [$value];
|
||||
}
|
||||
|
||||
switch ($filter->key()) {
|
||||
case 'name':
|
||||
$parsed['name'] = $value;
|
||||
|
||||
break;
|
||||
|
||||
case 'type':
|
||||
$parsed['type'] = $this->parseAccountTypeFilter($value);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $parsed;
|
||||
}
|
||||
|
||||
final protected function addFilterParams(string $class, Builder $query, ?FilterParameters $filters): Builder
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
if (null === $filters) {
|
||||
return $query;
|
||||
}
|
||||
$config = config(sprintf('firefly.valid_query_filters.%s', $class)) ?? [];
|
||||
if (0 === count($filters->all())) {
|
||||
return $query;
|
||||
}
|
||||
$query->where(function (Builder $q) use ($config, $filters): void {
|
||||
foreach ($filters->all() as $filter) {
|
||||
if (in_array($filter->key(), $config, true)) {
|
||||
foreach ($filter->value() as $value) {
|
||||
$q->where($filter->key(), 'LIKE', sprintf('%%%s%%', $value));
|
||||
// parse filters valid for this class.
|
||||
$parsed = $this->parseAllFilters($class, $filters);
|
||||
|
||||
// expand query for each query filter
|
||||
$config = config('api.valid_query_filters')[$class];
|
||||
$query->where(function (Builder $q) use ($config, $parsed): void {
|
||||
foreach ($parsed as $key => $filter) {
|
||||
if (in_array($key, $config, true)) {
|
||||
Log::debug(sprintf('Add query filter "%s"', $key));
|
||||
// add type to query:
|
||||
foreach ($filter as $value) {
|
||||
$q->where($key, 'LIKE', sprintf('%%%s%%', $value));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// some filters are special, i.e. the account type filter.
|
||||
$typeFilters = $filters->value('type', false);
|
||||
if (false !== $typeFilters && count($typeFilters) > 0) {
|
||||
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
|
||||
foreach ($typeFilters as $typeFilter) {
|
||||
$types = $this->mapAccountTypes($typeFilter);
|
||||
$query->whereIn('account_types.type', $types);
|
||||
// TODO this is special treatment, but alas, unavoidable right now.
|
||||
if (Account::class === $class && array_key_exists('type', $parsed)) {
|
||||
if (count($parsed['type']) > 0) {
|
||||
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
|
||||
$query->whereIn('account_types.type', $parsed['type']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,17 +24,23 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Support\JsonApi;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\Core\Query\SortFields;
|
||||
|
||||
trait SortsCollection
|
||||
{
|
||||
protected function sortCollection(Collection $collection, ?SortFields $sortFields): Collection
|
||||
protected function sortCollection(string $class, Collection $collection, ?SortFields $sortFields): Collection
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
$config = config('api.valid_api_sort')[$class] ?? [];
|
||||
if (null === $sortFields) {
|
||||
return $collection;
|
||||
}
|
||||
foreach ($sortFields->all() as $sortField) {
|
||||
$collection = $sortField->isAscending() ? $collection->sortBy($sortField->name()) : $collection->sortByDesc($sortField->name());
|
||||
if (in_array($sortField->name(), $config, true)) {
|
||||
Log::debug(sprintf('Sort collection by "%s"', $sortField->name()));
|
||||
$collection = $sortField->isAscending() ? $collection->sortBy($sortField->name()) : $collection->sortByDesc($sortField->name());
|
||||
}
|
||||
}
|
||||
|
||||
return $collection;
|
||||
|
||||
131
app/Support/JsonApi/SortsQueryResults.php
Normal file
131
app/Support/JsonApi/SortsQueryResults.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/*
|
||||
* SortsQueryResults.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\JsonApi;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\Core\Query\SortField;
|
||||
use LaravelJsonApi\Core\Query\SortFields;
|
||||
|
||||
trait SortsQueryResults
|
||||
{
|
||||
final protected function postQuerySort(string $class, Collection $collection, SortFields $parameters): Collection
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
foreach ($parameters->all() as $field) {
|
||||
$collection = $this->sortQueryCollection($class, $collection, $field);
|
||||
}
|
||||
|
||||
return $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO improve this.
|
||||
*/
|
||||
private function sortQueryCollection(string $class, Collection $collection, SortField $field): Collection
|
||||
{
|
||||
// here be custom sort things.
|
||||
// sort by balance
|
||||
if (Account::class === $class && 'balance' === $field->name()) {
|
||||
$ascending = $field->isAscending();
|
||||
$collection = $collection->sort(function (Account $left, Account $right) use ($ascending): int {
|
||||
$leftSum = $this->sumBalance($left->balance);
|
||||
$rightSum = $this->sumBalance($right->balance);
|
||||
|
||||
return $ascending ? bccomp($leftSum, $rightSum) : bccomp($rightSum, $leftSum);
|
||||
});
|
||||
}
|
||||
if (Account::class === $class && 'balance_difference' === $field->name()) {
|
||||
$ascending = $field->isAscending();
|
||||
$collection = $collection->sort(function (Account $left, Account $right) use ($ascending): int {
|
||||
$leftSum = $this->sumBalanceDifference($left->balance);
|
||||
$rightSum = $this->sumBalanceDifference($right->balance);
|
||||
|
||||
return $ascending ? bccomp($leftSum, $rightSum) : bccomp($rightSum, $leftSum);
|
||||
});
|
||||
}
|
||||
// sort by account number
|
||||
if (Account::class === $class && 'account_number' === $field->name()) {
|
||||
$ascending = $field->isAscending();
|
||||
$collection = $collection->sort(function (Account $left, Account $right) use ($ascending): int {
|
||||
$leftNr = sprintf('%s%s', $left->iban, $left->account_number);
|
||||
$rightNr = sprintf('%s%s', $right->iban, $right->account_number);
|
||||
|
||||
return $ascending ? strcmp($leftNr, $rightNr) : strcmp($rightNr, $leftNr);
|
||||
});
|
||||
}
|
||||
|
||||
// sort by last activity
|
||||
if (Account::class === $class && 'last_activity' === $field->name()) {
|
||||
$ascending = $field->isAscending();
|
||||
$collection = $collection->sort(function (Account $left, Account $right) use ($ascending): int {
|
||||
$leftNr = (int)$left->last_activity?->format('U');
|
||||
$rightNr = (int)$right->last_activity?->format('U');
|
||||
if ($ascending) {
|
||||
return $leftNr <=> $rightNr;
|
||||
}
|
||||
|
||||
return $rightNr <=> $leftNr;
|
||||
// return (int) ($ascending ? $rightNr < $leftNr : $leftNr < $rightNr );
|
||||
});
|
||||
}
|
||||
|
||||
// sort by balance difference.
|
||||
|
||||
return $collection;
|
||||
}
|
||||
|
||||
private function sumBalance(?array $balance): string
|
||||
{
|
||||
if (null === $balance) {
|
||||
return '-10000000000'; // minus one billion
|
||||
}
|
||||
if (0 === count($balance)) {
|
||||
return '-10000000000'; // minus one billion
|
||||
}
|
||||
$sum = '0';
|
||||
foreach ($balance as $entry) {
|
||||
$sum = bcadd($sum, $entry['balance']);
|
||||
}
|
||||
|
||||
return $sum;
|
||||
}
|
||||
|
||||
private function sumBalanceDifference(?array $balance): string
|
||||
{
|
||||
if (null === $balance) {
|
||||
return '-10000000000'; // minus one billion
|
||||
}
|
||||
if (0 === count($balance)) {
|
||||
return '-10000000000'; // minus one billion
|
||||
}
|
||||
$sum = '0';
|
||||
foreach ($balance as $entry) {
|
||||
$sum = bcadd($sum, $entry['balance_difference']);
|
||||
}
|
||||
|
||||
return $sum;
|
||||
}
|
||||
}
|
||||
@@ -23,20 +23,22 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\JsonApi;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LaravelJsonApi\Core\Query\SortFields;
|
||||
|
||||
trait ValidateSortParameters
|
||||
{
|
||||
public function needsFullDataset(string $class, ?SortFields $params): bool
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
if (null === $params) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$config = config(sprintf('firefly.full_data_set.%s', $class)) ?? [];
|
||||
|
||||
$config = config('api.full_data_set')[$class] ?? [];
|
||||
foreach ($params->all() as $field) {
|
||||
if (in_array($field->name(), $config, true)) {
|
||||
Log::debug('TRUE');
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,16 @@ use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountBalance;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class AccountBalanceCalculator
|
||||
*
|
||||
* This class started as a piece of code to create and calculate "account balance" objects, but they
|
||||
* are at the moment unused. Instead, each transaction gets a before/after balance and an indicator if this
|
||||
* balance is up-to-date. This class now contains some methods to recalculate those amounts.
|
||||
*/
|
||||
class AccountBalanceCalculator
|
||||
{
|
||||
private function __construct()
|
||||
@@ -38,25 +46,35 @@ class AccountBalanceCalculator
|
||||
}
|
||||
|
||||
/**
|
||||
* Recalculate all balances for a given account.
|
||||
*
|
||||
* Je moet toch altijd wel alles doen want je weet niet waar een transaction journal invloed op heeft.
|
||||
* Dus dit aantikken per transaction journal is zinloos, beide accounts moeten gedaan worden.
|
||||
* Recalculate all balances.
|
||||
*/
|
||||
public static function forceRecalculateAll(): void
|
||||
{
|
||||
Transaction::whereNull('deleted_at')->update(['balance_dirty' => true]);
|
||||
$object = new self();
|
||||
$object->optimizedCalculation(new Collection());
|
||||
}
|
||||
|
||||
/**
|
||||
* Recalculate all balances.
|
||||
*/
|
||||
public static function recalculateAll(): void
|
||||
{
|
||||
$object = new self();
|
||||
$object->recalculateLatest(null);
|
||||
// $object->recalculateJournals(null, null);
|
||||
$object->optimizedCalculation(new Collection());
|
||||
}
|
||||
|
||||
public static function recalculateForJournal(TransactionJournal $transactionJournal): void
|
||||
{
|
||||
$object = new self();
|
||||
Log::debug(__METHOD__);
|
||||
$object = new self();
|
||||
|
||||
// recalculate the involved accounts:
|
||||
$accounts = new Collection();
|
||||
foreach ($transactionJournal->transactions as $transaction) {
|
||||
$object->recalculateLatest($transaction->account);
|
||||
// $object->recalculateJournals($transaction->account, $transactionJournal);
|
||||
$accounts->push($transaction->account);
|
||||
}
|
||||
$object->optimizedCalculation($accounts);
|
||||
}
|
||||
|
||||
private function getAccountBalanceByAccount(int $account, int $currency): AccountBalance
|
||||
@@ -80,6 +98,58 @@ class AccountBalanceCalculator
|
||||
return $entry;
|
||||
}
|
||||
|
||||
private function optimizedCalculation(Collection $accounts): void
|
||||
{
|
||||
Log::debug('start of optimizedCalculation');
|
||||
if ($accounts->count() > 0) {
|
||||
Log::debug(sprintf('Limited to %d account(s)', $accounts->count()));
|
||||
}
|
||||
// collect all transactions and the change they make.
|
||||
$balances = [];
|
||||
$count = 0;
|
||||
$query = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->whereNull('transactions.deleted_at')
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
// this order is the same as GroupCollector, but in the exact reverse.
|
||||
->orderBy('transaction_journals.date', 'asc')
|
||||
->orderBy('transaction_journals.order', 'desc')
|
||||
->orderBy('transaction_journals.id', 'asc')
|
||||
->orderBy('transaction_journals.description', 'asc')
|
||||
->orderBy('transactions.amount', 'asc')
|
||||
;
|
||||
if ($accounts->count() > 0) {
|
||||
$query->whereIn('transactions.account_id', $accounts->pluck('id')->toArray());
|
||||
}
|
||||
|
||||
$set = $query->get(['transactions.id', 'transactions.balance_dirty', 'transactions.transaction_currency_id', 'transaction_journals.date', 'transactions.account_id', 'transactions.amount']);
|
||||
|
||||
/** @var Transaction $entry */
|
||||
foreach ($set as $entry) {
|
||||
// start with empty array:
|
||||
$balances[$entry->account_id] ??= [];
|
||||
$balances[$entry->account_id][$entry->transaction_currency_id] ??= '0';
|
||||
|
||||
// before and after are easy:
|
||||
$before = $balances[$entry->account_id][$entry->transaction_currency_id];
|
||||
$after = bcadd($before, $entry->amount);
|
||||
if (true === $entry->balance_dirty || $accounts->count() > 0) {
|
||||
// update the transaction:
|
||||
$entry->balance_before = $before;
|
||||
$entry->balance_after = $after;
|
||||
$entry->balance_dirty = false;
|
||||
$entry->saveQuietly(); // do not observe this change, or we get stuck in a loop.
|
||||
++$count;
|
||||
}
|
||||
|
||||
// then update the array:
|
||||
$balances[$entry->account_id][$entry->transaction_currency_id] = $after;
|
||||
}
|
||||
Log::debug(sprintf('end of optimizedCalculation, corrected %d balance(s)', $count));
|
||||
// then update all transactions.
|
||||
|
||||
// ?? something with accounts?
|
||||
}
|
||||
|
||||
private function getAccountBalanceByJournal(string $title, int $account, int $journal, int $currency): AccountBalance
|
||||
{
|
||||
$query = AccountBalance::where('title', $title)->where('account_id', $account)->where('transaction_journal_id', $journal)->where('transaction_currency_id', $currency);
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace FireflyIII\Support;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Carbon\Exceptions\InvalidFormatException;
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@@ -40,13 +39,18 @@ use Illuminate\Support\Facades\Log;
|
||||
*/
|
||||
class Steam
|
||||
{
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public function balanceIgnoreVirtual(Account $account, Carbon $date): string
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$repository->setUser($account->user);
|
||||
|
||||
$currencyId = (int)$repository->getMetaValue($account, 'currency_id');
|
||||
$currencyId = (int) $repository->getMetaValue($account, 'currency_id');
|
||||
$transactions = $account->transactions()
|
||||
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59'))
|
||||
@@ -75,7 +79,7 @@ class Steam
|
||||
|
||||
/** @var array $transaction */
|
||||
foreach ($transactions as $transaction) {
|
||||
$value = (string)($transaction[$key] ?? '0');
|
||||
$value = (string) ($transaction[$key] ?? '0');
|
||||
$value = '' === $value ? '0' : $value;
|
||||
$sum = bcadd($sum, $value);
|
||||
}
|
||||
@@ -92,6 +96,7 @@ class Steam
|
||||
*/
|
||||
public function balanceInRange(Account $account, Carbon $start, Carbon $end, ?TransactionCurrency $currency = null): array
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($account->id);
|
||||
$cache->addProperty('balance-in-range');
|
||||
@@ -144,14 +149,14 @@ class Steam
|
||||
/** @var Transaction $entry */
|
||||
foreach ($set as $entry) {
|
||||
// normal amount and foreign amount
|
||||
$modified = (string)(null === $entry->modified ? '0' : $entry->modified);
|
||||
$foreignModified = (string)(null === $entry->modified_foreign ? '0' : $entry->modified_foreign);
|
||||
$modified = (string) (null === $entry->modified ? '0' : $entry->modified);
|
||||
$foreignModified = (string) (null === $entry->modified_foreign ? '0' : $entry->modified_foreign);
|
||||
$amount = '0';
|
||||
if ($currencyId === (int)$entry->transaction_currency_id || 0 === $currencyId) {
|
||||
if ($currencyId === (int) $entry->transaction_currency_id || 0 === $currencyId) {
|
||||
// use normal amount:
|
||||
$amount = $modified;
|
||||
}
|
||||
if ($currencyId === (int)$entry->foreign_currency_id) {
|
||||
if ($currencyId === (int) $entry->foreign_currency_id) {
|
||||
// use foreign amount:
|
||||
$amount = $foreignModified;
|
||||
}
|
||||
@@ -167,6 +172,48 @@ class Steam
|
||||
return $balances;
|
||||
}
|
||||
|
||||
public function balanceByTransactions(Account $account, Carbon $date, ?TransactionCurrency $currency): array
|
||||
{
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($account->id);
|
||||
$cache->addProperty('balance-by-transactions');
|
||||
$cache->addProperty($date);
|
||||
$cache->addProperty(null !== $currency ? $currency->id : 0);
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$query = $account->transactions()
|
||||
->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->orderBy('transaction_journals.date', 'desc')
|
||||
->orderBy('transaction_journals.order', 'asc')
|
||||
->orderBy('transaction_journals.description', 'desc')
|
||||
->orderBy('transactions.amount', 'desc')
|
||||
;
|
||||
if (null !== $currency) {
|
||||
$query->where('transactions.transaction_currency_id', $currency->id);
|
||||
$query->limit(1);
|
||||
$result = $query->get(['transactions.transaction_currency_id', 'transactions.balance_after'])->first();
|
||||
$key = (int) $result->transaction_currency_id;
|
||||
$return = [$key => $result->balance_after];
|
||||
$cache->store($return);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
$return = [];
|
||||
$result = $query->get(['transactions.transaction_currency_id', 'transactions.balance_after']);
|
||||
foreach ($result as $entry) {
|
||||
$key = (int) $entry->transaction_currency_id;
|
||||
if (array_key_exists($key, $return)) {
|
||||
continue;
|
||||
}
|
||||
$return[$key] = $entry->balance_after;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets balance at the end of current month by default
|
||||
*
|
||||
@@ -174,6 +221,7 @@ class Steam
|
||||
*/
|
||||
public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
// abuse chart properties:
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($account->id);
|
||||
@@ -222,6 +270,7 @@ class Steam
|
||||
*/
|
||||
public function balanceInRangeConverted(Account $account, Carbon $start, Carbon $end, TransactionCurrency $native): array
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($account->id);
|
||||
$cache->addProperty('balance-in-range-converted');
|
||||
@@ -282,7 +331,7 @@ class Steam
|
||||
}
|
||||
$format = $day->format('Y-m-d');
|
||||
// if the transaction is in the expected currency, change nothing.
|
||||
if ((int)$transaction['transaction_currency_id'] === $native->id) {
|
||||
if ((int) $transaction['transaction_currency_id'] === $native->id) {
|
||||
// change the current balance, set it to today, continue the loop.
|
||||
$currentBalance = bcadd($currentBalance, $transaction['amount']);
|
||||
$balances[$format] = $currentBalance;
|
||||
@@ -291,7 +340,7 @@ class Steam
|
||||
continue;
|
||||
}
|
||||
// if foreign currency is in the expected currency, do nothing:
|
||||
if ((int)$transaction['foreign_currency_id'] === $native->id) {
|
||||
if ((int) $transaction['foreign_currency_id'] === $native->id) {
|
||||
$currentBalance = bcadd($currentBalance, $transaction['foreign_amount']);
|
||||
$balances[$format] = $currentBalance;
|
||||
Log::debug(sprintf('%s: transaction in %s (foreign), new balance is %s.', $format, $native->code, $currentBalance));
|
||||
@@ -299,7 +348,7 @@ class Steam
|
||||
continue;
|
||||
}
|
||||
// otherwise, convert 'amount' to the necessary currency:
|
||||
$currencyId = (int)$transaction['transaction_currency_id'];
|
||||
$currencyId = (int) $transaction['transaction_currency_id'];
|
||||
$currency = $currencies[$currencyId] ?? TransactionCurrency::find($currencyId);
|
||||
$currencies[$currencyId] = $currency;
|
||||
|
||||
@@ -347,6 +396,7 @@ class Steam
|
||||
*/
|
||||
public function balanceConverted(Account $account, Carbon $date, TransactionCurrency $native): string
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
Log::debug(sprintf('Now in balanceConverted (%s) for account #%d, converting to %s', $date->format('Y-m-d'), $account->id, $native->code));
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($account->id);
|
||||
@@ -356,7 +406,7 @@ class Steam
|
||||
if ($cache->has()) {
|
||||
Log::debug('Cached!');
|
||||
|
||||
// return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
@@ -492,6 +542,7 @@ class Steam
|
||||
*/
|
||||
public function balancesByAccounts(Collection $accounts, Carbon $date): array
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
// cache this property.
|
||||
$cache = new CacheProperties();
|
||||
@@ -522,6 +573,7 @@ class Steam
|
||||
*/
|
||||
public function balancesByAccountsConverted(Collection $accounts, Carbon $date): array
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
// cache this property.
|
||||
$cache = new CacheProperties();
|
||||
@@ -529,7 +581,7 @@ class Steam
|
||||
$cache->addProperty('balances-converted');
|
||||
$cache->addProperty($date);
|
||||
if ($cache->has()) {
|
||||
// return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
// need to do this per account.
|
||||
@@ -555,6 +607,7 @@ class Steam
|
||||
*/
|
||||
public function balancesPerCurrencyByAccounts(Collection $accounts, Carbon $date): array
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
// cache this property.
|
||||
$cache = new CacheProperties();
|
||||
@@ -580,6 +633,7 @@ class Steam
|
||||
|
||||
public function balancePerCurrency(Account $account, Carbon $date): array
|
||||
{
|
||||
Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__));
|
||||
// abuse chart properties:
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($account->id);
|
||||
@@ -598,7 +652,7 @@ class Steam
|
||||
|
||||
/** @var \stdClass $entry */
|
||||
foreach ($balances as $entry) {
|
||||
$return[(int)$entry->transaction_currency_id] = (string)$entry->sum_for_currency;
|
||||
$return[(int) $entry->transaction_currency_id] = (string) $entry->sum_for_currency;
|
||||
}
|
||||
$cache->store($return);
|
||||
|
||||
@@ -703,7 +757,7 @@ class Steam
|
||||
throw new FireflyException($e->getMessage(), 0, $e);
|
||||
}
|
||||
|
||||
return (string)$hostName;
|
||||
return (string) $hostName;
|
||||
}
|
||||
|
||||
public function getLastActivities(array $accounts): array
|
||||
@@ -738,7 +792,7 @@ class Steam
|
||||
if ('equal' === $locale) {
|
||||
$locale = $this->getLanguage();
|
||||
}
|
||||
$locale = (string)$locale;
|
||||
$locale = (string) $locale;
|
||||
|
||||
// Check for Windows to replace the locale correctly.
|
||||
if ('WIN' === strtoupper(substr(PHP_OS, 0, 3))) {
|
||||
@@ -838,20 +892,20 @@ class Steam
|
||||
}
|
||||
Log::debug(sprintf('Floatalizing %s', $value));
|
||||
|
||||
$number = substr($value, 0, (int)strpos($value, 'E'));
|
||||
$number = substr($value, 0, (int) strpos($value, 'E'));
|
||||
if (str_contains($number, '.')) {
|
||||
$post = strlen(substr($number, (int)strpos($number, '.') + 1));
|
||||
$mantis = substr($value, (int)strpos($value, 'E') + 1);
|
||||
$post = strlen(substr($number, (int) strpos($number, '.') + 1));
|
||||
$mantis = substr($value, (int) strpos($value, 'E') + 1);
|
||||
if ($mantis < 0) {
|
||||
$post += abs((int)$mantis);
|
||||
$post += abs((int) $mantis);
|
||||
}
|
||||
|
||||
// TODO careless float could break financial math.
|
||||
return number_format((float)$value, $post, '.', '');
|
||||
return number_format((float) $value, $post, '.', '');
|
||||
}
|
||||
|
||||
// TODO careless float could break financial math.
|
||||
return number_format((float)$value, 0, '.', '');
|
||||
return number_format((float) $value, 0, '.', '');
|
||||
}
|
||||
|
||||
public function opposite(?string $amount = null): ?string
|
||||
@@ -871,24 +925,24 @@ class Steam
|
||||
// has a K in it, remove the K and multiply by 1024.
|
||||
$bytes = bcmul(rtrim($string, 'k'), '1024');
|
||||
|
||||
return (int)$bytes;
|
||||
return (int) $bytes;
|
||||
}
|
||||
|
||||
if (false !== stripos($string, 'm')) {
|
||||
// has a M in it, remove the M and multiply by 1048576.
|
||||
$bytes = bcmul(rtrim($string, 'm'), '1048576');
|
||||
|
||||
return (int)$bytes;
|
||||
return (int) $bytes;
|
||||
}
|
||||
|
||||
if (false !== stripos($string, 'g')) {
|
||||
// has a G in it, remove the G and multiply by (1024)^3.
|
||||
$bytes = bcmul(rtrim($string, 'g'), '1073741824');
|
||||
|
||||
return (int)$bytes;
|
||||
return (int) $bytes;
|
||||
}
|
||||
|
||||
return (int)$string;
|
||||
return (int) $string;
|
||||
}
|
||||
|
||||
public function positive(string $amount): string
|
||||
|
||||
@@ -63,9 +63,16 @@ class General extends AbstractExtension
|
||||
}
|
||||
|
||||
/** @var Carbon $date */
|
||||
$date = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
$date = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
$info = app('steam')->balanceByTransactions($account, $date, null);
|
||||
|
||||
return app('steam')->balance($account, $date);
|
||||
$strings = [];
|
||||
foreach ($info as $currencyId => $balance) {
|
||||
$strings[] = app('amount')->formatByCurrencyId($currencyId, $balance, false);
|
||||
}
|
||||
|
||||
return implode(', ', $strings);
|
||||
// return app('steam')->balance($account, $date);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
112
app/User.php
112
app/User.php
@@ -24,8 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Eloquent;
|
||||
use FireflyIII\Enums\UserRoleEnum;
|
||||
use FireflyIII\Events\RequestedNewPassword;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
@@ -56,129 +54,21 @@ use FireflyIII\Notifications\Admin\TestNotification;
|
||||
use FireflyIII\Notifications\Admin\UserInvitation;
|
||||
use FireflyIII\Notifications\Admin\UserRegistration;
|
||||
use FireflyIII\Notifications\Admin\VersionCheckResult;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\DatabaseNotification;
|
||||
use Illuminate\Notifications\DatabaseNotificationCollection;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Passport\Client;
|
||||
use Laravel\Passport\HasApiTokens;
|
||||
use Laravel\Passport\Token;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Class User.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
|
||||
*
|
||||
* @property int|string $id
|
||||
* @property string $email
|
||||
* @property bool $isAdmin
|
||||
* @property bool $has2FA
|
||||
* @property array $prefs
|
||||
* @property string $password
|
||||
* @property string $mfa_secret
|
||||
* @property Collection $roles
|
||||
* @property string $blocked_code
|
||||
* @property bool $blocked
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|string $remember_token
|
||||
* @property null|string $reset
|
||||
* @property Account[]|\Illuminate\Database\Eloquent\Collection $accounts
|
||||
* @property Attachment[]|\Illuminate\Database\Eloquent\Collection $attachments
|
||||
* @property AvailableBudget[]|\Illuminate\Database\Eloquent\Collection $availableBudgets
|
||||
* @property Bill[]|\Illuminate\Database\Eloquent\Collection $bills
|
||||
* @property Budget[]|\Illuminate\Database\Eloquent\Collection $budgets
|
||||
* @property Category[]|\Illuminate\Database\Eloquent\Collection $categories
|
||||
* @property Client[]|\Illuminate\Database\Eloquent\Collection $clients
|
||||
* @property CurrencyExchangeRate[]|\Illuminate\Database\Eloquent\Collection $currencyExchangeRates
|
||||
* @property DatabaseNotification[]|DatabaseNotificationCollection $notifications
|
||||
* @property \Illuminate\Database\Eloquent\Collection|PiggyBank[] $piggyBanks
|
||||
* @property \Illuminate\Database\Eloquent\Collection|Preference[] $preferences
|
||||
* @property \Illuminate\Database\Eloquent\Collection|Recurrence[] $recurrences
|
||||
* @property \Illuminate\Database\Eloquent\Collection|RuleGroup[] $ruleGroups
|
||||
* @property \Illuminate\Database\Eloquent\Collection|Rule[] $rules
|
||||
* @property \Illuminate\Database\Eloquent\Collection|Tag[] $tags
|
||||
* @property \Illuminate\Database\Eloquent\Collection|Token[] $tokens
|
||||
* @property \Illuminate\Database\Eloquent\Collection|TransactionGroup[] $transactionGroups
|
||||
* @property \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionJournals
|
||||
* @property \Illuminate\Database\Eloquent\Collection|Transaction[] $transactions
|
||||
*
|
||||
* @method static Builder|User newModelQuery()
|
||||
* @method static Builder|User newQuery()
|
||||
* @method static Builder|User query()
|
||||
* @method static Builder|User whereBlocked($value)
|
||||
* @method static Builder|User whereBlockedCode($value)
|
||||
* @method static Builder|User whereCreatedAt($value)
|
||||
* @method static Builder|User whereEmail($value)
|
||||
* @method static Builder|User whereId($value)
|
||||
* @method static Builder|User wherePassword($value)
|
||||
* @method static Builder|User whereRememberToken($value)
|
||||
* @method static Builder|User whereReset($value)
|
||||
* @method static Builder|User whereUpdatedAt($value)
|
||||
*
|
||||
* @property null|string $objectguid
|
||||
* @property null|int $accounts_count
|
||||
* @property null|int $attachments_count
|
||||
* @property null|int $available_budgets_count
|
||||
* @property null|int $bills_count
|
||||
* @property null|int $budgets_count
|
||||
* @property null|int $categories_count
|
||||
* @property null|int $clients_count
|
||||
* @property null|int $currency_exchange_rates_count
|
||||
* @property null|int $notifications_count
|
||||
* @property null|int $piggy_banks_count
|
||||
* @property null|int $preferences_count
|
||||
* @property null|int $recurrences_count
|
||||
* @property null|int $roles_count
|
||||
* @property null|int $rule_groups_count
|
||||
* @property null|int $rules_count
|
||||
* @property null|int $tags_count
|
||||
* @property null|int $tokens_count
|
||||
* @property null|int $transaction_groups_count
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property null|int $transactions_count
|
||||
*
|
||||
* @method static Builder|User whereMfaSecret($value)
|
||||
* @method static Builder|User whereObjectguid($value)
|
||||
*
|
||||
* @property null|string $provider
|
||||
*
|
||||
* @method static Builder|User whereProvider($value)
|
||||
*
|
||||
* @property \Illuminate\Database\Eloquent\Collection|ObjectGroup[] $objectGroups
|
||||
* @property null|int $object_groups_count
|
||||
* @property \Illuminate\Database\Eloquent\Collection|Webhook[] $webhooks
|
||||
* @property null|int $webhooks_count
|
||||
* @property null|string $two_factor_secret
|
||||
* @property null|string $two_factor_recovery_codes
|
||||
* @property null|string $guid
|
||||
* @property null|string $domain
|
||||
*
|
||||
* @method static Builder|User whereDomain($value)
|
||||
* @method static Builder|User whereGuid($value)
|
||||
* @method static Builder|User whereTwoFactorRecoveryCodes($value)
|
||||
* @method static Builder|User whereTwoFactorSecret($value)
|
||||
*
|
||||
* @property null|int $user_group_id
|
||||
* @property GroupMembership[]|\Illuminate\Database\Eloquent\Collection $groupMemberships
|
||||
* @property null|int $group_memberships_count
|
||||
* @property null|UserGroup $userGroup
|
||||
*
|
||||
* @method static Builder|User whereUserGroupId($value)
|
||||
*
|
||||
* @property \Illuminate\Database\Eloquent\Collection<int, TransactionCurrency> $currencies
|
||||
* @property null|int $currencies_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
* @mixin IdeHelperUser
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
|
||||
68
composer.lock
generated
68
composer.lock
generated
@@ -2410,16 +2410,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v11.18.1",
|
||||
"version": "v11.19.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "b19ba518c56852567e99fbae9321bc436c2cc5a8"
|
||||
"reference": "5e103d499e9ee5bcfc184412d034c4e516b87085"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/b19ba518c56852567e99fbae9321bc436c2cc5a8",
|
||||
"reference": "b19ba518c56852567e99fbae9321bc436c2cc5a8",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/5e103d499e9ee5bcfc184412d034c4e516b87085",
|
||||
"reference": "5e103d499e9ee5bcfc184412d034c4e516b87085",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2612,7 +2612,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2024-07-26T10:39:29+00:00"
|
||||
"time": "2024-07-30T15:22:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/passport",
|
||||
@@ -4344,23 +4344,23 @@
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/collision",
|
||||
"version": "v8.3.0",
|
||||
"version": "v8.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nunomaduro/collision.git",
|
||||
"reference": "b49f5b2891ce52726adfd162841c69d4e4c84229"
|
||||
"reference": "e7d1aa8ed753f63fa816932bbc89678238843b4a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/b49f5b2891ce52726adfd162841c69d4e4c84229",
|
||||
"reference": "b49f5b2891ce52726adfd162841c69d4e4c84229",
|
||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/e7d1aa8ed753f63fa816932bbc89678238843b4a",
|
||||
"reference": "e7d1aa8ed753f63fa816932bbc89678238843b4a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"filp/whoops": "^2.15.4",
|
||||
"nunomaduro/termwind": "^2.0.1",
|
||||
"php": "^8.2.0",
|
||||
"symfony/console": "^7.1.2"
|
||||
"symfony/console": "^7.1.3"
|
||||
},
|
||||
"conflict": {
|
||||
"laravel/framework": "<11.0.0 || >=12.0.0",
|
||||
@@ -4368,13 +4368,13 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"larastan/larastan": "^2.9.8",
|
||||
"laravel/framework": "^11.16.0",
|
||||
"laravel/pint": "^1.16.2",
|
||||
"laravel/sail": "^1.30.2",
|
||||
"laravel/framework": "^11.19.0",
|
||||
"laravel/pint": "^1.17.1",
|
||||
"laravel/sail": "^1.31.0",
|
||||
"laravel/sanctum": "^4.0.2",
|
||||
"laravel/tinker": "^2.9.0",
|
||||
"orchestra/testbench-core": "^9.2.1",
|
||||
"pestphp/pest": "^2.34.9 || ^3.0.0",
|
||||
"orchestra/testbench-core": "^9.2.3",
|
||||
"pestphp/pest": "^2.35.0 || ^3.0.0",
|
||||
"sebastian/environment": "^6.1.0 || ^7.0.0"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -4437,7 +4437,7 @@
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-16T22:41:01+00:00"
|
||||
"time": "2024-08-03T15:32:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/termwind",
|
||||
@@ -6046,16 +6046,16 @@
|
||||
},
|
||||
{
|
||||
"name": "spatie/flare-client-php",
|
||||
"version": "1.7.0",
|
||||
"version": "1.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/flare-client-php.git",
|
||||
"reference": "097040ff51e660e0f6fc863684ac4b02c93fa234"
|
||||
"reference": "180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/097040ff51e660e0f6fc863684ac4b02c93fa234",
|
||||
"reference": "097040ff51e660e0f6fc863684ac4b02c93fa234",
|
||||
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122",
|
||||
"reference": "180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6073,7 +6073,7 @@
|
||||
"phpstan/extension-installer": "^1.1",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.0",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"spatie/phpunit-snapshot-assertions": "^4.0|^5.0"
|
||||
"spatie/pest-plugin-snapshots": "^1.0|^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -6103,7 +6103,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/flare-client-php/issues",
|
||||
"source": "https://github.com/spatie/flare-client-php/tree/1.7.0"
|
||||
"source": "https://github.com/spatie/flare-client-php/tree/1.8.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6111,7 +6111,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-06-12T14:39:14+00:00"
|
||||
"time": "2024-08-01T08:27:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/ignition",
|
||||
@@ -11225,16 +11225,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.11.8",
|
||||
"version": "1.11.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec"
|
||||
"reference": "e370bcddadaede0c1716338b262346f40d296f82"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec",
|
||||
"reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e370bcddadaede0c1716338b262346f40d296f82",
|
||||
"reference": "e370bcddadaede0c1716338b262346f40d296f82",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -11279,7 +11279,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-24T07:01:22+00:00"
|
||||
"time": "2024-08-01T16:25:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-deprecation-rules",
|
||||
@@ -11700,16 +11700,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "10.5.28",
|
||||
"version": "10.5.29",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "ff7fb85cdf88131b83e721fb2a327b664dbed275"
|
||||
"reference": "8e9e80872b4e8064401788ee8a32d40b4455318f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ff7fb85cdf88131b83e721fb2a327b664dbed275",
|
||||
"reference": "ff7fb85cdf88131b83e721fb2a327b664dbed275",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e9e80872b4e8064401788ee8a32d40b4455318f",
|
||||
"reference": "8e9e80872b4e8064401788ee8a32d40b4455318f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -11781,7 +11781,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.28"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.29"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -11797,7 +11797,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-18T14:54:16+00:00"
|
||||
"time": "2024-07-30T11:08:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
||||
65
config/api.php
Normal file
65
config/api.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/*
|
||||
* api.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
|
||||
return [
|
||||
// allowed filters (search) for APIs
|
||||
'filters' => [
|
||||
'allowed' => [
|
||||
'accounts' => [
|
||||
'name' => 'string',
|
||||
'active' => 'boolean',
|
||||
'iban' => 'iban',
|
||||
'balance' => 'numeric',
|
||||
'last_activity' => 'date',
|
||||
'balance_difference' => 'numeric',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// allowed sort columns for APIs
|
||||
'sorting' => [
|
||||
'allowed' => [
|
||||
'transactions' => ['description', 'amount'],
|
||||
'accounts' => ['name', 'active', 'iban', 'order', 'account_number', 'balance', 'last_activity', 'balance_difference', 'current_debt'],
|
||||
],
|
||||
],
|
||||
// valid query columns for sorting the query
|
||||
'valid_query_sort' => [
|
||||
Account::class => ['id', 'name', 'active', 'iban', 'order'],
|
||||
],
|
||||
// valid query columns for sorting the query results
|
||||
'valid_api_sort' => [
|
||||
Account::class => ['account_number'],
|
||||
],
|
||||
'full_data_set' => [
|
||||
Account::class => ['last_activity', 'balance', 'balance_difference', 'current_debt', 'account_number'],
|
||||
],
|
||||
'valid_query_filters' => [
|
||||
Account::class => ['id', 'name', 'iban', 'active'],
|
||||
],
|
||||
'valid_api_filters' => [
|
||||
Account::class => ['id', 'name', 'iban', 'active', 'type'],
|
||||
],
|
||||
];
|
||||
@@ -117,7 +117,7 @@ return [
|
||||
'expression_engine' => true,
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2024-07-29',
|
||||
'version' => 'develop/2024-08-05',
|
||||
'api_version' => '2.1.0',
|
||||
'db_version' => 24,
|
||||
|
||||
@@ -919,32 +919,4 @@ return [
|
||||
|
||||
// preselected account lists possibilities:
|
||||
'preselected_accounts' => ['all', 'assets', 'liabilities'],
|
||||
|
||||
// allowed filters (search) for APIs
|
||||
'filters' => [
|
||||
'allowed' => [
|
||||
'accounts' => [
|
||||
'name' => 'string',
|
||||
'active' => 'boolean',
|
||||
'iban' => 'iban',
|
||||
'balance' => 'numeric',
|
||||
'last_activity' => 'date',
|
||||
'balance_difference' => 'numeric',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// allowed sort columns for APIs
|
||||
'sorting' => [
|
||||
'allowed' => [
|
||||
'transactions' => ['description', 'amount'],
|
||||
'accounts' => ['name', 'active', 'iban', 'balance', 'last_activity', 'balance_difference', 'current_debt'],
|
||||
],
|
||||
],
|
||||
'full_data_set' => [
|
||||
'account' => ['last_activity', 'balance_difference', 'current_balance', 'current_debt'],
|
||||
],
|
||||
'valid_query_filters' => [
|
||||
'account' => ['name', 'iban', 'active'],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'cache-prefix' => '',
|
||||
'enabled' => env('MODEL_CACHE_ENABLED', true),
|
||||
'enabled' => env('MODEL_CACHE_ENABLED', false),
|
||||
'use-database-keying' => env('MODEL_CACHE_USE_DATABASE_KEYING', true),
|
||||
'store' => env('MODEL_CACHE_STORE'),
|
||||
];
|
||||
|
||||
@@ -54,8 +54,10 @@ return [
|
||||
'firefly' => [
|
||||
'liability_direction_debit_short',
|
||||
'liability_direction_credit_short',
|
||||
'liability_direction_null_short',
|
||||
'interest_calc_yearly',
|
||||
'interest_calc_',
|
||||
'interest_calc_null',
|
||||
'interest_calc_daily',
|
||||
'interest_calc_monthly',
|
||||
'interest_calc_weekly',
|
||||
@@ -105,6 +107,7 @@ return [
|
||||
'expense_account',
|
||||
'revenue_account',
|
||||
'budget',
|
||||
'account_type_undefined',
|
||||
'account_type_Asset account',
|
||||
'account_type_Expense account',
|
||||
'account_type_Revenue account',
|
||||
|
||||
106
database/migrations/2024_07_28_145631_add_running_balance.php
Normal file
106
database/migrations/2024_07_28_145631_add_running_balance.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('transactions', 'balance_before')) {
|
||||
$table->decimal('balance_before', 32, 12)->nullable()->after('amount');
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
app('log')->error(sprintf('Could not execute query: %s', $e->getMessage()));
|
||||
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
}
|
||||
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('transactions', 'balance_after')) {
|
||||
$table->decimal('balance_after', 32, 12)->nullable()->after('balance_before');
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
app('log')->error(sprintf('Could not execute query: %s', $e->getMessage()));
|
||||
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
}
|
||||
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('transactions', 'balance_dirty')) {
|
||||
$table->boolean('balance_dirty')->default(true)->after('balance_after');
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
app('log')->error(sprintf('Could not execute query: %s', $e->getMessage()));
|
||||
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('transactions', 'balance_before')) {
|
||||
$table->dropColumn('balance_before');
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
app('log')->error(sprintf('Could not execute query: %s', $e->getMessage()));
|
||||
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
}
|
||||
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('transactions', 'balance_after')) {
|
||||
$table->dropColumn('balance_after');
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
app('log')->error(sprintf('Could not execute query: %s', $e->getMessage()));
|
||||
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
}
|
||||
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('transactions', 'balance_dirty')) {
|
||||
$table->dropColumn('balance_dirty');
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
app('log')->error(sprintf('Could not execute query: %s', $e->getMessage()));
|
||||
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
}
|
||||
}
|
||||
};
|
||||
391
package-lock.json
generated
391
package-lock.json
generated
@@ -69,30 +69,30 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/compat-data": {
|
||||
"version": "7.25.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.0.tgz",
|
||||
"integrity": "sha512-P4fwKI2mjEb3ZU5cnMJzvRsRKGBUcs8jvxIoRmr6ufAY9Xk2Bz7JubRTTivkw55c7WQJfTECeqYVa+HZ0FzREg==",
|
||||
"version": "7.25.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.2.tgz",
|
||||
"integrity": "sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/core": {
|
||||
"version": "7.24.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz",
|
||||
"integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==",
|
||||
"version": "7.25.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz",
|
||||
"integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.24.7",
|
||||
"@babel/generator": "^7.24.9",
|
||||
"@babel/helper-compilation-targets": "^7.24.8",
|
||||
"@babel/helper-module-transforms": "^7.24.9",
|
||||
"@babel/helpers": "^7.24.8",
|
||||
"@babel/parser": "^7.24.8",
|
||||
"@babel/template": "^7.24.7",
|
||||
"@babel/traverse": "^7.24.8",
|
||||
"@babel/types": "^7.24.9",
|
||||
"@babel/generator": "^7.25.0",
|
||||
"@babel/helper-compilation-targets": "^7.25.2",
|
||||
"@babel/helper-module-transforms": "^7.25.2",
|
||||
"@babel/helpers": "^7.25.0",
|
||||
"@babel/parser": "^7.25.0",
|
||||
"@babel/template": "^7.25.0",
|
||||
"@babel/traverse": "^7.25.2",
|
||||
"@babel/types": "^7.25.2",
|
||||
"convert-source-map": "^2.0.0",
|
||||
"debug": "^4.1.0",
|
||||
"gensync": "^1.0.0-beta.2",
|
||||
@@ -157,12 +157,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-compilation-targets": {
|
||||
"version": "7.24.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz",
|
||||
"integrity": "sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==",
|
||||
"version": "7.25.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz",
|
||||
"integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/compat-data": "^7.24.8",
|
||||
"@babel/compat-data": "^7.25.2",
|
||||
"@babel/helper-validator-option": "^7.24.8",
|
||||
"browserslist": "^4.23.1",
|
||||
"lru-cache": "^5.1.1",
|
||||
@@ -212,9 +212,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-create-regexp-features-plugin": {
|
||||
"version": "7.25.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.0.tgz",
|
||||
"integrity": "sha512-q0T+dknZS+L5LDazIP+02gEZITG5unzvb6yIjcmj5i0eFrs5ToBV2m2JGH4EsE/gtP8ygEGLGApBgRIZkTm7zg==",
|
||||
"version": "7.25.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.2.tgz",
|
||||
"integrity": "sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "^7.24.7",
|
||||
@@ -280,15 +280,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-module-transforms": {
|
||||
"version": "7.25.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.0.tgz",
|
||||
"integrity": "sha512-bIkOa2ZJYn7FHnepzr5iX9Kmz8FjIz4UKzJ9zhX3dnYuVW0xul9RuR3skBfoLu+FPTQw90EHW9rJsSZhyLQ3fQ==",
|
||||
"version": "7.25.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz",
|
||||
"integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": "^7.24.7",
|
||||
"@babel/helper-simple-access": "^7.24.7",
|
||||
"@babel/helper-validator-identifier": "^7.24.7",
|
||||
"@babel/traverse": "^7.25.0"
|
||||
"@babel/traverse": "^7.25.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -510,10 +510,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.25.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.0.tgz",
|
||||
"integrity": "sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==",
|
||||
"version": "7.25.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz",
|
||||
"integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.25.2"
|
||||
},
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
},
|
||||
@@ -522,13 +525,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": {
|
||||
"version": "7.25.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.0.tgz",
|
||||
"integrity": "sha512-dG0aApncVQwAUJa8tP1VHTnmU67BeIQvKafd3raEx315H54FfkZSz3B/TT+33ZQAjatGJA79gZqTtqL5QZUKXw==",
|
||||
"version": "7.25.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.3.tgz",
|
||||
"integrity": "sha512-wUrcsxZg6rqBXG05HG1FPYgsP6EvwF4WpBbxIpWIIYnH8wG0gzx3yZY3dtEHas4sTAOGkbTsc9EGPxwff8lRoA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.24.8",
|
||||
"@babel/traverse": "^7.25.0"
|
||||
"@babel/traverse": "^7.25.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -1176,12 +1179,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-transform-literals": {
|
||||
"version": "7.24.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz",
|
||||
"integrity": "sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ==",
|
||||
"version": "7.25.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.2.tgz",
|
||||
"integrity": "sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.24.7"
|
||||
"@babel/helper-plugin-utils": "^7.24.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -1682,16 +1685,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/preset-env": {
|
||||
"version": "7.25.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.0.tgz",
|
||||
"integrity": "sha512-vYAA8PrCOeZfG4D87hmw1KJ1BPubghXP1e2MacRFwECGNKL76dkA38JEwYllbvQCpf/kLxsTtir0b8MtxKoVCw==",
|
||||
"version": "7.25.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.3.tgz",
|
||||
"integrity": "sha512-QsYW7UeAaXvLPX9tdVliMJE7MD7M6MLYVTovRTIwhoYQVFHR1rM4wO8wqAezYi3/BpSD+NzVCZ69R6smWiIi8g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/compat-data": "^7.25.0",
|
||||
"@babel/helper-compilation-targets": "^7.24.8",
|
||||
"@babel/compat-data": "^7.25.2",
|
||||
"@babel/helper-compilation-targets": "^7.25.2",
|
||||
"@babel/helper-plugin-utils": "^7.24.8",
|
||||
"@babel/helper-validator-option": "^7.24.8",
|
||||
"@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.0",
|
||||
"@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.3",
|
||||
"@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.0",
|
||||
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.0",
|
||||
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7",
|
||||
@@ -1732,9 +1735,9 @@
|
||||
"@babel/plugin-transform-exponentiation-operator": "^7.24.7",
|
||||
"@babel/plugin-transform-export-namespace-from": "^7.24.7",
|
||||
"@babel/plugin-transform-for-of": "^7.24.7",
|
||||
"@babel/plugin-transform-function-name": "^7.25.0",
|
||||
"@babel/plugin-transform-function-name": "^7.25.1",
|
||||
"@babel/plugin-transform-json-strings": "^7.24.7",
|
||||
"@babel/plugin-transform-literals": "^7.24.7",
|
||||
"@babel/plugin-transform-literals": "^7.25.2",
|
||||
"@babel/plugin-transform-logical-assignment-operators": "^7.24.7",
|
||||
"@babel/plugin-transform-member-expression-literals": "^7.24.7",
|
||||
"@babel/plugin-transform-modules-amd": "^7.24.7",
|
||||
@@ -1833,16 +1836,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.25.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.1.tgz",
|
||||
"integrity": "sha512-LrHHoWq08ZpmmFqBAzN+hUdWwy5zt7FGa/hVwMcOqW6OVtwqaoD5utfuGYU87JYxdZgLUvktAsn37j/sYR9siA==",
|
||||
"version": "7.25.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.3.tgz",
|
||||
"integrity": "sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.24.7",
|
||||
"@babel/generator": "^7.25.0",
|
||||
"@babel/parser": "^7.25.0",
|
||||
"@babel/parser": "^7.25.3",
|
||||
"@babel/template": "^7.25.0",
|
||||
"@babel/types": "^7.25.0",
|
||||
"@babel/types": "^7.25.2",
|
||||
"debug": "^4.3.1",
|
||||
"globals": "^11.1.0"
|
||||
},
|
||||
@@ -1851,9 +1854,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.25.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.0.tgz",
|
||||
"integrity": "sha512-LcnxQSsd9aXOIgmmSpvZ/1yo46ra2ESYyqLcryaBZOghxy5qqOBjvCWP5JfkI8yl9rlxRgdLTTMCQQRcN2hdCg==",
|
||||
"version": "7.25.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz",
|
||||
"integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.24.8",
|
||||
@@ -2385,9 +2388,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.1.tgz",
|
||||
"integrity": "sha512-XzqSg714++M+FXhHfXpS1tDnNZNpgxxuGZWlRG/jSj+VEPmZ0yg6jV4E0AL3uyBKxO8mO3xtOsP5mQ+XLfrlww==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz",
|
||||
"integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -2398,9 +2401,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm64": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.1.tgz",
|
||||
"integrity": "sha512-thFUbkHteM20BGShD6P08aungq4irbIZKUNbG70LN8RkO7YztcGPiKTTGZS7Kw+x5h8hOXs0i4OaHwFxlpQN6A==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz",
|
||||
"integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2411,9 +2414,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.1.tgz",
|
||||
"integrity": "sha512-8o6eqeFZzVLia2hKPUZk4jdE3zW7LCcZr+MD18tXkgBBid3lssGVAYuox8x6YHoEPDdDa9ixTaStcmx88lio5Q==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz",
|
||||
"integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2424,9 +2427,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-x64": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.1.tgz",
|
||||
"integrity": "sha512-4T42heKsnbjkn7ovYiAdDVRRWZLU9Kmhdt6HafZxFcUdpjlBlxj4wDrt1yFWLk7G4+E+8p2C9tcmSu0KA6auGA==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz",
|
||||
"integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2437,9 +2440,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.1.tgz",
|
||||
"integrity": "sha512-MXg1xp+e5GhZ3Vit1gGEyoC+dyQUBy2JgVQ+3hUrD9wZMkUw/ywgkpK7oZgnB6kPpGrxJ41clkPPnsknuD6M2Q==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz",
|
||||
"integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -2450,9 +2453,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.1.tgz",
|
||||
"integrity": "sha512-DZNLwIY4ftPSRVkJEaxYkq7u2zel7aah57HESuNkUnz+3bZHxwkCUkrfS2IWC1sxK6F2QNIR0Qr/YXw7nkF3Pw==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz",
|
||||
"integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -2463,9 +2466,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.1.tgz",
|
||||
"integrity": "sha512-C7evongnjyxdngSDRRSQv5GvyfISizgtk9RM+z2biV5kY6S/NF/wta7K+DanmktC5DkuaJQgoKGf7KUDmA7RUw==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz",
|
||||
"integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2476,9 +2479,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.1.tgz",
|
||||
"integrity": "sha512-89tFWqxfxLLHkAthAcrTs9etAoBFRduNfWdl2xUs/yLV+7XDrJ5yuXMHptNqf1Zw0UCA3cAutkAiAokYCkaPtw==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz",
|
||||
"integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2489,9 +2492,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.1.tgz",
|
||||
"integrity": "sha512-PromGeV50sq+YfaisG8W3fd+Cl6mnOOiNv2qKKqKCpiiEke2KiKVyDqG/Mb9GWKbYMHj5a01fq/qlUR28PFhCQ==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz",
|
||||
"integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -2502,9 +2505,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.1.tgz",
|
||||
"integrity": "sha512-/1BmHYh+iz0cNCP0oHCuF8CSiNj0JOGf0jRlSo3L/FAyZyG2rGBuKpkZVH9YF+x58r1jgWxvm1aRg3DHrLDt6A==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz",
|
||||
"integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -2515,9 +2518,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.1.tgz",
|
||||
"integrity": "sha512-0cYP5rGkQWRZKy9/HtsWVStLXzCF3cCBTRI+qRL8Z+wkYlqN7zrSYm6FuY5Kd5ysS5aH0q5lVgb/WbG4jqXN1Q==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz",
|
||||
"integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -2528,9 +2531,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.1.tgz",
|
||||
"integrity": "sha512-XUXeI9eM8rMP8aGvii/aOOiMvTs7xlCosq9xCjcqI9+5hBxtjDpD+7Abm1ZhVIFE1J2h2VIg0t2DX/gjespC2Q==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz",
|
||||
"integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2541,9 +2544,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.1.tgz",
|
||||
"integrity": "sha512-V7cBw/cKXMfEVhpSvVZhC+iGifD6U1zJ4tbibjjN+Xi3blSXaj/rJynAkCFFQfoG6VZrAiP7uGVzL440Q6Me2Q==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz",
|
||||
"integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2554,9 +2557,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.1.tgz",
|
||||
"integrity": "sha512-88brja2vldW/76jWATlBqHEoGjJLRnP0WOEKAUbMcXaAZnemNhlAHSyj4jIwMoP2T750LE9lblvD4e2jXleZsA==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz",
|
||||
"integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2567,9 +2570,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.1.tgz",
|
||||
"integrity": "sha512-LdxxcqRVSXi6k6JUrTah1rHuaupoeuiv38du8Mt4r4IPer3kwlTo+RuvfE8KzZ/tL6BhaPlzJ3835i6CxrFIRQ==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz",
|
||||
"integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -2580,9 +2583,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.1.tgz",
|
||||
"integrity": "sha512-2bIrL28PcK3YCqD9anGxDxamxdiJAxA+l7fWIwM5o8UqNy1t3d1NdAweO2XhA0KTDJ5aH1FsuiT5+7VhtHliXg==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz",
|
||||
"integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2830,12 +2833,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.0.tgz",
|
||||
"integrity": "sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw==",
|
||||
"version": "22.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz",
|
||||
"integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~6.11.1"
|
||||
"undici-types": "~6.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-forge": {
|
||||
@@ -2917,62 +2920,62 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/ws": {
|
||||
"version": "8.5.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.11.tgz",
|
||||
"integrity": "sha512-4+q7P5h3SpJxaBft0Dzpbr6lmMaqh0Jr2tbhJZ/luAwvD7ohSCniYkwz/pLxuT2h0EOa6QADgJj1Ko+TzRfZ+w==",
|
||||
"version": "8.5.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz",
|
||||
"integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-core": {
|
||||
"version": "3.4.34",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.34.tgz",
|
||||
"integrity": "sha512-Z0izUf32+wAnQewjHu+pQf1yw00EGOmevl1kE+ljjjMe7oEfpQ+BI3/JNK7yMB4IrUsqLDmPecUrpj3mCP+yJQ==",
|
||||
"version": "3.4.35",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.35.tgz",
|
||||
"integrity": "sha512-gKp0zGoLnMYtw4uS/SJRRO7rsVggLjvot3mcctlMXunYNsX+aRJDqqw/lV5/gHK91nvaAAlWFgdVl020AW1Prg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.24.7",
|
||||
"@vue/shared": "3.4.34",
|
||||
"@vue/shared": "3.4.35",
|
||||
"entities": "^4.5.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map-js": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-dom": {
|
||||
"version": "3.4.34",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.34.tgz",
|
||||
"integrity": "sha512-3PUOTS1h5cskdOJMExCu2TInXuM0j60DRPpSCJDqOCupCfUZCJoyQmKtRmA8EgDNZ5kcEE7vketamRZfrEuVDw==",
|
||||
"version": "3.4.35",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.35.tgz",
|
||||
"integrity": "sha512-pWIZRL76/oE/VMhdv/ovZfmuooEni6JPG1BFe7oLk5DZRo/ImydXijoZl/4kh2406boRQ7lxTYzbZEEXEhj9NQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-core": "3.4.34",
|
||||
"@vue/shared": "3.4.34"
|
||||
"@vue/compiler-core": "3.4.35",
|
||||
"@vue/shared": "3.4.35"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc": {
|
||||
"version": "3.4.34",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.34.tgz",
|
||||
"integrity": "sha512-x6lm0UrM03jjDXTPZgD9Ad8bIVD1ifWNit2EaWQIZB5CULr46+FbLQ5RpK7AXtDHGjx9rmvC7QRCTjsiGkAwRw==",
|
||||
"version": "3.4.35",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.35.tgz",
|
||||
"integrity": "sha512-xacnRS/h/FCsjsMfxBkzjoNxyxEyKyZfBch/P4vkLRvYJwe5ChXmZZrj8Dsed/752H2Q3JE8kYu9Uyha9J6PgA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.24.7",
|
||||
"@vue/compiler-core": "3.4.34",
|
||||
"@vue/compiler-dom": "3.4.34",
|
||||
"@vue/compiler-ssr": "3.4.34",
|
||||
"@vue/shared": "3.4.34",
|
||||
"@vue/compiler-core": "3.4.35",
|
||||
"@vue/compiler-dom": "3.4.35",
|
||||
"@vue/compiler-ssr": "3.4.35",
|
||||
"@vue/shared": "3.4.35",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.10",
|
||||
"postcss": "^8.4.39",
|
||||
"postcss": "^8.4.40",
|
||||
"source-map-js": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-ssr": {
|
||||
"version": "3.4.34",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.34.tgz",
|
||||
"integrity": "sha512-8TDBcLaTrFm5rnF+Qm4BlliaopJgqJ28Nsrc80qazynm5aJO+Emu7y0RWw34L8dNnTRdcVBpWzJxhGYzsoVu4g==",
|
||||
"version": "3.4.35",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.35.tgz",
|
||||
"integrity": "sha512-7iynB+0KB1AAJKk/biENTV5cRGHRdbdaD7Mx3nWcm1W8bVD6QmnH3B4AHhQQ1qZHhqFwzEzMwiytXm3PX1e60A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.4.34",
|
||||
"@vue/shared": "3.4.34"
|
||||
"@vue/compiler-dom": "3.4.35",
|
||||
"@vue/shared": "3.4.35"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/component-compiler-utils": {
|
||||
@@ -3047,9 +3050,9 @@
|
||||
"integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA=="
|
||||
},
|
||||
"node_modules/@vue/shared": {
|
||||
"version": "3.4.34",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.34.tgz",
|
||||
"integrity": "sha512-x5LmiRLpRsd9KTjAB8MPKf0CDPMcuItjP0gbNqFCIgL1I8iYp4zglhj9w9FPCdIbHG2M91RVeIbArFfFTz9I3A==",
|
||||
"version": "3.4.35",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.35.tgz",
|
||||
"integrity": "sha512-hvuhBYYDe+b1G8KHxsQ0diDqDMA8D9laxWZhNAjE83VZb5UDaXl9Xnz7cGdDSyiHM90qqI/CyGMcpBpiDy6VVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@webassemblyjs/ast": {
|
||||
@@ -3490,9 +3493,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/autoprefixer": {
|
||||
"version": "10.4.19",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz",
|
||||
"integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==",
|
||||
"version": "10.4.20",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz",
|
||||
"integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -3509,11 +3512,11 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"browserslist": "^4.23.0",
|
||||
"caniuse-lite": "^1.0.30001599",
|
||||
"browserslist": "^4.23.3",
|
||||
"caniuse-lite": "^1.0.30001646",
|
||||
"fraction.js": "^4.3.7",
|
||||
"normalize-range": "^0.1.2",
|
||||
"picocolors": "^1.0.0",
|
||||
"picocolors": "^1.0.1",
|
||||
"postcss-value-parser": "^4.2.0"
|
||||
},
|
||||
"bin": {
|
||||
@@ -3527,9 +3530,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz",
|
||||
"integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==",
|
||||
"version": "1.7.3",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz",
|
||||
"integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
@@ -3580,13 +3583,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/babel-plugin-polyfill-corejs3": {
|
||||
"version": "0.10.4",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz",
|
||||
"integrity": "sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==",
|
||||
"version": "0.10.6",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz",
|
||||
"integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-define-polyfill-provider": "^0.6.1",
|
||||
"core-js-compat": "^3.36.1"
|
||||
"@babel/helper-define-polyfill-provider": "^0.6.2",
|
||||
"core-js-compat": "^3.38.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
|
||||
@@ -3778,9 +3781,9 @@
|
||||
"integrity": "sha512-9oBGvXilL+/1tH5uVPo8rFlUbQP05n9hdj85YFvGAwjH1NP/bRSYhHcywkBe8aFFmkQHr3oi0Creh5ooz9T4Ag=="
|
||||
},
|
||||
"node_modules/bootstrap5-tags": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap5-tags/-/bootstrap5-tags-1.7.2.tgz",
|
||||
"integrity": "sha512-i4XksM6bhZGHlXnnTlwM7HMM549/eUsTsXvptFrbn2JlCHeIi4yFdL0NHP5pRw4eg4e33Girp9iIWqd2KN8DTA=="
|
||||
"version": "1.7.4",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap5-tags/-/bootstrap5-tags-1.7.4.tgz",
|
||||
"integrity": "sha512-eQWu6/EHGf45R8EFdTCk8JQeY5oqfvQvEaYNZmFttnN56YOFpD7U+S5snEngsxZArwj57BLa9Yf0/QOggXJhcg=="
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
@@ -3888,9 +3891,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.23.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz",
|
||||
"integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==",
|
||||
"version": "4.23.3",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz",
|
||||
"integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -3907,9 +3910,9 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001640",
|
||||
"electron-to-chromium": "^1.4.820",
|
||||
"node-releases": "^2.0.14",
|
||||
"caniuse-lite": "^1.0.30001646",
|
||||
"electron-to-chromium": "^1.5.4",
|
||||
"node-releases": "^2.0.18",
|
||||
"update-browserslist-db": "^1.1.0"
|
||||
},
|
||||
"bin": {
|
||||
@@ -4008,9 +4011,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001643",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz",
|
||||
"integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==",
|
||||
"version": "1.0.30001647",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001647.tgz",
|
||||
"integrity": "sha512-n83xdNiyeNcHpzWY+1aFbqCK7LuLfBricc4+alSQL2Xb6OR3XpnQAmlDG+pQcdTfiHRuLcQ96VOfrPSGiNJYSg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -4417,12 +4420,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/core-js-compat": {
|
||||
"version": "3.37.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz",
|
||||
"integrity": "sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==",
|
||||
"version": "3.38.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.0.tgz",
|
||||
"integrity": "sha512-75LAicdLa4OJVwFxFbQR3NdnZjNgX6ILpVcVzcC4T2smerB5lELMrJQQQoWV6TiuC/vlaFqgU2tKQx9w5s0e0A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"browserslist": "^4.23.0"
|
||||
"browserslist": "^4.23.3"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -5083,9 +5086,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.2.tgz",
|
||||
"integrity": "sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ==",
|
||||
"version": "1.5.4",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz",
|
||||
"integrity": "sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
@@ -7070,12 +7073,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "0.30.10",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz",
|
||||
"integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==",
|
||||
"version": "0.30.11",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz",
|
||||
"integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.4.15"
|
||||
"@jridgewell/sourcemap-codec": "^1.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/make-dir": {
|
||||
@@ -8643,9 +8646,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.12.3",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.12.3.tgz",
|
||||
"integrity": "sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==",
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
||||
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"side-channel": "^1.0.6"
|
||||
@@ -8994,9 +8997,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.19.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.1.tgz",
|
||||
"integrity": "sha512-K5vziVlg7hTpYfFBI+91zHBEMo6jafYXpkMlqZjg7/zhIG9iHqazBf4xz9AVdjS9BruRn280ROqLI7G3OFRIlw==",
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz",
|
||||
"integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.5"
|
||||
@@ -9009,22 +9012,22 @@
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.19.1",
|
||||
"@rollup/rollup-android-arm64": "4.19.1",
|
||||
"@rollup/rollup-darwin-arm64": "4.19.1",
|
||||
"@rollup/rollup-darwin-x64": "4.19.1",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.19.1",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.19.1",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.19.1",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.19.1",
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": "4.19.1",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.19.1",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.19.1",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.19.1",
|
||||
"@rollup/rollup-linux-x64-musl": "4.19.1",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.19.1",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.19.1",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.19.1",
|
||||
"@rollup/rollup-android-arm-eabi": "4.20.0",
|
||||
"@rollup/rollup-android-arm64": "4.20.0",
|
||||
"@rollup/rollup-darwin-arm64": "4.20.0",
|
||||
"@rollup/rollup-darwin-x64": "4.20.0",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.20.0",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.20.0",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.20.0",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.20.0",
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": "4.20.0",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.20.0",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.20.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.20.0",
|
||||
"@rollup/rollup-linux-x64-musl": "4.20.0",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.20.0",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.20.0",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.20.0",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
@@ -9903,9 +9906,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.11.1",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.11.1.tgz",
|
||||
"integrity": "sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ==",
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz",
|
||||
"integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/unicode-canonical-property-names-ecmascript": {
|
||||
|
||||
@@ -132,7 +132,7 @@ export default {
|
||||
// console.log('Length of currencies is ' + this.currencies.length);
|
||||
// console.log(this.currencies);
|
||||
this.liability = true;
|
||||
// lock dropdown list on on currencyID of destination.
|
||||
// lock dropdown list on currencyID of destination.
|
||||
for (const key in this.currencies) {
|
||||
if (this.currencies.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
||||
// console.log('this.currencies[key].id = ' + this.currencies[key].id);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user