mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Auto commit for release 'develop' on 2024-10-21
This commit is contained in:
@@ -69,8 +69,8 @@ class AccountController extends Controller
|
||||
public function accounts(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
$params = $request->getParameters();
|
||||
$result = $this->repository->searchAccount($params['query'], $params['account_types'], $params['page'], $params['size']);
|
||||
$return = [];
|
||||
$result = $this->repository->searchAccount($params['query'], $params['account_types'], $params['page'], $params['size']);
|
||||
$return = [];
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($result as $account) {
|
||||
|
@@ -48,7 +48,7 @@ class AutocompleteRequest extends FormRequest
|
||||
*/
|
||||
public function getParameters(): array
|
||||
{
|
||||
$array = [
|
||||
$array = [
|
||||
'date' => $this->convertDateTime('date'),
|
||||
'query' => $this->clearString((string) $this->get('query')),
|
||||
'size' => $this->integerFromValue('size'),
|
||||
@@ -56,8 +56,8 @@ class AutocompleteRequest extends FormRequest
|
||||
'account_types' => $this->arrayFromValue($this->get('account_types')),
|
||||
'transaction_types' => $this->arrayFromValue($this->get('transaction_types')),
|
||||
];
|
||||
$array['size'] = $array['size'] < 1 || $array['size'] > 100 ? 15 : $array['size'];
|
||||
$array['page'] = max($array['page'], 1);
|
||||
$array['size'] = $array['size'] < 1 || $array['size'] > 100 ? 15 : $array['size'];
|
||||
$array['page'] = max($array['page'], 1);
|
||||
if (null === $array['account_types']) {
|
||||
$array['account_types'] = [];
|
||||
}
|
||||
@@ -68,18 +68,20 @@ class AutocompleteRequest extends FormRequest
|
||||
// remove 'initial balance' from allowed types. its internal
|
||||
$array['account_types'] = array_diff($array['account_types'], [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION, AccountType::CREDITCARD]);
|
||||
$array['account_types'] = $this->getAccountTypeParameter($array['account_types']);
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
$valid = array_keys($this->types);
|
||||
|
||||
return [
|
||||
'date' => 'nullable|date|after:1900-01-01|before:2100-01-01',
|
||||
'query' => 'nullable|string',
|
||||
'size' => 'nullable|integer|min:1|max:100',
|
||||
'page' => 'nullable|integer|min:1',
|
||||
'account_types' => sprintf('nullable|in:%s', join(',', $valid)),
|
||||
'account_types' => sprintf('nullable|in:%s', implode(',', $valid)),
|
||||
'transaction_types' => 'nullable|in:todo',
|
||||
];
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ class ChartRequest extends FormRequest
|
||||
|
||||
public function getParameters(): array
|
||||
{
|
||||
//$queryParameters = QueryParameters::cast($this->all());
|
||||
// $queryParameters = QueryParameters::cast($this->all());
|
||||
return [
|
||||
'start' => $this->convertDateTime('start')?->startOfDay(),
|
||||
'end' => $this->convertDateTime('end')?->endOfDay(),
|
||||
|
@@ -51,7 +51,7 @@ class FixUnevenAmount extends Command
|
||||
$this->convertOldStyleTransfers();
|
||||
$this->fixUnevenAmounts();
|
||||
$this->matchCurrencies();
|
||||
if(config('firefly.feature_flags.running_balance_column')) {
|
||||
if (config('firefly.feature_flags.running_balance_column')) {
|
||||
$this->friendlyInfo('Will recalculate transaction running balance columns. This may take a LONG time. Please be patient.');
|
||||
AccountBalanceCalculator::recalculateAll(true);
|
||||
$this->friendlyInfo('Done recalculating transaction running balance columns.');
|
||||
|
@@ -35,8 +35,8 @@ class CorrectAccountBalance extends Command
|
||||
use ShowsFriendlyMessages;
|
||||
|
||||
public const string CONFIG_NAME = '610_correct_balances';
|
||||
protected $description = 'Recalculate all account balance amounts';
|
||||
protected $signature = 'firefly-iii:correct-account-balance {--F|force : Force the execution of this command.}';
|
||||
protected $description = 'Recalculate all account balance amounts';
|
||||
protected $signature = 'firefly-iii:correct-account-balance {--F|force : Force the execution of this command.}';
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
@@ -45,11 +45,12 @@ class CorrectAccountBalance extends Command
|
||||
|
||||
return 0;
|
||||
}
|
||||
if(config('firefly.feature_flags.running_balance_column')) {
|
||||
if (config('firefly.feature_flags.running_balance_column')) {
|
||||
$this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.');
|
||||
$this->markAsExecuted();
|
||||
$this->correctBalanceAmounts();
|
||||
$this->friendlyInfo('Done recalculating account balances.');
|
||||
|
||||
return 0;
|
||||
}
|
||||
$this->friendlyWarning('This command has been disabled.');
|
||||
|
@@ -67,7 +67,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
$q1->where('account_meta.name', '=', 'account_number');
|
||||
$q1->where('account_meta.data', '=', $json);
|
||||
}
|
||||
);
|
||||
)
|
||||
;
|
||||
|
||||
if (0 !== count($types)) {
|
||||
$dbQuery->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
|
||||
@@ -94,7 +95,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
public function findByName(string $name, array $types): ?Account
|
||||
{
|
||||
$query = $this->userGroup->accounts();
|
||||
$query = $this->userGroup->accounts();
|
||||
|
||||
if (0 !== count($types)) {
|
||||
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
|
||||
@@ -118,8 +119,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
public function getAccountCurrency(Account $account): ?TransactionCurrency
|
||||
{
|
||||
$type = $account->accountType->type;
|
||||
$list = config('firefly.valid_currency_account_types');
|
||||
$type = $account->accountType->type;
|
||||
$list = config('firefly.valid_currency_account_types');
|
||||
|
||||
// return null if not in this list.
|
||||
if (!in_array($type, $list, true)) {
|
||||
@@ -241,17 +242,18 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
}
|
||||
}
|
||||
// reset the rest to zero.
|
||||
$all = [AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::CREDITCARD, AccountType::MORTGAGE];
|
||||
$all = [AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::CREDITCARD, AccountType::MORTGAGE];
|
||||
$this->user->accounts()->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||
->whereNotIn('account_types.type', $all)
|
||||
->update(['order' => 0]);
|
||||
->whereNotIn('account_types.type', $all)
|
||||
->update(['order' => 0])
|
||||
;
|
||||
}
|
||||
|
||||
public function getAccountsByType(array $types, ?array $sort = [], ?array $filters = []): Collection
|
||||
{
|
||||
$sortable = ['name', 'active']; // TODO yes this is a duplicate array.
|
||||
$res = array_intersect([AccountType::ASSET, AccountType::MORTGAGE, AccountType::LOAN, AccountType::DEBT], $types);
|
||||
$query = $this->userGroup->accounts();
|
||||
$sortable = ['name', 'active']; // TODO yes this is a duplicate array.
|
||||
$res = array_intersect([AccountType::ASSET, AccountType::MORTGAGE, AccountType::LOAN, AccountType::DEBT], $types);
|
||||
$query = $this->userGroup->accounts();
|
||||
if (0 !== count($types)) {
|
||||
$query->accountTypeIn($types);
|
||||
}
|
||||
@@ -300,15 +302,16 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
{
|
||||
// search by group, not by user
|
||||
$dbQuery = $this->userGroup->accounts()
|
||||
->where('active', true)
|
||||
->where('active', true)
|
||||
->orderBy('accounts.updated_at', 'ASC')
|
||||
->orderBy('accounts.order', 'ASC')
|
||||
->orderBy('accounts.account_type_id', 'ASC')
|
||||
->orderBy('accounts.name', 'ASC')
|
||||
->with(['accountType']);
|
||||
->orderBy('accounts.order', 'ASC')
|
||||
->orderBy('accounts.account_type_id', 'ASC')
|
||||
->orderBy('accounts.name', 'ASC')
|
||||
->with(['accountType'])
|
||||
;
|
||||
|
||||
// split query on spaces just in case:
|
||||
if('' !== trim($query)) {
|
||||
if ('' !== trim($query)) {
|
||||
$dbQuery->where(function (EloquentBuilder $q) use ($query): void {
|
||||
$parts = explode(' ', $query);
|
||||
foreach ($parts as $part) {
|
||||
@@ -323,7 +326,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
$dbQuery->whereIn('account_types.type', $types);
|
||||
}
|
||||
|
||||
$dbQuery->skip(($page-1) * $limit)->take($limit);
|
||||
$dbQuery->skip(($page - 1) * $limit)->take($limit);
|
||||
|
||||
return $dbQuery->get(['accounts.*']);
|
||||
|
||||
}
|
||||
@@ -352,18 +356,19 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
public function getAccountTypes(Collection $accounts): Collection
|
||||
{
|
||||
return AccountType::leftJoin('accounts', 'accounts.account_type_id', '=', 'account_types.id')
|
||||
->whereIn('accounts.id', $accounts->pluck('id')->toArray())
|
||||
->get(['accounts.id', 'account_types.type']);
|
||||
->whereIn('accounts.id', $accounts->pluck('id')->toArray())
|
||||
->get(['accounts.id', 'account_types.type'])
|
||||
;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLastActivity(Collection $accounts): array
|
||||
{
|
||||
return Transaction::whereIn('account_id', $accounts->pluck('id')->toArray())
|
||||
->leftJoin('transaction_journals', 'transaction_journals.id', 'transactions.transaction_journal_id')
|
||||
->groupBy('transactions.account_id')
|
||||
->get(['transactions.account_id', DB::raw('MAX(transaction_journals.date) as date_max')])->toArray() // @phpstan-ignore-line
|
||||
;
|
||||
->leftJoin('transaction_journals', 'transaction_journals.id', 'transactions.transaction_journal_id')
|
||||
->groupBy('transactions.account_id')
|
||||
->get(['transactions.account_id', DB::raw('MAX(transaction_journals.date) as date_max')])->toArray() // @phpstan-ignore-line
|
||||
;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
@@ -372,7 +377,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
$groupIds = [];
|
||||
$return = [];
|
||||
$set = DB::table('object_groupables')->where('object_groupable_type', Account::class)
|
||||
->whereIn('object_groupable_id', $accounts->pluck('id')->toArray())->get();
|
||||
->whereIn('object_groupable_id', $accounts->pluck('id')->toArray())->get()
|
||||
;
|
||||
|
||||
/** @var \stdClass $row */
|
||||
foreach ($set as $row) {
|
||||
|
@@ -80,7 +80,7 @@ interface AccountRepositoryInterface
|
||||
*/
|
||||
public function resetAccountOrder(): void;
|
||||
|
||||
public function searchAccount(string $query, array $types,int $page, int $limit): Collection;
|
||||
public function searchAccount(string $query, array $types, int $page, int $limit): Collection;
|
||||
|
||||
public function setUser(User $user): void;
|
||||
|
||||
|
@@ -63,7 +63,7 @@ class AccountBalanceCalculator
|
||||
public static function recalculateForJournal(TransactionJournal $transactionJournal): void
|
||||
{
|
||||
Log::debug(__METHOD__);
|
||||
$object = new self();
|
||||
$object = new self();
|
||||
|
||||
// recalculate the involved accounts:
|
||||
$accounts = new Collection();
|
||||
@@ -79,17 +79,18 @@ class AccountBalanceCalculator
|
||||
return '0';
|
||||
}
|
||||
Log::debug(sprintf('getLatestBalance: notBefore date is "%s", calculating', $notBefore->format('Y-m-d')));
|
||||
$query = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->whereNull('transactions.deleted_at')
|
||||
->where('transaction_journals.transaction_currency_id', $currencyId)
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
$query = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->whereNull('transactions.deleted_at')
|
||||
->where('transaction_journals.transaction_currency_id', $currencyId)
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
// this order is the same as GroupCollector
|
||||
->orderBy('transaction_journals.date', 'DESC')
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->orderBy('transaction_journals.description', 'DESC')
|
||||
->orderBy('transactions.amount', 'DESC')
|
||||
->where('transactions.account_id', $accountId);
|
||||
->orderBy('transaction_journals.date', 'DESC')
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->orderBy('transaction_journals.description', 'DESC')
|
||||
->orderBy('transactions.amount', 'DESC')
|
||||
->where('transactions.account_id', $accountId)
|
||||
;
|
||||
$notBefore->startOfDay();
|
||||
$query->where('transaction_journals.date', '<', $notBefore);
|
||||
|
||||
@@ -102,9 +103,9 @@ class AccountBalanceCalculator
|
||||
|
||||
private function getAccountBalanceByAccount(int $account, int $currency): AccountBalance
|
||||
{
|
||||
$query = AccountBalance::where('title', 'balance')->where('account_id', $account)->where('transaction_currency_id', $currency);
|
||||
$query = AccountBalance::where('title', 'balance')->where('account_id', $account)->where('transaction_currency_id', $currency);
|
||||
|
||||
$entry = $query->first();
|
||||
$entry = $query->first();
|
||||
if (null !== $entry) {
|
||||
// Log::debug(sprintf('Found account balance "balance" for account #%d and currency #%d: %s', $account, $currency, $entry->balance));
|
||||
|
||||
@@ -131,14 +132,15 @@ class AccountBalanceCalculator
|
||||
$balances = [];
|
||||
$count = 0;
|
||||
$query = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->whereNull('transactions.deleted_at')
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->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');
|
||||
->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());
|
||||
}
|
||||
@@ -147,7 +149,7 @@ class AccountBalanceCalculator
|
||||
$query->where('transaction_journals.date', '>=', $notBefore);
|
||||
}
|
||||
|
||||
$set = $query->get(['transactions.id', 'transactions.balance_dirty', 'transactions.transaction_currency_id', 'transaction_journals.date', 'transactions.account_id', 'transactions.amount']);
|
||||
$set = $query->get(['transactions.id', 'transactions.balance_dirty', 'transactions.transaction_currency_id', 'transaction_journals.date', 'transactions.account_id', 'transactions.amount']);
|
||||
|
||||
// the balance value is an array.
|
||||
// first entry is the balance, second is the date.
|
||||
@@ -159,8 +161,8 @@ class AccountBalanceCalculator
|
||||
$balances[$entry->account_id][$entry->transaction_currency_id] ??= [$this->getLatestBalance($entry->account_id, $entry->transaction_currency_id, $notBefore), null];
|
||||
|
||||
// before and after are easy:
|
||||
$before = $balances[$entry->account_id][$entry->transaction_currency_id][0];
|
||||
$after = bcadd($before, $entry->amount);
|
||||
$before = $balances[$entry->account_id][$entry->transaction_currency_id][0];
|
||||
$after = bcadd($before, $entry->amount);
|
||||
if (true === $entry->balance_dirty || $accounts->count() > 0) {
|
||||
// update the transaction:
|
||||
$entry->balance_before = $before;
|
||||
@@ -182,9 +184,9 @@ class AccountBalanceCalculator
|
||||
|
||||
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);
|
||||
$query = AccountBalance::where('title', $title)->where('account_id', $account)->where('transaction_journal_id', $journal)->where('transaction_currency_id', $currency);
|
||||
|
||||
$entry = $query->first();
|
||||
$entry = $query->first();
|
||||
if (null !== $entry) {
|
||||
return $entry;
|
||||
}
|
||||
@@ -199,148 +201,147 @@ class AccountBalanceCalculator
|
||||
return $entry;
|
||||
}
|
||||
|
||||
// private function recalculateLatest(?Account $account): void
|
||||
// {
|
||||
// $query = Transaction::groupBy(['transactions.account_id', 'transactions.transaction_currency_id', 'transactions.foreign_currency_id']);
|
||||
//
|
||||
// if (null !== $account) {
|
||||
// $query->where('transactions.account_id', $account->id);
|
||||
// }
|
||||
// $result = $query->get(['transactions.account_id', 'transactions.transaction_currency_id', 'transactions.foreign_currency_id', \DB::raw('SUM(transactions.amount) as sum_amount'), \DB::raw('SUM(transactions.foreign_amount) as sum_foreign_amount')]);
|
||||
//
|
||||
// // reset account balances:
|
||||
// $this->resetAccountBalancesByAccount('balance', $account);
|
||||
//
|
||||
// /** @var \stdClass $row */
|
||||
// foreach ($result as $row) {
|
||||
// $account = (int) $row->account_id;
|
||||
// $transactionCurrency = (int) $row->transaction_currency_id;
|
||||
// $foreignCurrency = (int) $row->foreign_currency_id;
|
||||
// $sumAmount = (string) $row->sum_amount;
|
||||
// $sumForeignAmount = (string) $row->sum_foreign_amount;
|
||||
// $sumAmount = '' === $sumAmount ? '0' : $sumAmount;
|
||||
// $sumForeignAmount = '' === $sumForeignAmount ? '0' : $sumForeignAmount;
|
||||
//
|
||||
// // at this point SQLite may return scientific notation because why not. Terrible.
|
||||
// $sumAmount = app('steam')->floatalize($sumAmount);
|
||||
// $sumForeignAmount = app('steam')->floatalize($sumForeignAmount);
|
||||
//
|
||||
// // first create for normal currency:
|
||||
// $entry = $this->getAccountBalanceByAccount($account, $transactionCurrency);
|
||||
//
|
||||
// try {
|
||||
// $entry->balance = bcadd((string) $entry->balance, $sumAmount);
|
||||
// } catch (\ValueError $e) {
|
||||
// $message = sprintf('[a] Could not add "%s" to "%s": %s', $entry->balance, $sumAmount, $e->getMessage());
|
||||
// Log::error($message);
|
||||
//
|
||||
// throw new FireflyException($message, 0, $e);
|
||||
// }
|
||||
// $entry->save();
|
||||
//
|
||||
// // then do foreign amount, if present:
|
||||
// if ($foreignCurrency > 0) {
|
||||
// $entry = $this->getAccountBalanceByAccount($account, $foreignCurrency);
|
||||
//
|
||||
// try {
|
||||
// $entry->balance = bcadd((string) $entry->balance, $sumForeignAmount);
|
||||
// } catch (\ValueError $e) {
|
||||
// $message = sprintf('[b] Could not add "%s" to "%s": %s', $entry->balance, $sumForeignAmount, $e->getMessage());
|
||||
// Log::error($message);
|
||||
//
|
||||
// throw new FireflyException($message, 0, $e);
|
||||
// }
|
||||
// $entry->save();
|
||||
// }
|
||||
// }
|
||||
// Log::debug(sprintf('Recalculated %d account balance(s)', $result->count()));
|
||||
// }
|
||||
// private function recalculateLatest(?Account $account): void
|
||||
// {
|
||||
// $query = Transaction::groupBy(['transactions.account_id', 'transactions.transaction_currency_id', 'transactions.foreign_currency_id']);
|
||||
//
|
||||
// if (null !== $account) {
|
||||
// $query->where('transactions.account_id', $account->id);
|
||||
// }
|
||||
// $result = $query->get(['transactions.account_id', 'transactions.transaction_currency_id', 'transactions.foreign_currency_id', \DB::raw('SUM(transactions.amount) as sum_amount'), \DB::raw('SUM(transactions.foreign_amount) as sum_foreign_amount')]);
|
||||
//
|
||||
// // reset account balances:
|
||||
// $this->resetAccountBalancesByAccount('balance', $account);
|
||||
//
|
||||
// /** @var \stdClass $row */
|
||||
// foreach ($result as $row) {
|
||||
// $account = (int) $row->account_id;
|
||||
// $transactionCurrency = (int) $row->transaction_currency_id;
|
||||
// $foreignCurrency = (int) $row->foreign_currency_id;
|
||||
// $sumAmount = (string) $row->sum_amount;
|
||||
// $sumForeignAmount = (string) $row->sum_foreign_amount;
|
||||
// $sumAmount = '' === $sumAmount ? '0' : $sumAmount;
|
||||
// $sumForeignAmount = '' === $sumForeignAmount ? '0' : $sumForeignAmount;
|
||||
//
|
||||
// // at this point SQLite may return scientific notation because why not. Terrible.
|
||||
// $sumAmount = app('steam')->floatalize($sumAmount);
|
||||
// $sumForeignAmount = app('steam')->floatalize($sumForeignAmount);
|
||||
//
|
||||
// // first create for normal currency:
|
||||
// $entry = $this->getAccountBalanceByAccount($account, $transactionCurrency);
|
||||
//
|
||||
// try {
|
||||
// $entry->balance = bcadd((string) $entry->balance, $sumAmount);
|
||||
// } catch (\ValueError $e) {
|
||||
// $message = sprintf('[a] Could not add "%s" to "%s": %s', $entry->balance, $sumAmount, $e->getMessage());
|
||||
// Log::error($message);
|
||||
//
|
||||
// throw new FireflyException($message, 0, $e);
|
||||
// }
|
||||
// $entry->save();
|
||||
//
|
||||
// // then do foreign amount, if present:
|
||||
// if ($foreignCurrency > 0) {
|
||||
// $entry = $this->getAccountBalanceByAccount($account, $foreignCurrency);
|
||||
//
|
||||
// try {
|
||||
// $entry->balance = bcadd((string) $entry->balance, $sumForeignAmount);
|
||||
// } catch (\ValueError $e) {
|
||||
// $message = sprintf('[b] Could not add "%s" to "%s": %s', $entry->balance, $sumForeignAmount, $e->getMessage());
|
||||
// Log::error($message);
|
||||
//
|
||||
// throw new FireflyException($message, 0, $e);
|
||||
// }
|
||||
// $entry->save();
|
||||
// }
|
||||
// }
|
||||
// Log::debug(sprintf('Recalculated %d account balance(s)', $result->count()));
|
||||
// }
|
||||
|
||||
// private function resetAccountBalancesByAccount(string $title, ?Account $account): void
|
||||
// {
|
||||
// if (null === $account) {
|
||||
// $count = AccountBalance::whereNotNull('updated_at')->where('title', $title)->update(['balance' => '0']);
|
||||
// Log::debug(sprintf('Set %d account balance(s) to zero.', $count));
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
// $count = AccountBalance::where('account_id', $account->id)->where('title', $title)->update(['balance' => '0']);
|
||||
// Log::debug(sprintf('Set %d account balance(s) of account #%d to zero.', $count, $account->id));
|
||||
// }
|
||||
// private function resetAccountBalancesByAccount(string $title, ?Account $account): void
|
||||
// {
|
||||
// if (null === $account) {
|
||||
// $count = AccountBalance::whereNotNull('updated_at')->where('title', $title)->update(['balance' => '0']);
|
||||
// Log::debug(sprintf('Set %d account balance(s) to zero.', $count));
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
// $count = AccountBalance::where('account_id', $account->id)->where('title', $title)->update(['balance' => '0']);
|
||||
// Log::debug(sprintf('Set %d account balance(s) of account #%d to zero.', $count, $account->id));
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * Als je alles opnieuw doet, verzamel je alle transactions en het bedrag en zet je dat neer als "balance after
|
||||
// * journal". Dat betekent, netjes op volgorde van datum en doorrekenen.
|
||||
// *
|
||||
// * Zodra je een transaction journal verplaatst (datum) moet je dat journal en alle latere journals opnieuw doen.
|
||||
// * Maar dan moet je van de account wel een beginnetje hebben, namelijk de balance tot en met dat moment.
|
||||
// *
|
||||
// * 1. Dus dan search je eerst naar die SUM, som alle transactions eerder dan (niet inclusief) de journal.
|
||||
// * 2. En vanaf daar pak je alle journals op of na de journal (dus ook de journal zelf) en begin je door te tellen.
|
||||
// * 3. Elke voorbij gaande journal entry "balance_after_journal" geef je een update of voeg je toe.
|
||||
// */
|
||||
// private function recalculateJournals(?Account $account, ?TransactionJournal $transactionJournal): void
|
||||
// {
|
||||
// $query = Transaction::groupBy(['transactions.account_id', 'transaction_journals.id', 'transactions.transaction_currency_id', 'transactions.foreign_currency_id']);
|
||||
// $query->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id');
|
||||
// $query->orderBy('transaction_journals.date', 'asc');
|
||||
// $amounts = [];
|
||||
// if (null !== $account) {
|
||||
// $query->where('transactions.account_id', $account->id);
|
||||
// }
|
||||
// if (null !== $account && null !== $transactionJournal) {
|
||||
// $query->where('transaction_journals.date', '>=', $transactionJournal->date);
|
||||
// $amounts = $this->getStartAmounts($account, $transactionJournal);
|
||||
// }
|
||||
// $result = $query->get(['transactions.account_id', 'transaction_journals.id', 'transactions.transaction_currency_id', 'transactions.foreign_currency_id', \DB::raw('SUM(transactions.amount) as sum_amount'), \DB::raw('SUM(transactions.foreign_amount) as sum_foreign_amount')]);
|
||||
//
|
||||
// /** @var \stdClass $row */
|
||||
// foreach ($result as $row) {
|
||||
// $account = (int) $row->account_id;
|
||||
// $transactionCurrency = (int) $row->transaction_currency_id;
|
||||
// $foreignCurrency = (int) $row->foreign_currency_id;
|
||||
// $sumAmount = (string) $row->sum_amount;
|
||||
// $sumForeignAmount = (string) $row->sum_foreign_amount;
|
||||
// $journalId = (int) $row->id;
|
||||
//
|
||||
// // check for empty strings
|
||||
// $sumAmount = '' === $sumAmount ? '0' : $sumAmount;
|
||||
// $sumForeignAmount = '' === $sumForeignAmount ? '0' : $sumForeignAmount;
|
||||
//
|
||||
// // new amounts:
|
||||
// $amounts[$account][$transactionCurrency] = bcadd($amounts[$account][$transactionCurrency] ?? '0', $sumAmount);
|
||||
// $amounts[$account][$foreignCurrency] = bcadd($amounts[$account][$foreignCurrency] ?? '0', $sumForeignAmount);
|
||||
//
|
||||
// // first create for normal currency:
|
||||
// $entry = self::getAccountBalanceByJournal('balance_after_journal', $account, $journalId, $transactionCurrency);
|
||||
// $entry->balance = $amounts[$account][$transactionCurrency];
|
||||
// $entry->save();
|
||||
//
|
||||
// // then do foreign amount, if present:
|
||||
// if ($foreignCurrency > 0) {
|
||||
// $entry = self::getAccountBalanceByJournal('balance_after_journal', $account, $journalId, $foreignCurrency);
|
||||
// $entry->balance = $amounts[$account][$foreignCurrency];
|
||||
// $entry->save();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // select transactions.account_id, transaction_journals.id, transactions.transaction_currency_id, transactions.foreign_currency_id, sum(transactions.amount), sum(transactions.foreign_amount)
|
||||
// //
|
||||
// // from transactions
|
||||
// //
|
||||
// // left join transaction_journals ON transaction_journals.id = transactions.transaction_journal_id
|
||||
// //
|
||||
// // group by account_id, transaction_journals.id, transaction_currency_id, foreign_currency_id
|
||||
// // order by transaction_journals.date desc
|
||||
// }
|
||||
|
||||
// private function getStartAmounts(Account $account, TransactionJournal $journal): array
|
||||
// {
|
||||
// exit('here we are 1');
|
||||
//
|
||||
// return [];
|
||||
// }
|
||||
// /**
|
||||
// * Als je alles opnieuw doet, verzamel je alle transactions en het bedrag en zet je dat neer als "balance after
|
||||
// * journal". Dat betekent, netjes op volgorde van datum en doorrekenen.
|
||||
// *
|
||||
// * Zodra je een transaction journal verplaatst (datum) moet je dat journal en alle latere journals opnieuw doen.
|
||||
// * Maar dan moet je van de account wel een beginnetje hebben, namelijk de balance tot en met dat moment.
|
||||
// *
|
||||
// * 1. Dus dan search je eerst naar die SUM, som alle transactions eerder dan (niet inclusief) de journal.
|
||||
// * 2. En vanaf daar pak je alle journals op of na de journal (dus ook de journal zelf) en begin je door te tellen.
|
||||
// * 3. Elke voorbij gaande journal entry "balance_after_journal" geef je een update of voeg je toe.
|
||||
// */
|
||||
// private function recalculateJournals(?Account $account, ?TransactionJournal $transactionJournal): void
|
||||
// {
|
||||
// $query = Transaction::groupBy(['transactions.account_id', 'transaction_journals.id', 'transactions.transaction_currency_id', 'transactions.foreign_currency_id']);
|
||||
// $query->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id');
|
||||
// $query->orderBy('transaction_journals.date', 'asc');
|
||||
// $amounts = [];
|
||||
// if (null !== $account) {
|
||||
// $query->where('transactions.account_id', $account->id);
|
||||
// }
|
||||
// if (null !== $account && null !== $transactionJournal) {
|
||||
// $query->where('transaction_journals.date', '>=', $transactionJournal->date);
|
||||
// $amounts = $this->getStartAmounts($account, $transactionJournal);
|
||||
// }
|
||||
// $result = $query->get(['transactions.account_id', 'transaction_journals.id', 'transactions.transaction_currency_id', 'transactions.foreign_currency_id', \DB::raw('SUM(transactions.amount) as sum_amount'), \DB::raw('SUM(transactions.foreign_amount) as sum_foreign_amount')]);
|
||||
//
|
||||
// /** @var \stdClass $row */
|
||||
// foreach ($result as $row) {
|
||||
// $account = (int) $row->account_id;
|
||||
// $transactionCurrency = (int) $row->transaction_currency_id;
|
||||
// $foreignCurrency = (int) $row->foreign_currency_id;
|
||||
// $sumAmount = (string) $row->sum_amount;
|
||||
// $sumForeignAmount = (string) $row->sum_foreign_amount;
|
||||
// $journalId = (int) $row->id;
|
||||
//
|
||||
// // check for empty strings
|
||||
// $sumAmount = '' === $sumAmount ? '0' : $sumAmount;
|
||||
// $sumForeignAmount = '' === $sumForeignAmount ? '0' : $sumForeignAmount;
|
||||
//
|
||||
// // new amounts:
|
||||
// $amounts[$account][$transactionCurrency] = bcadd($amounts[$account][$transactionCurrency] ?? '0', $sumAmount);
|
||||
// $amounts[$account][$foreignCurrency] = bcadd($amounts[$account][$foreignCurrency] ?? '0', $sumForeignAmount);
|
||||
//
|
||||
// // first create for normal currency:
|
||||
// $entry = self::getAccountBalanceByJournal('balance_after_journal', $account, $journalId, $transactionCurrency);
|
||||
// $entry->balance = $amounts[$account][$transactionCurrency];
|
||||
// $entry->save();
|
||||
//
|
||||
// // then do foreign amount, if present:
|
||||
// if ($foreignCurrency > 0) {
|
||||
// $entry = self::getAccountBalanceByJournal('balance_after_journal', $account, $journalId, $foreignCurrency);
|
||||
// $entry->balance = $amounts[$account][$foreignCurrency];
|
||||
// $entry->save();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // select transactions.account_id, transaction_journals.id, transactions.transaction_currency_id, transactions.foreign_currency_id, sum(transactions.amount), sum(transactions.foreign_amount)
|
||||
// //
|
||||
// // from transactions
|
||||
// //
|
||||
// // left join transaction_journals ON transaction_journals.id = transactions.transaction_journal_id
|
||||
// //
|
||||
// // group by account_id, transaction_journals.id, transaction_currency_id, foreign_currency_id
|
||||
// // order by transaction_journals.date desc
|
||||
// }
|
||||
|
||||
// private function getStartAmounts(Account $account, TransactionJournal $journal): array
|
||||
// {
|
||||
// exit('here we are 1');
|
||||
//
|
||||
// return [];
|
||||
// }
|
||||
|
||||
private function storeAccountBalances(array $balances): void
|
||||
{
|
||||
@@ -353,6 +354,7 @@ class AccountBalanceCalculator
|
||||
$account = Account::find($accountId);
|
||||
if (null === $account) {
|
||||
Log::error(sprintf('Could not find account #%d, will not save account balance.', $accountId));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -362,11 +364,13 @@ class AccountBalanceCalculator
|
||||
*/
|
||||
foreach ($currencies as $currencyId => $balance) {
|
||||
/** @var TransactionCurrency $currency */
|
||||
$currency = TransactionCurrency::find($currencyId);
|
||||
$currency = TransactionCurrency::find($currencyId);
|
||||
if (null === $currency) {
|
||||
Log::error(sprintf('Could not find currency #%d, will not save account balance.', $currencyId));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
/** @var AccountBalance $object */
|
||||
$object = $account->accountBalances()->firstOrCreate(['title' => 'running_balance', 'balance' => '0', 'transaction_currency_id' => $currencyId, 'date' => $balance[1]]);
|
||||
$object->balance = $balance[0];
|
||||
|
248
composer.lock
generated
248
composer.lock
generated
@@ -1496,16 +1496,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8"
|
||||
"reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
|
||||
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
|
||||
"reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1559,7 +1559,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/2.0.3"
|
||||
"source": "https://github.com/guzzle/promises/tree/2.0.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1575,7 +1575,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-18T10:29:17+00:00"
|
||||
"time": "2024-10-17T10:06:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
@@ -2547,16 +2547,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v11.27.2",
|
||||
"version": "v11.28.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "a51d1f2b771c542324a3d9b76a98b1bbc75c0ee9"
|
||||
"reference": "3ef5c8a85b4c598d5ffaf98afd72f6a5d6a0be2c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/a51d1f2b771c542324a3d9b76a98b1bbc75c0ee9",
|
||||
"reference": "a51d1f2b771c542324a3d9b76a98b1bbc75c0ee9",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/3ef5c8a85b4c598d5ffaf98afd72f6a5d6a0be2c",
|
||||
"reference": "3ef5c8a85b4c598d5ffaf98afd72f6a5d6a0be2c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2752,7 +2752,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2024-10-09T04:17:35+00:00"
|
||||
"time": "2024-10-16T16:32:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/passport",
|
||||
@@ -2832,16 +2832,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/prompts",
|
||||
"version": "v0.3.0",
|
||||
"version": "v0.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/prompts.git",
|
||||
"reference": "ea57a2261093986721d4a5f4f9524d76f21f9fa0"
|
||||
"reference": "0f3848a445562dac376b27968f753c65e7e1036e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/ea57a2261093986721d4a5f4f9524d76f21f9fa0",
|
||||
"reference": "ea57a2261093986721d4a5f4f9524d76f21f9fa0",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/0f3848a445562dac376b27968f753c65e7e1036e",
|
||||
"reference": "0f3848a445562dac376b27968f753c65e7e1036e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2885,9 +2885,9 @@
|
||||
"description": "Add beautiful and user-friendly forms to your command-line applications.",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/prompts/issues",
|
||||
"source": "https://github.com/laravel/prompts/tree/v0.3.0"
|
||||
"source": "https://github.com/laravel/prompts/tree/v0.3.1"
|
||||
},
|
||||
"time": "2024-09-30T14:27:51+00:00"
|
||||
"time": "2024-10-09T19:42:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sanctum",
|
||||
@@ -3469,16 +3469,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/csv",
|
||||
"version": "9.17.0",
|
||||
"version": "9.18.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/csv.git",
|
||||
"reference": "8cab815fb11ec93aa2f7b8a57b3daa1f1a364011"
|
||||
"reference": "b02d010e4055ae992247f6ffd1e7b103ef2a0790"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/csv/zipball/8cab815fb11ec93aa2f7b8a57b3daa1f1a364011",
|
||||
"reference": "8cab815fb11ec93aa2f7b8a57b3daa1f1a364011",
|
||||
"url": "https://api.github.com/repos/thephpleague/csv/zipball/b02d010e4055ae992247f6ffd1e7b103ef2a0790",
|
||||
"reference": "b02d010e4055ae992247f6ffd1e7b103ef2a0790",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3490,11 +3490,11 @@
|
||||
"ext-xdebug": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3.64.0",
|
||||
"phpbench/phpbench": "^1.3.1",
|
||||
"phpstan/phpstan": "^1.12.5",
|
||||
"phpstan/phpstan": "^1.12.6",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.2.1",
|
||||
"phpstan/phpstan-phpunit": "^1.4.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.6.1",
|
||||
"phpunit/phpunit": "^10.5.16 || ^11.4.0",
|
||||
"phpunit/phpunit": "^10.5.16 || ^11.4.1",
|
||||
"symfony/var-dumper": "^6.4.8 || ^7.1.5"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -3552,7 +3552,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-10-10T10:30:28+00:00"
|
||||
"time": "2024-10-18T08:14:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/event",
|
||||
@@ -4621,23 +4621,23 @@
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/collision",
|
||||
"version": "v8.4.0",
|
||||
"version": "v8.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nunomaduro/collision.git",
|
||||
"reference": "e7d1aa8ed753f63fa816932bbc89678238843b4a"
|
||||
"reference": "f5c101b929c958e849a633283adff296ed5f38f5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/e7d1aa8ed753f63fa816932bbc89678238843b4a",
|
||||
"reference": "e7d1aa8ed753f63fa816932bbc89678238843b4a",
|
||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/f5c101b929c958e849a633283adff296ed5f38f5",
|
||||
"reference": "f5c101b929c958e849a633283adff296ed5f38f5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"filp/whoops": "^2.15.4",
|
||||
"nunomaduro/termwind": "^2.0.1",
|
||||
"filp/whoops": "^2.16.0",
|
||||
"nunomaduro/termwind": "^2.1.0",
|
||||
"php": "^8.2.0",
|
||||
"symfony/console": "^7.1.3"
|
||||
"symfony/console": "^7.1.5"
|
||||
},
|
||||
"conflict": {
|
||||
"laravel/framework": "<11.0.0 || >=12.0.0",
|
||||
@@ -4645,14 +4645,14 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"larastan/larastan": "^2.9.8",
|
||||
"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.3",
|
||||
"pestphp/pest": "^2.35.0 || ^3.0.0",
|
||||
"sebastian/environment": "^6.1.0 || ^7.0.0"
|
||||
"laravel/framework": "^11.28.0",
|
||||
"laravel/pint": "^1.18.1",
|
||||
"laravel/sail": "^1.36.0",
|
||||
"laravel/sanctum": "^4.0.3",
|
||||
"laravel/tinker": "^2.10.0",
|
||||
"orchestra/testbench-core": "^9.5.3",
|
||||
"pestphp/pest": "^2.36.0 || ^3.4.0",
|
||||
"sebastian/environment": "^6.1.0 || ^7.2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -4714,36 +4714,35 @@
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2024-08-03T15:32:23+00:00"
|
||||
"time": "2024-10-15T16:06:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/termwind",
|
||||
"version": "v2.1.0",
|
||||
"version": "v2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nunomaduro/termwind.git",
|
||||
"reference": "e5f21eade88689536c0cdad4c3cd75f3ed26e01a"
|
||||
"reference": "42c84e4e8090766bbd6445d06cd6e57650626ea3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/e5f21eade88689536c0cdad4c3cd75f3ed26e01a",
|
||||
"reference": "e5f21eade88689536c0cdad4c3cd75f3ed26e01a",
|
||||
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/42c84e4e8090766bbd6445d06cd6e57650626ea3",
|
||||
"reference": "42c84e4e8090766bbd6445d06cd6e57650626ea3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": "^8.2",
|
||||
"symfony/console": "^7.0.4"
|
||||
"symfony/console": "^7.1.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"ergebnis/phpstan-rules": "^2.2.0",
|
||||
"illuminate/console": "^11.1.1",
|
||||
"laravel/pint": "^1.15.0",
|
||||
"mockery/mockery": "^1.6.11",
|
||||
"pestphp/pest": "^2.34.6",
|
||||
"phpstan/phpstan": "^1.10.66",
|
||||
"phpstan/phpstan-strict-rules": "^1.5.2",
|
||||
"symfony/var-dumper": "^7.0.4",
|
||||
"illuminate/console": "^11.28.0",
|
||||
"laravel/pint": "^1.18.1",
|
||||
"mockery/mockery": "^1.6.12",
|
||||
"pestphp/pest": "^2.36.0",
|
||||
"phpstan/phpstan": "^1.12.6",
|
||||
"phpstan/phpstan-strict-rules": "^1.6.1",
|
||||
"symfony/var-dumper": "^7.1.5",
|
||||
"thecodingmachine/phpstan-strict-rules": "^1.0.0"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -4786,7 +4785,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nunomaduro/termwind/issues",
|
||||
"source": "https://github.com/nunomaduro/termwind/tree/v2.1.0"
|
||||
"source": "https://github.com/nunomaduro/termwind/tree/v2.2.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4802,7 +4801,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-09-05T15:25:50+00:00"
|
||||
"time": "2024-10-15T16:15:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nyholm/psr7",
|
||||
@@ -6863,16 +6862,16 @@
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-html",
|
||||
"version": "3.11.0",
|
||||
"version": "3.11.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/laravel-html.git",
|
||||
"reference": "94f5900cedc75454800877ace9780e27d6149287"
|
||||
"reference": "167e5b8243103072155b562e5cc396c90a3c1055"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-html/zipball/94f5900cedc75454800877ace9780e27d6149287",
|
||||
"reference": "94f5900cedc75454800877ace9780e27d6149287",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-html/zipball/167e5b8243103072155b562e5cc396c90a3c1055",
|
||||
"reference": "167e5b8243103072155b562e5cc396c90a3c1055",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6929,7 +6928,7 @@
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/spatie/laravel-html/tree/3.11.0"
|
||||
"source": "https://github.com/spatie/laravel-html/tree/3.11.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6937,7 +6936,7 @@
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-16T07:58:45+00:00"
|
||||
"time": "2024-10-18T14:37:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-ignition",
|
||||
@@ -10442,16 +10441,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v3.14.3",
|
||||
"version": "v3.14.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
||||
"reference": "c0bee7c08ae2429e4a9ed2bc75679b012db6e3bd"
|
||||
"reference": "14e4517bd49130d6119228107eb21ae47ae120ab"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/c0bee7c08ae2429e4a9ed2bc75679b012db6e3bd",
|
||||
"reference": "c0bee7c08ae2429e4a9ed2bc75679b012db6e3bd",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/14e4517bd49130d6119228107eb21ae47ae120ab",
|
||||
"reference": "14e4517bd49130d6119228107eb21ae47ae120ab",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10510,7 +10509,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/barryvdh/laravel-debugbar/issues",
|
||||
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.14.3"
|
||||
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.14.6"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -10522,41 +10521,41 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-10-02T09:17:49+00:00"
|
||||
"time": "2024-10-18T13:15:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/laravel-ide-helper",
|
||||
"version": "v3.1.0",
|
||||
"version": "v3.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
|
||||
"reference": "591e7d665fbab8a3b682e451641706341573eb80"
|
||||
"reference": "7956ccb4943f8532d008c17a1094b34bb6394d56"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/591e7d665fbab8a3b682e451641706341573eb80",
|
||||
"reference": "591e7d665fbab8a3b682e451641706341573eb80",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/7956ccb4943f8532d008c17a1094b34bb6394d56",
|
||||
"reference": "7956ccb4943f8532d008c17a1094b34bb6394d56",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"barryvdh/reflection-docblock": "^2.1.1",
|
||||
"barryvdh/reflection-docblock": "^2.1.2",
|
||||
"composer/class-map-generator": "^1.0",
|
||||
"ext-json": "*",
|
||||
"illuminate/console": "^10 || ^11",
|
||||
"illuminate/database": "^10.38 || ^11",
|
||||
"illuminate/filesystem": "^10 || ^11",
|
||||
"illuminate/support": "^10 || ^11",
|
||||
"illuminate/console": "^11.15",
|
||||
"illuminate/database": "^11.15",
|
||||
"illuminate/filesystem": "^11.15",
|
||||
"illuminate/support": "^11.15",
|
||||
"nikic/php-parser": "^4.18 || ^5",
|
||||
"php": "^8.1",
|
||||
"php": "^8.2",
|
||||
"phpdocumentor/type-resolver": "^1.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-pdo_sqlite": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3",
|
||||
"illuminate/config": "^9 || ^10 || ^11",
|
||||
"illuminate/view": "^9 || ^10 || ^11",
|
||||
"illuminate/config": "^11.15",
|
||||
"illuminate/view": "^11.15",
|
||||
"mockery/mockery": "^1.4",
|
||||
"orchestra/testbench": "^8 || ^9",
|
||||
"orchestra/testbench": "^9.2",
|
||||
"phpunit/phpunit": "^10.5",
|
||||
"spatie/phpunit-snapshot-assertions": "^4 || ^5",
|
||||
"vimeo/psalm": "^5.4"
|
||||
@@ -10567,7 +10566,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1-dev"
|
||||
"dev-master": "3.2-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
@@ -10604,7 +10603,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/barryvdh/laravel-ide-helper/issues",
|
||||
"source": "https://github.com/barryvdh/laravel-ide-helper/tree/v3.1.0"
|
||||
"source": "https://github.com/barryvdh/laravel-ide-helper/tree/v3.2.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -10616,20 +10615,20 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-12T14:20:51+00:00"
|
||||
"time": "2024-10-17T16:43:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/reflection-docblock",
|
||||
"version": "v2.1.1",
|
||||
"version": "v2.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/ReflectionDocBlock.git",
|
||||
"reference": "e6811e927f0ecc37cc4deaa6627033150343e597"
|
||||
"reference": "bba116ba9d5794fbf12e03ed40f10804e51acf76"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/e6811e927f0ecc37cc4deaa6627033150343e597",
|
||||
"reference": "e6811e927f0ecc37cc4deaa6627033150343e597",
|
||||
"url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/bba116ba9d5794fbf12e03ed40f10804e51acf76",
|
||||
"reference": "bba116ba9d5794fbf12e03ed40f10804e51acf76",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10666,9 +10665,9 @@
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.1.1"
|
||||
"source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.1.2"
|
||||
},
|
||||
"time": "2023-06-14T05:06:27+00:00"
|
||||
"time": "2024-10-16T11:06:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "cloudcreativity/json-api-testing",
|
||||
@@ -11115,36 +11114,37 @@
|
||||
},
|
||||
{
|
||||
"name": "larastan/larastan",
|
||||
"version": "v2.9.8",
|
||||
"version": "v2.9.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/larastan/larastan.git",
|
||||
"reference": "340badd89b0eb5bddbc503a4829c08cf9a2819d7"
|
||||
"reference": "148faa138f0d8acb7d85f4a55693d3e13b6048d2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/larastan/larastan/zipball/340badd89b0eb5bddbc503a4829c08cf9a2819d7",
|
||||
"reference": "340badd89b0eb5bddbc503a4829c08cf9a2819d7",
|
||||
"url": "https://api.github.com/repos/larastan/larastan/zipball/148faa138f0d8acb7d85f4a55693d3e13b6048d2",
|
||||
"reference": "148faa138f0d8acb7d85f4a55693d3e13b6048d2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"illuminate/console": "^9.52.16 || ^10.28.0 || ^11.0",
|
||||
"illuminate/container": "^9.52.16 || ^10.28.0 || ^11.0",
|
||||
"illuminate/contracts": "^9.52.16 || ^10.28.0 || ^11.0",
|
||||
"illuminate/database": "^9.52.16 || ^10.28.0 || ^11.0",
|
||||
"illuminate/http": "^9.52.16 || ^10.28.0 || ^11.0",
|
||||
"illuminate/pipeline": "^9.52.16 || ^10.28.0 || ^11.0",
|
||||
"illuminate/support": "^9.52.16 || ^10.28.0 || ^11.0",
|
||||
"illuminate/console": "^9.52.16 || ^10.28.0 || ^11.16",
|
||||
"illuminate/container": "^9.52.16 || ^10.28.0 || ^11.16",
|
||||
"illuminate/contracts": "^9.52.16 || ^10.28.0 || ^11.16",
|
||||
"illuminate/database": "^9.52.16 || ^10.28.0 || ^11.16",
|
||||
"illuminate/http": "^9.52.16 || ^10.28.0 || ^11.16",
|
||||
"illuminate/pipeline": "^9.52.16 || ^10.28.0 || ^11.16",
|
||||
"illuminate/support": "^9.52.16 || ^10.28.0 || ^11.16",
|
||||
"php": "^8.0.2",
|
||||
"phpmyadmin/sql-parser": "^5.9.0",
|
||||
"phpstan/phpstan": "^1.11.2"
|
||||
"phpstan/phpstan": "^1.12.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^12.0",
|
||||
"nikic/php-parser": "^4.19.1",
|
||||
"orchestra/canvas": "^7.11.1 || ^8.11.0 || ^9.0.2",
|
||||
"orchestra/testbench": "^7.33.0 || ^8.13.0 || ^9.0.3",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.2",
|
||||
"phpunit/phpunit": "^9.6.13 || ^10.5.16"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -11193,7 +11193,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/larastan/larastan/issues",
|
||||
"source": "https://github.com/larastan/larastan/tree/v2.9.8"
|
||||
"source": "https://github.com/larastan/larastan/tree/v2.9.9"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -11213,7 +11213,7 @@
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-06T17:46:02+00:00"
|
||||
"time": "2024-10-15T19:41:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel-json-api/testing",
|
||||
@@ -11962,16 +11962,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.12.6",
|
||||
"version": "1.12.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae"
|
||||
"reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc4d2f145a88ea7141ae698effd64d9df46527ae",
|
||||
"reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
|
||||
"reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -12016,7 +12016,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-10-06T15:03:59+00:00"
|
||||
"time": "2024-10-18T11:12:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-deprecation-rules",
|
||||
@@ -12437,16 +12437,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "10.5.36",
|
||||
"version": "10.5.37",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870"
|
||||
"reference": "c7cffa0efa2b70c22366523e6d804c9419eb2400"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870",
|
||||
"reference": "aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c7cffa0efa2b70c22366523e6d804c9419eb2400",
|
||||
"reference": "c7cffa0efa2b70c22366523e6d804c9419eb2400",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -12467,7 +12467,7 @@
|
||||
"phpunit/php-timer": "^6.0.0",
|
||||
"sebastian/cli-parser": "^2.0.1",
|
||||
"sebastian/code-unit": "^2.0.0",
|
||||
"sebastian/comparator": "^5.0.2",
|
||||
"sebastian/comparator": "^5.0.3",
|
||||
"sebastian/diff": "^5.1.1",
|
||||
"sebastian/environment": "^6.1.0",
|
||||
"sebastian/exporter": "^5.1.2",
|
||||
@@ -12518,7 +12518,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.36"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.37"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -12534,7 +12534,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-10-08T15:36:51+00:00"
|
||||
"time": "2024-10-19T13:03:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
@@ -12706,16 +12706,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
"version": "5.0.2",
|
||||
"version": "5.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53"
|
||||
"reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
|
||||
"reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
|
||||
"reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -12726,7 +12726,7 @@
|
||||
"sebastian/exporter": "^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^10.4"
|
||||
"phpunit/phpunit": "^10.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -12771,7 +12771,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
||||
"security": "https://github.com/sebastianbergmann/comparator/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2"
|
||||
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -12779,7 +12779,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-08-12T06:03:08+00:00"
|
||||
"time": "2024-10-18T14:56:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/complexity",
|
||||
@@ -13560,7 +13560,7 @@
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"stability-flags": {},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
@@ -13581,6 +13581,6 @@
|
||||
"ext-xml": "*",
|
||||
"ext-xmlwriter": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@ return [
|
||||
'running_balance_column' => env('USE_RUNNING_BALANCE', false),
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2024-10-14',
|
||||
'version' => 'develop/2024-10-21',
|
||||
'api_version' => '2.1.0',
|
||||
'db_version' => 24,
|
||||
|
||||
|
84
package-lock.json
generated
84
package-lock.json
generated
@@ -2903,9 +2903,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz",
|
||||
"integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==",
|
||||
"version": "22.7.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.7.tgz",
|
||||
"integrity": "sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~6.19.2"
|
||||
@@ -3339,9 +3339,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.12.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
|
||||
"integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
|
||||
"version": "8.13.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz",
|
||||
"integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
@@ -3434,9 +3434,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/alpinejs": {
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.14.1.tgz",
|
||||
"integrity": "sha512-ICar8UsnRZAYvv/fCNfNeKMXNoXGUfwHrjx7LqXd08zIP95G2d9bAOuaL97re+1mgt/HojqHsfdOLo/A5LuWgQ==",
|
||||
"version": "3.14.3",
|
||||
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.14.3.tgz",
|
||||
"integrity": "sha512-cL8JBEDAm4UeVjTN5QnFl8QgMGUwxFn1GvQvu3RtfAHUrAPRahGihrsWpKnEK9L0QMqsAPk/R8MylMWKHaK33A==",
|
||||
"dependencies": {
|
||||
"@vue/reactivity": "~3.1.1"
|
||||
}
|
||||
@@ -3831,9 +3831,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/bootstrap5-autocomplete": {
|
||||
"version": "1.1.32",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap5-autocomplete/-/bootstrap5-autocomplete-1.1.32.tgz",
|
||||
"integrity": "sha512-exGztnVGGQ+NfftmH6tuZqtLfwLQfc/u53xIFGd4J21OIlC0jnky+Gx7f0RnN7sznMoC9hu88PPDBHrrt1XTGg=="
|
||||
"version": "1.1.33",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap5-autocomplete/-/bootstrap5-autocomplete-1.1.33.tgz",
|
||||
"integrity": "sha512-VgHSx2hCNEBThFzb57HziDA2BNuc0wT5+V9XqIbXsV6oKYXcyRE2ytFIJcHjTCEIYqTsNCFiCQILIXc3YANGPQ=="
|
||||
},
|
||||
"node_modules/bootstrap5-tags": {
|
||||
"version": "1.7.5",
|
||||
@@ -4070,9 +4070,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001668",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz",
|
||||
"integrity": "sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==",
|
||||
"version": "1.0.30001669",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz",
|
||||
"integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -4115,9 +4115,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/chart.js": {
|
||||
"version": "4.4.4",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.4.tgz",
|
||||
"integrity": "sha512-emICKGBABnxhMjUjlYRR12PmOXhJ2eJjEHL2/dZlWjxRAZT1D8xplLFq5M0tMQK8ja+wBS/tuVEJB5C6r7VxJA==",
|
||||
"version": "4.4.5",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.5.tgz",
|
||||
"integrity": "sha512-CVVjg1RYTJV9OCC8WeJPMx8gsV8K6WIyIEQUE3ui4AR9Hfgls9URri6Ja3hyMVBbTF8Q2KFa19PE815gWcWhng==",
|
||||
"dependencies": {
|
||||
"@kurkle/color": "^0.3.0"
|
||||
},
|
||||
@@ -5157,9 +5157,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.36",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.36.tgz",
|
||||
"integrity": "sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==",
|
||||
"version": "1.5.41",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.41.tgz",
|
||||
"integrity": "sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
@@ -5543,9 +5543,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-uri": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.2.tgz",
|
||||
"integrity": "sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz",
|
||||
"integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fastest-levenshtein": {
|
||||
@@ -6329,9 +6329,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/i18next": {
|
||||
"version": "23.16.0",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.0.tgz",
|
||||
"integrity": "sha512-Ni3CG6c14teOogY19YNRl+kYaE/Rb59khy0VyHVn4uOZ97E2E/Yziyi6r3C3s9+wacjdLZiq/LLYyx+Cgd+FCw==",
|
||||
"version": "23.16.2",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.2.tgz",
|
||||
"integrity": "sha512-dFyxwLXxEQK32f6tITBMaRht25mZPJhQ0WbC0p3bO2mWBal9lABTMqSka5k+GLSRWLzeJBKDpH7BeIA9TZI7Jg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@@ -8010,9 +8010,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
|
||||
"integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
@@ -9142,9 +9142,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.79.5",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.79.5.tgz",
|
||||
"integrity": "sha512-W1h5kp6bdhqFh2tk3DsI771MoEJjvrSY/2ihJRJS4pjIyfJCw0nTsxqhnrUzaLMOJjFchj8rOvraI/YUVjtx5g==",
|
||||
"version": "1.80.3",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.80.3.tgz",
|
||||
"integrity": "sha512-ptDWyVmDMVielpz/oWy3YP3nfs7LpJTHIJZboMVs8GEC9eUmtZTZhMHlTW98wY4aEorDfjN38+Wr/XjskFWcfA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@parcel/watcher": "^2.4.1",
|
||||
@@ -9815,9 +9815,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.34.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz",
|
||||
"integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==",
|
||||
"version": "5.36.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz",
|
||||
"integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
@@ -9962,9 +9962,9 @@
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
|
||||
"integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA=="
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz",
|
||||
"integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA=="
|
||||
},
|
||||
"node_modules/tty-browserify": {
|
||||
"version": "0.0.0",
|
||||
@@ -10180,9 +10180,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.4.8",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz",
|
||||
"integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==",
|
||||
"version": "5.4.9",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz",
|
||||
"integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.21.3",
|
||||
|
@@ -47,9 +47,9 @@ Route::group(
|
||||
],
|
||||
static function (): void {
|
||||
Route::get('accounts', ['uses' => 'AccountController@accounts', 'as' => 'accounts']);
|
||||
//Route::get('categories', ['uses' => 'CategoryController@categories', 'as' => 'categories']);
|
||||
//Route::get('tags', ['uses' => 'TagController@tags', 'as' => 'tags']);
|
||||
//Route::get('transaction-descriptions', ['uses' => 'TransactionController@transactionDescriptions', 'as' => 'transaction-descriptions']);
|
||||
// Route::get('categories', ['uses' => 'CategoryController@categories', 'as' => 'categories']);
|
||||
// Route::get('tags', ['uses' => 'TagController@tags', 'as' => 'tags']);
|
||||
// Route::get('transaction-descriptions', ['uses' => 'TransactionController@transactionDescriptions', 'as' => 'transaction-descriptions']);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -61,9 +61,9 @@ Route::group(
|
||||
'as' => 'api.v2.chart.',
|
||||
],
|
||||
static function (): void {
|
||||
//Route::get('account/dashboard', ['uses' => 'AccountController@dashboard', 'as' => 'account.dashboard']);
|
||||
//Route::get('budget/dashboard', ['uses' => 'BudgetController@dashboard', 'as' => 'budget.dashboard']);
|
||||
//Route::get('category/dashboard', ['uses' => 'CategoryController@dashboard', 'as' => 'category.dashboard']);
|
||||
// Route::get('account/dashboard', ['uses' => 'AccountController@dashboard', 'as' => 'account.dashboard']);
|
||||
// Route::get('budget/dashboard', ['uses' => 'BudgetController@dashboard', 'as' => 'budget.dashboard']);
|
||||
// Route::get('category/dashboard', ['uses' => 'CategoryController@dashboard', 'as' => 'category.dashboard']);
|
||||
Route::get('balance/balance', ['uses' => 'BalanceController@balance', 'as' => 'balance.balance']);
|
||||
}
|
||||
);
|
||||
@@ -77,7 +77,7 @@ Route::group(
|
||||
'as' => 'api.v2.summary.',
|
||||
],
|
||||
static function (): void {
|
||||
//Route::get('basic', ['uses' => 'BasicController@basic', 'as' => 'basic']);
|
||||
// Route::get('basic', ['uses' => 'BasicController@basic', 'as' => 'basic']);
|
||||
}
|
||||
);
|
||||
// V2 API route for all kinds of Transaction lists.
|
||||
@@ -91,11 +91,11 @@ Route::group(
|
||||
],
|
||||
static function (): void {
|
||||
// basic list
|
||||
//Route::get('transactions', ['uses' => 'TransactionController@list', 'as' => 'transactions.list']);
|
||||
// Route::get('transactions', ['uses' => 'TransactionController@list', 'as' => 'transactions.list']);
|
||||
|
||||
// list by parent or related object.
|
||||
// note how the check is done on the user group, not the user itself.
|
||||
//Route::get('accounts/{userGroupAccount}/transactions', ['uses' => 'AccountController@list', 'as' => 'accounts.transactions']);
|
||||
// Route::get('accounts/{userGroupAccount}/transactions', ['uses' => 'AccountController@list', 'as' => 'accounts.transactions']);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -109,7 +109,7 @@ Route::group(
|
||||
'as' => 'api.v2.net-worth.',
|
||||
],
|
||||
static function (): void {
|
||||
//Route::get('', ['uses' => 'NetWorthController@get', 'as' => 'index']);
|
||||
// Route::get('', ['uses' => 'NetWorthController@get', 'as' => 'index']);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -135,10 +135,10 @@ Route::group(
|
||||
'as' => 'api.v2.subscriptions.',
|
||||
],
|
||||
static function (): void {
|
||||
// Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);
|
||||
// Route::get('{userGroupBill}', ['uses' => 'ShowController@show', 'as' => 'show']);
|
||||
// Route::get('sum/paid', ['uses' => 'SumController@paid', 'as' => 'sum.paid']);
|
||||
// Route::get('sum/unpaid', ['uses' => 'SumController@unpaid', 'as' => 'sum.unpaid']);
|
||||
// Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);
|
||||
// Route::get('{userGroupBill}', ['uses' => 'ShowController@show', 'as' => 'show']);
|
||||
// Route::get('sum/paid', ['uses' => 'SumController@paid', 'as' => 'sum.paid']);
|
||||
// Route::get('sum/unpaid', ['uses' => 'SumController@unpaid', 'as' => 'sum.unpaid']);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -150,7 +150,7 @@ Route::group(
|
||||
'as' => 'api.v2.piggy-banks.',
|
||||
],
|
||||
static function (): void {
|
||||
// Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);
|
||||
// Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -162,7 +162,7 @@ Route::group(
|
||||
'as' => 'api.v2.currencies.',
|
||||
],
|
||||
static function (): void {
|
||||
// Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);
|
||||
// Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -174,9 +174,9 @@ Route::group(
|
||||
'as' => 'api.v2.transactions.',
|
||||
],
|
||||
static function (): void {
|
||||
// Route::post('', ['uses' => 'StoreController@post', 'as' => 'store']);
|
||||
// Route::get('{userGroupTransaction}', ['uses' => 'ShowController@show', 'as' => 'show']);
|
||||
// Route::put('{userGroupTransaction}', ['uses' => 'UpdateController@update', 'as' => 'update']);
|
||||
// Route::post('', ['uses' => 'StoreController@post', 'as' => 'store']);
|
||||
// Route::get('{userGroupTransaction}', ['uses' => 'ShowController@show', 'as' => 'show']);
|
||||
// Route::put('{userGroupTransaction}', ['uses' => 'UpdateController@update', 'as' => 'update']);
|
||||
}
|
||||
);
|
||||
// infinite (transactions) list:
|
||||
@@ -187,7 +187,7 @@ Route::group(
|
||||
'as' => 'api.v2.infinite.transactions.',
|
||||
],
|
||||
static function (): void {
|
||||
// Route::get('', ['uses' => 'TransactionController@infiniteList', 'as' => 'list']);
|
||||
// Route::get('', ['uses' => 'TransactionController@infiniteList', 'as' => 'list']);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -199,11 +199,11 @@ Route::group(
|
||||
'as' => 'api.v2.budgets',
|
||||
],
|
||||
static function (): void {
|
||||
// Route::get('', ['uses' => 'Budget\IndexController@index', 'as' => 'index']);
|
||||
// Route::get('{budget}', ['uses' => 'Budget\ShowController@show', 'as' => 'show']);
|
||||
// Route::get('{budget}/limits', ['uses' => 'BudgetLimit\IndexController@index', 'as' => 'budget-limits.index']);
|
||||
// Route::get('sum/budgeted', ['uses' => 'Budget\SumController@budgeted', 'as' => 'sum.budgeted']);
|
||||
// Route::get('sum/spent', ['uses' => 'Budget\SumController@spent', 'as' => 'sum.spent']);
|
||||
// Route::get('', ['uses' => 'Budget\IndexController@index', 'as' => 'index']);
|
||||
// Route::get('{budget}', ['uses' => 'Budget\ShowController@show', 'as' => 'show']);
|
||||
// Route::get('{budget}/limits', ['uses' => 'BudgetLimit\IndexController@index', 'as' => 'budget-limits.index']);
|
||||
// Route::get('sum/budgeted', ['uses' => 'Budget\SumController@budgeted', 'as' => 'sum.budgeted']);
|
||||
// Route::get('sum/spent', ['uses' => 'Budget\SumController@spent', 'as' => 'sum.spent']);
|
||||
// Route::get('{budget}/budgeted', ['uses' => 'Budget\ShowController@budgeted', 'as' => 'budget.budgeted']);
|
||||
// Route::get('{budget}/spent', ['uses' => 'Budget\ShowController@spent', 'as' => 'budget.spent']);
|
||||
}
|
||||
@@ -217,7 +217,7 @@ Route::group(
|
||||
'as' => 'api.v2.system.',
|
||||
],
|
||||
static function (): void {
|
||||
// Route::get('preferences/{preference}', ['uses' => 'PreferencesController@get', 'as' => 'preferences.get']);
|
||||
// Route::get('preferences/{preference}', ['uses' => 'PreferencesController@get', 'as' => 'preferences.get']);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -229,18 +229,18 @@ Route::group(
|
||||
'as' => 'api.v2.user-groups.',
|
||||
],
|
||||
static function (): void {
|
||||
// Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);
|
||||
// Route::post('', ['uses' => 'StoreController@store', 'as' => 'store']);
|
||||
// Route::get('{userGroup}', ['uses' => 'ShowController@show', 'as' => 'show']);
|
||||
// Route::put('{userGroup}', ['uses' => 'UpdateController@update', 'as' => 'update']);
|
||||
// Route::post('{userGroup}/use', ['uses' => 'UpdateController@useUserGroup', 'as' => 'use']);
|
||||
// Route::put('{userGroup}/update-membership', ['uses' => 'UpdateController@updateMembership', 'as' => 'updateMembership']);
|
||||
// Route::delete('{userGroup}', ['uses' => 'DestroyController@destroy', 'as' => 'destroy']);
|
||||
// Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);
|
||||
// Route::post('', ['uses' => 'StoreController@store', 'as' => 'store']);
|
||||
// Route::get('{userGroup}', ['uses' => 'ShowController@show', 'as' => 'show']);
|
||||
// Route::put('{userGroup}', ['uses' => 'UpdateController@update', 'as' => 'update']);
|
||||
// Route::post('{userGroup}/use', ['uses' => 'UpdateController@useUserGroup', 'as' => 'use']);
|
||||
// Route::put('{userGroup}/update-membership', ['uses' => 'UpdateController@updateMembership', 'as' => 'updateMembership']);
|
||||
// Route::delete('{userGroup}', ['uses' => 'DestroyController@destroy', 'as' => 'destroy']);
|
||||
}
|
||||
);
|
||||
|
||||
// V2 JSON API ROUTES
|
||||
//JsonApiRoute::server('v2')->prefix('v2')
|
||||
// JsonApiRoute::server('v2')->prefix('v2')
|
||||
// ->resources(function (ResourceRegistrar $server): void {
|
||||
// // ACCOUNTS
|
||||
// $server->resource('accounts', AccountController::class)
|
||||
@@ -254,7 +254,7 @@ Route::group(
|
||||
// $relations->hasMany('accounts')->readOnly();
|
||||
// });
|
||||
// })
|
||||
//;
|
||||
// ;
|
||||
|
||||
/*
|
||||
* ____ ____ __ .______ ______ __ __ .___________. _______ _______.
|
||||
|
Reference in New Issue
Block a user