mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 06:43:23 +00:00
Auto commit for release 'branch-v6.2' on 2024-12-22
This commit is contained in:
@@ -29,11 +29,9 @@ use FireflyIII\Events\RequestedVersionCheckStatus;
|
|||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||||
use FireflyIII\Http\Middleware\Installer;
|
use FireflyIII\Http\Middleware\Installer;
|
||||||
use FireflyIII\Models\Account;
|
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\Support\Facades\Steam;
|
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
@@ -103,7 +103,7 @@ class PreferencesController extends Controller
|
|||||||
$darkMode = app('preferences')->get('darkMode', 'browser')->data;
|
$darkMode = app('preferences')->get('darkMode', 'browser')->data;
|
||||||
$customFiscalYear = app('preferences')->get('customFiscalYear', 0)->data;
|
$customFiscalYear = app('preferences')->get('customFiscalYear', 0)->data;
|
||||||
$fiscalYearStartStr = app('preferences')->get('fiscalYearStart', '01-01')->data;
|
$fiscalYearStartStr = app('preferences')->get('fiscalYearStart', '01-01')->data;
|
||||||
$convertToNative =app('preferences')->get('convert_to_native', false)->data;
|
$convertToNative = app('preferences')->get('convert_to_native', false)->data;
|
||||||
if (is_array($fiscalYearStartStr)) {
|
if (is_array($fiscalYearStartStr)) {
|
||||||
$fiscalYearStartStr = '01-01';
|
$fiscalYearStartStr = '01-01';
|
||||||
}
|
}
|
||||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Models\TransactionCurrency;
|
|||||||
use FireflyIII\Models\UserGroup;
|
use FireflyIII\Models\UserGroup;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use NumberFormatter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Amount.
|
* Class Amount.
|
||||||
@@ -60,10 +59,10 @@ class Amount
|
|||||||
$rounded = app('steam')->bcround($amount, $decimalPlaces);
|
$rounded = app('steam')->bcround($amount, $decimalPlaces);
|
||||||
$coloured ??= true;
|
$coloured ??= true;
|
||||||
|
|
||||||
$fmt = new NumberFormatter($locale, NumberFormatter::CURRENCY);
|
$fmt = new \NumberFormatter($locale, \NumberFormatter::CURRENCY);
|
||||||
$fmt->setSymbol(NumberFormatter::CURRENCY_SYMBOL, $symbol);
|
$fmt->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, $symbol);
|
||||||
$fmt->setAttribute(NumberFormatter::MIN_FRACTION_DIGITS, $decimalPlaces);
|
$fmt->setAttribute(\NumberFormatter::MIN_FRACTION_DIGITS, $decimalPlaces);
|
||||||
$fmt->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, $decimalPlaces);
|
$fmt->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimalPlaces);
|
||||||
$result = (string) $fmt->format((float) $rounded); // intentional float
|
$result = (string) $fmt->format((float) $rounded); // intentional float
|
||||||
|
|
||||||
if (true === $coloured) {
|
if (true === $coloured) {
|
||||||
@@ -186,10 +185,10 @@ class Amount
|
|||||||
$info['n_sep_by_space'] = $this->getLocaleField($info, 'n_sep_by_space');
|
$info['n_sep_by_space'] = $this->getLocaleField($info, 'n_sep_by_space');
|
||||||
$info['p_sep_by_space'] = $this->getLocaleField($info, 'p_sep_by_space');
|
$info['p_sep_by_space'] = $this->getLocaleField($info, 'p_sep_by_space');
|
||||||
|
|
||||||
$fmt = new NumberFormatter($locale, NumberFormatter::CURRENCY);
|
$fmt = new \NumberFormatter($locale, \NumberFormatter::CURRENCY);
|
||||||
|
|
||||||
$info['mon_decimal_point'] = $fmt->getSymbol(NumberFormatter::MONETARY_SEPARATOR_SYMBOL);
|
$info['mon_decimal_point'] = $fmt->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL);
|
||||||
$info['mon_thousands_sep'] = $fmt->getSymbol(NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL);
|
$info['mon_thousands_sep'] = $fmt->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL);
|
||||||
|
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
@@ -264,11 +263,11 @@ class Amount
|
|||||||
}
|
}
|
||||||
|
|
||||||
// default is amount before currency
|
// default is amount before currency
|
||||||
$format = $posA . $posD . '%v' . $space . $posB . '%s' . $posC . $posE;
|
$format = $posA.$posD.'%v'.$space.$posB.'%s'.$posC.$posE;
|
||||||
|
|
||||||
if ($csPrecedes) {
|
if ($csPrecedes) {
|
||||||
// alternative is currency before amount
|
// alternative is currency before amount
|
||||||
$format = $posA . $posB . '%s' . $posC . $space . $posD . '%v' . $posE;
|
$format = $posA.$posB.'%s'.$posC.$space.$posD.'%v'.$posE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $format;
|
return $format;
|
||||||
|
@@ -139,14 +139,14 @@ class RemoteUserGuard implements Guard
|
|||||||
/**
|
/**
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
public function id(): null | int | string
|
public function id(): null|int|string
|
||||||
{
|
{
|
||||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||||
|
|
||||||
return $this->user?->id;
|
return $this->user?->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUser(null | Authenticatable | User $user): void // @phpstan-ignore-line
|
public function setUser(null|Authenticatable|User $user): void // @phpstan-ignore-line
|
||||||
{
|
{
|
||||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||||
if ($user instanceof User) {
|
if ($user instanceof User) {
|
||||||
|
@@ -30,15 +30,13 @@ use FireflyIII\Models\Role;
|
|||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Contracts\Auth\Authenticatable;
|
use Illuminate\Contracts\Auth\Authenticatable;
|
||||||
use Illuminate\Contracts\Auth\UserProvider;
|
use Illuminate\Contracts\Auth\UserProvider;
|
||||||
use Override;
|
|
||||||
use Str;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class RemoteUserProvider
|
* Class RemoteUserProvider
|
||||||
*/
|
*/
|
||||||
class RemoteUserProvider implements UserProvider
|
class RemoteUserProvider implements UserProvider
|
||||||
{
|
{
|
||||||
#[Override]
|
#[\Override]
|
||||||
public function rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false): void
|
public function rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false): void
|
||||||
{
|
{
|
||||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||||
@@ -74,7 +72,7 @@ class RemoteUserProvider implements UserProvider
|
|||||||
'blocked' => false,
|
'blocked' => false,
|
||||||
'blocked_code' => null,
|
'blocked_code' => null,
|
||||||
'email' => $identifier,
|
'email' => $identifier,
|
||||||
'password' => bcrypt(Str::random(64)),
|
'password' => bcrypt(\Str::random(64)),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
// if this is the first user, give them admin as well.
|
// if this is the first user, give them admin as well.
|
||||||
|
@@ -54,7 +54,8 @@ class Balance
|
|||||||
->orderBy('transaction_journals.order', 'asc')
|
->orderBy('transaction_journals.order', 'asc')
|
||||||
->orderBy('transaction_journals.description', 'desc')
|
->orderBy('transaction_journals.description', 'desc')
|
||||||
->orderBy('transactions.amount', 'desc')
|
->orderBy('transactions.amount', 'desc')
|
||||||
->where('transaction_journals.date', '<=', $date);
|
->where('transaction_journals.date', '<=', $date)
|
||||||
|
;
|
||||||
|
|
||||||
$result = $query->get(['transactions.account_id', 'transactions.transaction_currency_id', 'transactions.balance_after']);
|
$result = $query->get(['transactions.account_id', 'transactions.transaction_currency_id', 'transactions.balance_after']);
|
||||||
foreach ($result as $entry) {
|
foreach ($result as $entry) {
|
||||||
|
@@ -46,7 +46,8 @@ class AccountList implements BinderInterface
|
|||||||
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||||
->whereIn('account_types.type', [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE])
|
->whereIn('account_types.type', [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE])
|
||||||
->orderBy('accounts.name', 'ASC')
|
->orderBy('accounts.name', 'ASC')
|
||||||
->get(['accounts.*']);
|
->get(['accounts.*'])
|
||||||
|
;
|
||||||
}
|
}
|
||||||
if ('allAssetAccounts' !== $value) {
|
if ('allAssetAccounts' !== $value) {
|
||||||
$incoming = array_map('\intval', explode(',', $value));
|
$incoming = array_map('\intval', explode(',', $value));
|
||||||
@@ -57,7 +58,8 @@ class AccountList implements BinderInterface
|
|||||||
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||||
->whereIn('accounts.id', $list)
|
->whereIn('accounts.id', $list)
|
||||||
->orderBy('accounts.name', 'ASC')
|
->orderBy('accounts.name', 'ASC')
|
||||||
->get(['accounts.*']);
|
->get(['accounts.*'])
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($collection->count() > 0) {
|
if ($collection->count() > 0) {
|
||||||
|
@@ -43,7 +43,8 @@ class BudgetList implements BinderInterface
|
|||||||
return auth()->user()->budgets()->where('active', true)
|
return auth()->user()->budgets()->where('active', true)
|
||||||
->orderBy('order', 'ASC')
|
->orderBy('order', 'ASC')
|
||||||
->orderBy('name', 'ASC')
|
->orderBy('name', 'ASC')
|
||||||
->get();
|
->get()
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = array_unique(array_map('\intval', explode(',', $value)));
|
$list = array_unique(array_map('\intval', explode(',', $value)));
|
||||||
@@ -58,7 +59,8 @@ class BudgetList implements BinderInterface
|
|||||||
$collection = auth()->user()->budgets()
|
$collection = auth()->user()->budgets()
|
||||||
->where('active', true)
|
->where('active', true)
|
||||||
->whereIn('id', $list)
|
->whereIn('id', $list)
|
||||||
->get();
|
->get()
|
||||||
|
;
|
||||||
|
|
||||||
// add empty budget if applicable.
|
// add empty budget if applicable.
|
||||||
if (in_array(0, $list, true)) {
|
if (in_array(0, $list, true)) {
|
||||||
|
@@ -42,7 +42,8 @@ class CategoryList implements BinderInterface
|
|||||||
if ('allCategories' === $value) {
|
if ('allCategories' === $value) {
|
||||||
return auth()->user()->categories()
|
return auth()->user()->categories()
|
||||||
->orderBy('name', 'ASC')
|
->orderBy('name', 'ASC')
|
||||||
->get();
|
->get()
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = array_unique(array_map('\intval', explode(',', $value)));
|
$list = array_unique(array_map('\intval', explode(',', $value)));
|
||||||
@@ -53,7 +54,8 @@ class CategoryList implements BinderInterface
|
|||||||
/** @var Collection $collection */
|
/** @var Collection $collection */
|
||||||
$collection = auth()->user()->categories()
|
$collection = auth()->user()->categories()
|
||||||
->whereIn('id', $list)
|
->whereIn('id', $list)
|
||||||
->get();
|
->get()
|
||||||
|
;
|
||||||
|
|
||||||
// add empty category if applicable.
|
// add empty category if applicable.
|
||||||
if (in_array(0, $list, true)) {
|
if (in_array(0, $list, true)) {
|
||||||
|
@@ -68,7 +68,7 @@ class Date implements BinderInterface
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$result = new Carbon($value);
|
$result = new Carbon($value);
|
||||||
} catch (InvalidDateException | InvalidFormatException $e) { // @phpstan-ignore-line
|
} catch (InvalidDateException|InvalidFormatException $e) { // @phpstan-ignore-line
|
||||||
$message = sprintf('Could not parse date "%s" for user #%d: %s', $value, auth()->user()->id, $e->getMessage());
|
$message = sprintf('Could not parse date "%s" for user #%d: %s', $value, auth()->user()->id, $e->getMessage());
|
||||||
app('log')->error($message);
|
app('log')->error($message);
|
||||||
|
|
||||||
|
@@ -44,7 +44,8 @@ class TagList implements BinderInterface
|
|||||||
if ('allTags' === $value) {
|
if ('allTags' === $value) {
|
||||||
return auth()->user()->tags()
|
return auth()->user()->tags()
|
||||||
->orderBy('tag', 'ASC')
|
->orderBy('tag', 'ASC')
|
||||||
->get();
|
->get()
|
||||||
|
;
|
||||||
}
|
}
|
||||||
$list = array_unique(array_map('\strtolower', explode(',', $value)));
|
$list = array_unique(array_map('\strtolower', explode(',', $value)));
|
||||||
app('log')->debug('List of tags is', $list);
|
app('log')->debug('List of tags is', $list);
|
||||||
|
@@ -43,7 +43,8 @@ class UserGroupAccount implements BinderInterface
|
|||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$account = Account::where('id', (int) $value)
|
$account = Account::where('id', (int) $value)
|
||||||
->where('user_group_id', $user->user_group_id)
|
->where('user_group_id', $user->user_group_id)
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
if (null !== $account) {
|
if (null !== $account) {
|
||||||
return $account;
|
return $account;
|
||||||
}
|
}
|
||||||
|
@@ -43,7 +43,8 @@ class UserGroupBill implements BinderInterface
|
|||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$currency = Bill::where('id', (int) $value)
|
$currency = Bill::where('id', (int) $value)
|
||||||
->where('user_group_id', $user->user_group_id)
|
->where('user_group_id', $user->user_group_id)
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
if (null !== $currency) {
|
if (null !== $currency) {
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,8 @@ class UserGroupExchangeRate implements BinderInterface
|
|||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$rate = CurrencyExchangeRate::where('id', (int) $value)
|
$rate = CurrencyExchangeRate::where('id', (int) $value)
|
||||||
->where('user_group_id', $user->user_group_id)
|
->where('user_group_id', $user->user_group_id)
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
if (null !== $rate) {
|
if (null !== $rate) {
|
||||||
return $rate;
|
return $rate;
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,8 @@ class UserGroupTransaction implements BinderInterface
|
|||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$group = TransactionGroup::where('id', (int) $value)
|
$group = TransactionGroup::where('id', (int) $value)
|
||||||
->where('user_group_id', $user->user_group_id)
|
->where('user_group_id', $user->user_group_id)
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
if (null !== $group) {
|
if (null !== $group) {
|
||||||
return $group;
|
return $group;
|
||||||
}
|
}
|
||||||
|
@@ -23,9 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Support;
|
namespace FireflyIII\Support;
|
||||||
|
|
||||||
use Cache;
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use JsonException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CacheProperties.
|
* Class CacheProperties.
|
||||||
@@ -57,7 +55,7 @@ class CacheProperties
|
|||||||
*/
|
*/
|
||||||
public function get()
|
public function get()
|
||||||
{
|
{
|
||||||
return Cache::get($this->hash);
|
return \Cache::get($this->hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHash(): string
|
public function getHash(): string
|
||||||
@@ -72,7 +70,7 @@ class CacheProperties
|
|||||||
}
|
}
|
||||||
$this->hash();
|
$this->hash();
|
||||||
|
|
||||||
return Cache::has($this->hash);
|
return \Cache::has($this->hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function hash(): void
|
private function hash(): void
|
||||||
@@ -81,7 +79,7 @@ class CacheProperties
|
|||||||
foreach ($this->properties as $property) {
|
foreach ($this->properties as $property) {
|
||||||
try {
|
try {
|
||||||
$content .= json_encode($property, JSON_THROW_ON_ERROR);
|
$content .= json_encode($property, JSON_THROW_ON_ERROR);
|
||||||
} catch (JsonException $e) {
|
} catch (\JsonException $e) {
|
||||||
// @ignoreException
|
// @ignoreException
|
||||||
$content .= hash('sha256', (string) time());
|
$content .= hash('sha256', (string) time());
|
||||||
}
|
}
|
||||||
@@ -94,6 +92,6 @@ class CacheProperties
|
|||||||
*/
|
*/
|
||||||
public function store($data): void
|
public function store($data): void
|
||||||
{
|
{
|
||||||
Cache::forever($this->hash, $data);
|
\Cache::forever($this->hash, $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ namespace FireflyIII\Support\Calendar;
|
|||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Exceptions\IntervalException;
|
use FireflyIII\Exceptions\IntervalException;
|
||||||
use SplObjectStorage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Calculator
|
* Class Calculator
|
||||||
@@ -34,7 +33,7 @@ use SplObjectStorage;
|
|||||||
class Calculator
|
class Calculator
|
||||||
{
|
{
|
||||||
public const int DEFAULT_INTERVAL = 1;
|
public const int DEFAULT_INTERVAL = 1;
|
||||||
private static ?SplObjectStorage $intervalMap = null;
|
private static ?\SplObjectStorage $intervalMap = null;
|
||||||
private static array $intervals = [];
|
private static array $intervals = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,14 +65,14 @@ class Calculator
|
|||||||
/**
|
/**
|
||||||
* @SuppressWarnings(PHPMD.MissingImport)
|
* @SuppressWarnings(PHPMD.MissingImport)
|
||||||
*/
|
*/
|
||||||
private static function loadIntervalMap(): SplObjectStorage
|
private static function loadIntervalMap(): \SplObjectStorage
|
||||||
{
|
{
|
||||||
if (null !== self::$intervalMap) {
|
if (null !== self::$intervalMap) {
|
||||||
return self::$intervalMap;
|
return self::$intervalMap;
|
||||||
}
|
}
|
||||||
self::$intervalMap = new SplObjectStorage();
|
self::$intervalMap = new \SplObjectStorage();
|
||||||
foreach (Periodicity::cases() as $interval) {
|
foreach (Periodicity::cases() as $interval) {
|
||||||
$periodicityClass = __NAMESPACE__ . "\\Periodicity\\{$interval->name}";
|
$periodicityClass = __NAMESPACE__."\\Periodicity\\{$interval->name}";
|
||||||
self::$intervals[] = $interval->name;
|
self::$intervals[] = $interval->name;
|
||||||
self::$intervalMap->attach($interval, new $periodicityClass());
|
self::$intervalMap->attach($interval, new $periodicityClass());
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,6 @@ use Eloquent;
|
|||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Support\Form\FormSupport;
|
use FireflyIII\Support\Form\FormSupport;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ExpandedForm.
|
* Class ExpandedForm.
|
||||||
@@ -57,7 +56,7 @@ class ExpandedForm
|
|||||||
// }
|
// }
|
||||||
try {
|
try {
|
||||||
$html = view('form.amount-no-currency', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.amount-no-currency', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Could not render amountNoCurrency(): %s', $e->getMessage()));
|
app('log')->error(sprintf('Could not render amountNoCurrency(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render amountNoCurrency.';
|
$html = 'Could not render amountNoCurrency.';
|
||||||
|
|
||||||
@@ -92,7 +91,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.checkbox', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.checkbox', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render checkbox(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render checkbox(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render checkbox.';
|
$html = 'Could not render checkbox.';
|
||||||
|
|
||||||
@@ -117,7 +116,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.date', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.date', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render date(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render date(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render date.';
|
$html = 'Could not render date.';
|
||||||
|
|
||||||
@@ -139,7 +138,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.file', compact('classes', 'name', 'label', 'options'))->render();
|
$html = view('form.file', compact('classes', 'name', 'label', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render file(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render file(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render file.';
|
$html = 'Could not render file.';
|
||||||
|
|
||||||
@@ -165,7 +164,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render integer(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render integer(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render integer.';
|
$html = 'Could not render integer.';
|
||||||
|
|
||||||
@@ -190,7 +189,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.location', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.location', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render location(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render location(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render location.';
|
$html = 'Could not render location.';
|
||||||
|
|
||||||
@@ -206,7 +205,7 @@ class ExpandedForm
|
|||||||
$selectList[0] = '(none)';
|
$selectList[0] = '(none)';
|
||||||
$fields = ['title', 'name', 'description'];
|
$fields = ['title', 'name', 'description'];
|
||||||
|
|
||||||
/** @var Eloquent $entry */
|
/** @var \Eloquent $entry */
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
// All Eloquent models have an ID
|
// All Eloquent models have an ID
|
||||||
$entryId = $entry->id; // @phpstan-ignore-line
|
$entryId = $entry->id; // @phpstan-ignore-line
|
||||||
@@ -243,7 +242,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.object_group', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.object_group', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render objectGroup(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render objectGroup(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render objectGroup.';
|
$html = 'Could not render objectGroup.';
|
||||||
|
|
||||||
@@ -260,7 +259,7 @@ class ExpandedForm
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$html = view('form.options', compact('type', 'name'))->render();
|
$html = view('form.options', compact('type', 'name'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render select(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render select(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render optionsList.';
|
$html = 'Could not render optionsList.';
|
||||||
|
|
||||||
@@ -281,7 +280,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.password', compact('classes', 'name', 'label', 'options'))->render();
|
$html = view('form.password', compact('classes', 'name', 'label', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render password(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render password(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render password.';
|
$html = 'Could not render password.';
|
||||||
|
|
||||||
@@ -302,7 +301,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.password', compact('classes', 'value', 'name', 'label', 'options'))->render();
|
$html = view('form.password', compact('classes', 'value', 'name', 'label', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render passwordWithValue(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render passwordWithValue(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render passwordWithValue.';
|
$html = 'Could not render passwordWithValue.';
|
||||||
|
|
||||||
@@ -330,7 +329,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.percentage', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.percentage', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render percentage(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render percentage(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render percentage.';
|
$html = 'Could not render percentage.';
|
||||||
|
|
||||||
@@ -353,7 +352,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.static', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.static', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render staticText(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render staticText(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render staticText.';
|
$html = 'Could not render staticText.';
|
||||||
|
|
||||||
@@ -377,7 +376,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.text', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.text', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render text(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render text(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render text.';
|
$html = 'Could not render text.';
|
||||||
|
|
||||||
@@ -406,7 +405,7 @@ class ExpandedForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.textarea', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.textarea', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render textarea(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render textarea(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render textarea.';
|
$html = 'Could not render textarea.';
|
||||||
|
|
||||||
|
@@ -736,7 +736,8 @@ class ExportDataGenerator
|
|||||||
$collector = app(GroupCollectorInterface::class);
|
$collector = app(GroupCollectorInterface::class);
|
||||||
$collector->setUser($this->user);
|
$collector->setUser($this->user);
|
||||||
$collector->setRange($this->start, $this->end)->withAccountInformation()->withCategoryInformation()->withBillInformation()
|
$collector->setRange($this->start, $this->end)->withAccountInformation()->withCategoryInformation()->withBillInformation()
|
||||||
->withBudgetInformation()->withTagInformation()->withNotes();
|
->withBudgetInformation()->withTagInformation()->withNotes()
|
||||||
|
;
|
||||||
if (0 !== $this->accounts->count()) {
|
if (0 !== $this->accounts->count()) {
|
||||||
$collector->setAccounts($this->accounts);
|
$collector->setAccounts($this->accounts);
|
||||||
}
|
}
|
||||||
|
@@ -23,8 +23,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Support;
|
namespace FireflyIII\Support;
|
||||||
|
|
||||||
use Cache;
|
|
||||||
use Exception;
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Models\Configuration;
|
use FireflyIII\Models\Configuration;
|
||||||
use Illuminate\Contracts\Encryption\DecryptException;
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
@@ -39,9 +37,9 @@ class FireflyConfig
|
|||||||
{
|
{
|
||||||
public function delete(string $name): void
|
public function delete(string $name): void
|
||||||
{
|
{
|
||||||
$fullName = 'ff-config-' . $name;
|
$fullName = 'ff-config-'.$name;
|
||||||
if (Cache::has($fullName)) {
|
if (\Cache::has($fullName)) {
|
||||||
Cache::forget($fullName);
|
\Cache::forget($fullName);
|
||||||
}
|
}
|
||||||
Configuration::where('name', $name)->forceDelete();
|
Configuration::where('name', $name)->forceDelete();
|
||||||
}
|
}
|
||||||
@@ -81,20 +79,20 @@ class FireflyConfig
|
|||||||
*/
|
*/
|
||||||
public function get(string $name, $default = null): ?Configuration
|
public function get(string $name, $default = null): ?Configuration
|
||||||
{
|
{
|
||||||
$fullName = 'ff-config-' . $name;
|
$fullName = 'ff-config-'.$name;
|
||||||
if (Cache::has($fullName)) {
|
if (\Cache::has($fullName)) {
|
||||||
return Cache::get($fullName);
|
return \Cache::get($fullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
/** @var null|Configuration $config */
|
/** @var null|Configuration $config */
|
||||||
$config = Configuration::where('name', $name)->first(['id', 'name', 'data']);
|
$config = Configuration::where('name', $name)->first(['id', 'name', 'data']);
|
||||||
} catch (Exception | QueryException $e) {
|
} catch (\Exception|QueryException $e) {
|
||||||
throw new FireflyException(sprintf('Could not poll the database: %s', $e->getMessage()), 0, $e);
|
throw new FireflyException(sprintf('Could not poll the database: %s', $e->getMessage()), 0, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $config) {
|
if (null !== $config) {
|
||||||
Cache::forever($fullName, $config);
|
\Cache::forever($fullName, $config);
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
@@ -124,13 +122,13 @@ class FireflyConfig
|
|||||||
$item->name = $name;
|
$item->name = $name;
|
||||||
$item->data = $value;
|
$item->data = $value;
|
||||||
$item->save();
|
$item->save();
|
||||||
Cache::forget('ff-config-' . $name);
|
\Cache::forget('ff-config-'.$name);
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
$config->data = $value;
|
$config->data = $value;
|
||||||
$config->save();
|
$config->save();
|
||||||
Cache::forget('ff-config-' . $name);
|
\Cache::forget('ff-config-'.$name);
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,6 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AccountForm
|
* Class AccountForm
|
||||||
@@ -126,7 +125,7 @@ class AccountForm
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.assetAccountCheckList', compact('classes', 'selected', 'name', 'label', 'options', 'grouped'))->render();
|
$html = view('form.assetAccountCheckList', compact('classes', 'selected', 'name', 'label', 'options', 'grouped'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render assetAccountCheckList(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render assetAccountCheckList(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render assetAccountCheckList.';
|
$html = 'Could not render assetAccountCheckList.';
|
||||||
|
|
||||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CurrencyForm
|
* Class CurrencyForm
|
||||||
@@ -69,7 +68,7 @@ class CurrencyForm
|
|||||||
if (!is_array($preFilled)) {
|
if (!is_array($preFilled)) {
|
||||||
$preFilled = [];
|
$preFilled = [];
|
||||||
}
|
}
|
||||||
$key = 'amount_currency_id_' . $name;
|
$key = 'amount_currency_id_'.$name;
|
||||||
$sentCurrencyId = array_key_exists($key, $preFilled) ? (int) $preFilled[$key] : $defaultCurrency->id;
|
$sentCurrencyId = array_key_exists($key, $preFilled) ? (int) $preFilled[$key] : $defaultCurrency->id;
|
||||||
|
|
||||||
app('log')->debug(sprintf('Sent currency ID is %d', $sentCurrencyId));
|
app('log')->debug(sprintf('Sent currency ID is %d', $sentCurrencyId));
|
||||||
@@ -90,8 +89,8 @@ class CurrencyForm
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.' . $view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.'.$view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render currencyField(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render currencyField(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render currencyField.';
|
$html = 'Could not render currencyField.';
|
||||||
|
|
||||||
@@ -138,7 +137,7 @@ class CurrencyForm
|
|||||||
if (!is_array($preFilled)) {
|
if (!is_array($preFilled)) {
|
||||||
$preFilled = [];
|
$preFilled = [];
|
||||||
}
|
}
|
||||||
$key = 'amount_currency_id_' . $name;
|
$key = 'amount_currency_id_'.$name;
|
||||||
$sentCurrencyId = array_key_exists($key, $preFilled) ? (int) $preFilled[$key] : $defaultCurrency->id;
|
$sentCurrencyId = array_key_exists($key, $preFilled) ? (int) $preFilled[$key] : $defaultCurrency->id;
|
||||||
|
|
||||||
app('log')->debug(sprintf('Sent currency ID is %d', $sentCurrencyId));
|
app('log')->debug(sprintf('Sent currency ID is %d', $sentCurrencyId));
|
||||||
@@ -159,8 +158,8 @@ class CurrencyForm
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.' . $view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
$html = view('form.'.$view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render currencyField(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render currencyField(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render currencyField.';
|
$html = 'Could not render currencyField.';
|
||||||
|
|
||||||
@@ -186,7 +185,7 @@ class CurrencyForm
|
|||||||
|
|
||||||
/** @var TransactionCurrency $currency */
|
/** @var TransactionCurrency $currency */
|
||||||
foreach ($list as $currency) {
|
foreach ($list as $currency) {
|
||||||
$array[$currency->id] = $currency->name . ' (' . $currency->symbol . ')';
|
$array[$currency->id] = $currency->name.' ('.$currency->symbol.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->select($name, $array, $value, $options);
|
return $this->select($name, $array, $value, $options);
|
||||||
@@ -210,7 +209,7 @@ class CurrencyForm
|
|||||||
|
|
||||||
/** @var TransactionCurrency $currency */
|
/** @var TransactionCurrency $currency */
|
||||||
foreach ($list as $currency) {
|
foreach ($list as $currency) {
|
||||||
$array[$currency->id] = $currency->name . ' (' . $currency->symbol . ')';
|
$array[$currency->id] = $currency->name.' ('.$currency->symbol.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->select($name, $array, $value, $options);
|
return $this->select($name, $array, $value, $options);
|
||||||
|
@@ -28,7 +28,6 @@ use Carbon\Carbon;
|
|||||||
use Carbon\Exceptions\InvalidDateException;
|
use Carbon\Exceptions\InvalidDateException;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trait FormSupport
|
* Trait FormSupport
|
||||||
@@ -47,7 +46,7 @@ trait FormSupport
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.multi-select', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
$html = view('form.multi-select', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render multi-select(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render multi-select(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render multi-select.';
|
$html = 'Could not render multi-select.';
|
||||||
}
|
}
|
||||||
@@ -63,7 +62,7 @@ trait FormSupport
|
|||||||
}
|
}
|
||||||
$name = str_replace('[]', '', $name);
|
$name = str_replace('[]', '', $name);
|
||||||
|
|
||||||
return (string) trans('form.' . $name);
|
return (string) trans('form.'.$name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,7 +73,7 @@ trait FormSupport
|
|||||||
$options ??= [];
|
$options ??= [];
|
||||||
$name = str_replace('[]', '', $name);
|
$name = str_replace('[]', '', $name);
|
||||||
$options['class'] = 'form-control';
|
$options['class'] = 'form-control';
|
||||||
$options['id'] = 'ffInput_' . $name;
|
$options['id'] = 'ffInput_'.$name;
|
||||||
$options['autocomplete'] = 'off';
|
$options['autocomplete'] = 'off';
|
||||||
$options['placeholder'] = ucfirst($label);
|
$options['placeholder'] = ucfirst($label);
|
||||||
|
|
||||||
@@ -132,7 +131,7 @@ trait FormSupport
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$html = view('form.select', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
$html = view('form.select', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Could not render select(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Could not render select(): %s', $e->getMessage()));
|
||||||
$html = 'Could not render select.';
|
$html = 'Could not render select.';
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Support\Http\Api;
|
namespace FireflyIII\Support\Http\Api;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DateTimeInterface;
|
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,7 +66,7 @@ trait ConvertsExchangeRates
|
|||||||
return $set;
|
return $set;
|
||||||
}
|
}
|
||||||
foreach ($set['entries'] as $date => $entry) {
|
foreach ($set['entries'] as $date => $entry) {
|
||||||
$carbon = Carbon::createFromFormat(DateTimeInterface::ATOM, $date);
|
$carbon = Carbon::createFromFormat(\DateTimeInterface::ATOM, $date);
|
||||||
$rate = $this->getRate($currency, $native, $carbon);
|
$rate = $this->getRate($currency, $native, $carbon);
|
||||||
$rate = '0' === $rate ? '1' : $rate;
|
$rate = '0' === $rate ? '1' : $rate;
|
||||||
app('log')->debug(sprintf('bcmul("%s", "%s")', (string) $entry, $rate));
|
app('log')->debug(sprintf('bcmul("%s", "%s")', (string) $entry, $rate));
|
||||||
|
@@ -172,7 +172,8 @@ class ExchangeRateConverter
|
|||||||
->where('to_currency_id', $to)
|
->where('to_currency_id', $to)
|
||||||
->where('date', '<=', $date)
|
->where('date', '<=', $date)
|
||||||
->orderBy('date', 'DESC')
|
->orderBy('date', 'DESC')
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
++$this->queryCount;
|
++$this->queryCount;
|
||||||
$rate = (string) $result?->rate;
|
$rate = (string) $result?->rate;
|
||||||
|
|
||||||
@@ -277,7 +278,8 @@ class ExchangeRateConverter
|
|||||||
->where('to_currency_id', $to->id)
|
->where('to_currency_id', $to->id)
|
||||||
->where('date', '<=', $end->format('Y-m-d'))
|
->where('date', '<=', $end->format('Y-m-d'))
|
||||||
->where('date', '>=', $start->format('Y-m-d'))
|
->where('date', '>=', $start->format('Y-m-d'))
|
||||||
->orderBy('date', 'DESC')->get();
|
->orderBy('date', 'DESC')->get()
|
||||||
|
;
|
||||||
++$this->queryCount;
|
++$this->queryCount;
|
||||||
if (0 === $set->count()) {
|
if (0 === $set->count()) {
|
||||||
Log::debug('No prepared rates found in this period, use the fallback');
|
Log::debug('No prepared rates found in this period, use the fallback');
|
||||||
|
@@ -64,7 +64,7 @@ trait GetConfigurationData
|
|||||||
$currentStep = $options;
|
$currentStep = $options;
|
||||||
|
|
||||||
// get the text:
|
// get the text:
|
||||||
$currentStep['intro'] = (string) trans('intro.' . $route . '_' . $key);
|
$currentStep['intro'] = (string) trans('intro.'.$route.'_'.$key);
|
||||||
|
|
||||||
// save in array:
|
// save in array:
|
||||||
$steps[] = $currentStep;
|
$steps[] = $currentStep;
|
||||||
@@ -186,13 +186,13 @@ trait GetConfigurationData
|
|||||||
// user is on page with specific instructions:
|
// user is on page with specific instructions:
|
||||||
if ('' !== $specificPage) {
|
if ('' !== $specificPage) {
|
||||||
$routeKey = str_replace('.', '_', $route);
|
$routeKey = str_replace('.', '_', $route);
|
||||||
$elements = config(sprintf('intro.%s', $routeKey . '_' . $specificPage));
|
$elements = config(sprintf('intro.%s', $routeKey.'_'.$specificPage));
|
||||||
if (is_array($elements) && count($elements) > 0) {
|
if (is_array($elements) && count($elements) > 0) {
|
||||||
foreach ($elements as $key => $options) {
|
foreach ($elements as $key => $options) {
|
||||||
$currentStep = $options;
|
$currentStep = $options;
|
||||||
|
|
||||||
// get the text:
|
// get the text:
|
||||||
$currentStep['intro'] = (string) trans('intro.' . $route . '_' . $specificPage . '_' . $key);
|
$currentStep['intro'] = (string) trans('intro.'.$route.'_'.$specificPage.'_'.$key);
|
||||||
|
|
||||||
// save in array:
|
// save in array:
|
||||||
$steps[] = $currentStep;
|
$steps[] = $currentStep;
|
||||||
|
@@ -32,7 +32,6 @@ use FireflyIII\Models\Tag;
|
|||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trait ModelInformation
|
* Trait ModelInformation
|
||||||
@@ -56,7 +55,7 @@ trait ModelInformation
|
|||||||
'count' => 1,
|
'count' => 1,
|
||||||
]
|
]
|
||||||
)->render();
|
)->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Throwable was thrown in getActionsForBill(): %s', $e->getMessage()));
|
app('log')->error(sprintf('Throwable was thrown in getActionsForBill(): %s', $e->getMessage()));
|
||||||
app('log')->error($e->getTraceAsString());
|
app('log')->error($e->getTraceAsString());
|
||||||
$result = 'Could not render view. See log files.';
|
$result = 'Could not render view. See log files.';
|
||||||
@@ -143,7 +142,7 @@ trait ModelInformation
|
|||||||
'triggers' => $triggers,
|
'triggers' => $triggers,
|
||||||
]
|
]
|
||||||
)->render();
|
)->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Throwable was thrown in getTriggersForBill(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Throwable was thrown in getTriggersForBill(): %s', $e->getMessage()));
|
||||||
app('log')->debug($e->getTraceAsString());
|
app('log')->debug($e->getTraceAsString());
|
||||||
|
|
||||||
@@ -259,7 +258,7 @@ trait ModelInformation
|
|||||||
'triggers' => $triggers,
|
'triggers' => $triggers,
|
||||||
];
|
];
|
||||||
$string = view('rules.partials.trigger', $renderInfo)->render();
|
$string = view('rules.partials.trigger', $renderInfo)->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Throwable was thrown in getTriggersForJournal(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Throwable was thrown in getTriggersForJournal(): %s', $e->getMessage()));
|
||||||
app('log')->debug($e->getTraceAsString());
|
app('log')->debug($e->getTraceAsString());
|
||||||
|
|
||||||
|
@@ -37,7 +37,6 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
|||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||||
use FireflyIII\Support\Search\OperatorQuerySearch;
|
use FireflyIII\Support\Search\OperatorQuerySearch;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trait RenderPartialViews
|
* Trait RenderPartialViews
|
||||||
@@ -69,7 +68,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$view = view('popup.report.balance-amount', compact('journals', 'budget', 'account'))->render();
|
$view = view('popup.report.balance-amount', compact('journals', 'budget', 'account'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
||||||
$view = 'Firefly III could not render the view. Please see the log files.';
|
$view = 'Firefly III could not render the view. Please see the log files.';
|
||||||
|
|
||||||
@@ -92,7 +91,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$result = view('reports.options.budget', compact('budgets'))->render();
|
$result = view('reports.options.budget', compact('budgets'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage()));
|
app('log')->error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage()));
|
||||||
$result = 'Could not render view.';
|
$result = 'Could not render view.';
|
||||||
|
|
||||||
@@ -124,7 +123,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$view = view('popup.report.budget-spent-amount', compact('journals', 'budget'))->render();
|
$view = view('popup.report.budget-spent-amount', compact('journals', 'budget'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
||||||
$view = 'Firefly III could not render the view. Please see the log files.';
|
$view = 'Firefly III could not render the view. Please see the log files.';
|
||||||
|
|
||||||
@@ -151,7 +150,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$view = view('popup.report.category-entry', compact('journals', 'category'))->render();
|
$view = view('popup.report.category-entry', compact('journals', 'category'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
||||||
$view = 'Firefly III could not render the view. Please see the log files.';
|
$view = 'Firefly III could not render the view. Please see the log files.';
|
||||||
|
|
||||||
@@ -174,7 +173,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$result = view('reports.options.category', compact('categories'))->render();
|
$result = view('reports.options.category', compact('categories'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Cannot render reports.options.category: %s', $e->getMessage()));
|
app('log')->error(sprintf('Cannot render reports.options.category: %s', $e->getMessage()));
|
||||||
$result = 'Could not render view.';
|
$result = 'Could not render view.';
|
||||||
|
|
||||||
@@ -216,7 +215,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$result = view('reports.options.double', compact('set'))->render();
|
$result = view('reports.options.double', compact('set'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage()));
|
app('log')->error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage()));
|
||||||
$result = 'Could not render view.';
|
$result = 'Could not render view.';
|
||||||
|
|
||||||
@@ -249,7 +248,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$view = view('popup.report.expense-entry', compact('journals', 'account'))->render();
|
$view = view('popup.report.expense-entry', compact('journals', 'account'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
||||||
$view = 'Firefly III could not render the view. Please see the log files.';
|
$view = 'Firefly III could not render the view. Please see the log files.';
|
||||||
|
|
||||||
@@ -285,7 +284,7 @@ trait RenderPartialViews
|
|||||||
'count' => $count,
|
'count' => $count,
|
||||||
]
|
]
|
||||||
)->render();
|
)->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Throwable was thrown in getCurrentActions(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Throwable was thrown in getCurrentActions(): %s', $e->getMessage()));
|
||||||
app('log')->error($e->getTraceAsString());
|
app('log')->error($e->getTraceAsString());
|
||||||
|
|
||||||
@@ -340,7 +339,7 @@ trait RenderPartialViews
|
|||||||
'triggers' => $triggers,
|
'triggers' => $triggers,
|
||||||
]
|
]
|
||||||
)->render();
|
)->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Throwable was thrown in getCurrentTriggers(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Throwable was thrown in getCurrentTriggers(): %s', $e->getMessage()));
|
||||||
app('log')->error($e->getTraceAsString());
|
app('log')->error($e->getTraceAsString());
|
||||||
|
|
||||||
@@ -376,7 +375,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$view = view('popup.report.income-entry', compact('journals', 'account'))->render();
|
$view = view('popup.report.income-entry', compact('journals', 'account'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
app('log')->error(sprintf('Could not render: %s', $e->getMessage()));
|
||||||
$view = 'Firefly III could not render the view. Please see the log files.';
|
$view = 'Firefly III could not render the view. Please see the log files.';
|
||||||
|
|
||||||
@@ -395,7 +394,7 @@ trait RenderPartialViews
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$result = view('reports.options.no-options')->render();
|
$result = view('reports.options.no-options')->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Cannot render reports.options.no-options: %s', $e->getMessage()));
|
app('log')->error(sprintf('Cannot render reports.options.no-options: %s', $e->getMessage()));
|
||||||
$result = 'Could not render view.';
|
$result = 'Could not render view.';
|
||||||
|
|
||||||
@@ -418,7 +417,7 @@ trait RenderPartialViews
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$result = view('reports.options.tag', compact('tags'))->render();
|
$result = view('reports.options.tag', compact('tags'))->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage()));
|
app('log')->error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage()));
|
||||||
$result = 'Could not render view.';
|
$result = 'Could not render view.';
|
||||||
|
|
||||||
|
@@ -30,7 +30,6 @@ use FireflyIII\Http\Requests\RuleFormRequest;
|
|||||||
use FireflyIII\Http\Requests\TestRuleFormRequest;
|
use FireflyIII\Http\Requests\TestRuleFormRequest;
|
||||||
use FireflyIII\Support\Binder\AccountList;
|
use FireflyIII\Support\Binder\AccountList;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Hash;
|
|
||||||
use Illuminate\Contracts\Validation\Validator as ValidatorContract;
|
use Illuminate\Contracts\Validation\Validator as ValidatorContract;
|
||||||
use Illuminate\Routing\Route;
|
use Illuminate\Routing\Route;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
@@ -170,7 +169,7 @@ trait RequestInformation
|
|||||||
*/
|
*/
|
||||||
final protected function validatePassword(User $user, string $current, string $new): bool // get request info
|
final protected function validatePassword(User $user, string $current, string $new): bool // get request info
|
||||||
{
|
{
|
||||||
if (!Hash::check($current, $user->password)) {
|
if (!\Hash::check($current, $user->password)) {
|
||||||
throw new ValidationException((string) trans('firefly.invalid_current_password'));
|
throw new ValidationException((string) trans('firefly.invalid_current_password'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||||
use FireflyIII\Support\Search\OperatorQuerySearch;
|
use FireflyIII\Support\Search\OperatorQuerySearch;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trait RuleManagement
|
* Trait RuleManagement
|
||||||
@@ -55,7 +54,7 @@ trait RuleManagement
|
|||||||
'count' => $index + 1,
|
'count' => $index + 1,
|
||||||
]
|
]
|
||||||
)->render();
|
)->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->error(sprintf('Throwable was thrown in getPreviousActions(): %s', $e->getMessage()));
|
app('log')->error(sprintf('Throwable was thrown in getPreviousActions(): %s', $e->getMessage()));
|
||||||
app('log')->error($e->getTraceAsString());
|
app('log')->error($e->getTraceAsString());
|
||||||
|
|
||||||
@@ -100,7 +99,7 @@ trait RuleManagement
|
|||||||
'triggers' => $triggers,
|
'triggers' => $triggers,
|
||||||
]
|
]
|
||||||
)->render();
|
)->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Throwable was thrown in getPreviousTriggers(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Throwable was thrown in getPreviousTriggers(): %s', $e->getMessage()));
|
||||||
app('log')->error($e->getTraceAsString());
|
app('log')->error($e->getTraceAsString());
|
||||||
|
|
||||||
@@ -146,7 +145,7 @@ trait RuleManagement
|
|||||||
'triggers' => $triggers,
|
'triggers' => $triggers,
|
||||||
]
|
]
|
||||||
)->render();
|
)->render();
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
app('log')->debug(sprintf('Throwable was thrown in getPreviousTriggers(): %s', $e->getMessage()));
|
app('log')->debug(sprintf('Throwable was thrown in getPreviousTriggers(): %s', $e->getMessage()));
|
||||||
app('log')->error($e->getTraceAsString());
|
app('log')->error($e->getTraceAsString());
|
||||||
|
|
||||||
|
@@ -46,7 +46,8 @@ trait TransactionCalculation
|
|||||||
$collector->setAccounts($total)
|
$collector->setAccounts($total)
|
||||||
->setRange($start, $end)
|
->setRange($start, $end)
|
||||||
->withAccountInformation()
|
->withAccountInformation()
|
||||||
->setTypes([TransactionType::WITHDRAWAL]);
|
->setTypes([TransactionType::WITHDRAWAL])
|
||||||
|
;
|
||||||
|
|
||||||
return $collector->getExtractedJournals();
|
return $collector->getExtractedJournals();
|
||||||
}
|
}
|
||||||
@@ -60,7 +61,8 @@ trait TransactionCalculation
|
|||||||
$collector = app(GroupCollectorInterface::class);
|
$collector = app(GroupCollectorInterface::class);
|
||||||
|
|
||||||
$collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
$collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
||||||
->setTags($tags)->withAccountInformation();
|
->setTags($tags)->withAccountInformation()
|
||||||
|
;
|
||||||
|
|
||||||
return $collector->getExtractedJournals();
|
return $collector->getExtractedJournals();
|
||||||
}
|
}
|
||||||
@@ -73,7 +75,8 @@ trait TransactionCalculation
|
|||||||
/** @var GroupCollectorInterface $collector */
|
/** @var GroupCollectorInterface $collector */
|
||||||
$collector = app(GroupCollectorInterface::class);
|
$collector = app(GroupCollectorInterface::class);
|
||||||
$collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
$collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
||||||
->setBudgets($budgets)->withAccountInformation();
|
->setBudgets($budgets)->withAccountInformation()
|
||||||
|
;
|
||||||
|
|
||||||
return $collector->getExtractedJournals();
|
return $collector->getExtractedJournals();
|
||||||
}
|
}
|
||||||
@@ -90,7 +93,8 @@ trait TransactionCalculation
|
|||||||
->setRange($start, $end)
|
->setRange($start, $end)
|
||||||
->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
||||||
->setCategories($categories)
|
->setCategories($categories)
|
||||||
->withAccountInformation();
|
->withAccountInformation()
|
||||||
|
;
|
||||||
|
|
||||||
return $collector->getExtractedJournals();
|
return $collector->getExtractedJournals();
|
||||||
}
|
}
|
||||||
@@ -103,7 +107,8 @@ trait TransactionCalculation
|
|||||||
/** @var GroupCollectorInterface $collector */
|
/** @var GroupCollectorInterface $collector */
|
||||||
$collector = app(GroupCollectorInterface::class);
|
$collector = app(GroupCollectorInterface::class);
|
||||||
$collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])
|
$collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])
|
||||||
->setCategories($categories)->withAccountInformation();
|
->setCategories($categories)->withAccountInformation()
|
||||||
|
;
|
||||||
|
|
||||||
return $collector->getExtractedJournals();
|
return $collector->getExtractedJournals();
|
||||||
}
|
}
|
||||||
@@ -130,7 +135,8 @@ trait TransactionCalculation
|
|||||||
/** @var GroupCollectorInterface $collector */
|
/** @var GroupCollectorInterface $collector */
|
||||||
$collector = app(GroupCollectorInterface::class);
|
$collector = app(GroupCollectorInterface::class);
|
||||||
$collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])
|
$collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])
|
||||||
->setTags($tags)->withAccountInformation();
|
->setTags($tags)->withAccountInformation()
|
||||||
|
;
|
||||||
|
|
||||||
return $collector->getExtractedJournals();
|
return $collector->getExtractedJournals();
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Support\JsonApi\Enrichments;
|
namespace FireflyIII\Support\JsonApi\Enrichments;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\ObjectGroup;
|
use FireflyIII\Models\ObjectGroup;
|
||||||
@@ -37,8 +36,6 @@ use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Override;
|
|
||||||
use stdClass;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AccountEnrichment
|
* Class AccountEnrichment
|
||||||
@@ -66,7 +63,7 @@ class AccountEnrichment implements EnrichmentInterface
|
|||||||
$this->end = null;
|
$this->end = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Override]
|
#[\Override]
|
||||||
public function enrichSingle(Model $model): Account
|
public function enrichSingle(Model $model): Account
|
||||||
{
|
{
|
||||||
Log::debug(__METHOD__);
|
Log::debug(__METHOD__);
|
||||||
@@ -76,7 +73,7 @@ class AccountEnrichment implements EnrichmentInterface
|
|||||||
return $collection->first();
|
return $collection->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Override]
|
#[\Override]
|
||||||
/**
|
/**
|
||||||
* Do the actual enrichment.
|
* Do the actual enrichment.
|
||||||
*/
|
*/
|
||||||
@@ -242,11 +239,12 @@ class AccountEnrichment implements EnrichmentInterface
|
|||||||
|
|
||||||
private function getObjectGroups(): void
|
private function getObjectGroups(): void
|
||||||
{
|
{
|
||||||
$set = DB::table('object_groupables')
|
$set = \DB::table('object_groupables')
|
||||||
->where('object_groupable_type', Account::class)
|
->where('object_groupable_type', Account::class)
|
||||||
->whereIn('object_groupable_id', $this->collection->pluck('id')->toArray())
|
->whereIn('object_groupable_id', $this->collection->pluck('id')->toArray())
|
||||||
->distinct()
|
->distinct()
|
||||||
->get(['object_groupables.object_groupable_id', 'object_groupables.object_group_id']);
|
->get(['object_groupables.object_groupable_id', 'object_groupables.object_group_id'])
|
||||||
|
;
|
||||||
// get the groups:
|
// get the groups:
|
||||||
$groupIds = $set->pluck('object_group_id')->toArray();
|
$groupIds = $set->pluck('object_group_id')->toArray();
|
||||||
$groups = ObjectGroup::whereIn('id', $groupIds)->get();
|
$groups = ObjectGroup::whereIn('id', $groupIds)->get();
|
||||||
@@ -256,7 +254,7 @@ class AccountEnrichment implements EnrichmentInterface
|
|||||||
$this->objectGroups[$group->id] = $group;
|
$this->objectGroups[$group->id] = $group;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var stdClass $entry */
|
/** @var \stdClass $entry */
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$this->grouped[(int) $entry->object_groupable_id] = (int) $entry->object_group_id;
|
$this->grouped[(int) $entry->object_groupable_id] = (int) $entry->object_group_id;
|
||||||
}
|
}
|
||||||
|
@@ -78,7 +78,8 @@ class AccountBalanceCalculator
|
|||||||
->orderBy('transaction_journals.order', 'desc')
|
->orderBy('transaction_journals.order', 'desc')
|
||||||
->orderBy('transaction_journals.id', 'asc')
|
->orderBy('transaction_journals.id', 'asc')
|
||||||
->orderBy('transaction_journals.description', 'asc')
|
->orderBy('transaction_journals.description', 'asc')
|
||||||
->orderBy('transactions.amount', 'asc');
|
->orderBy('transactions.amount', 'asc')
|
||||||
|
;
|
||||||
if ($accounts->count() > 0) {
|
if ($accounts->count() > 0) {
|
||||||
$query->whereIn('transactions.account_id', $accounts->pluck('id')->toArray());
|
$query->whereIn('transactions.account_id', $accounts->pluck('id')->toArray());
|
||||||
}
|
}
|
||||||
@@ -136,7 +137,8 @@ class AccountBalanceCalculator
|
|||||||
->orderBy('transaction_journals.id', 'DESC')
|
->orderBy('transaction_journals.id', 'DESC')
|
||||||
->orderBy('transaction_journals.description', 'DESC')
|
->orderBy('transaction_journals.description', 'DESC')
|
||||||
->orderBy('transactions.amount', 'DESC')
|
->orderBy('transactions.amount', 'DESC')
|
||||||
->where('transactions.account_id', $accountId);
|
->where('transactions.account_id', $accountId)
|
||||||
|
;
|
||||||
$notBefore->startOfDay();
|
$notBefore->startOfDay();
|
||||||
$query->where('transaction_journals.date', '<', $notBefore);
|
$query->where('transaction_journals.date', '<', $notBefore);
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ trait ReturnsIntegerIdTrait
|
|||||||
protected function id(): Attribute
|
protected function id(): Attribute
|
||||||
{
|
{
|
||||||
return Attribute::make(
|
return Attribute::make(
|
||||||
get: static fn($value) => (int) $value,
|
get: static fn ($value) => (int) $value,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -37,14 +37,14 @@ trait ReturnsIntegerUserIdTrait
|
|||||||
protected function userGroupId(): Attribute
|
protected function userGroupId(): Attribute
|
||||||
{
|
{
|
||||||
return Attribute::make(
|
return Attribute::make(
|
||||||
get: static fn($value) => (int) $value,
|
get: static fn ($value) => (int) $value,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function userId(): Attribute
|
protected function userId(): Attribute
|
||||||
{
|
{
|
||||||
return Attribute::make(
|
return Attribute::make(
|
||||||
get: static fn($value) => (int) $value,
|
get: static fn ($value) => (int) $value,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,7 +30,6 @@ use FireflyIII\Helpers\Fiscal\FiscalHelperInterface;
|
|||||||
use FireflyIII\Support\Calendar\Calculator;
|
use FireflyIII\Support\Calendar\Calculator;
|
||||||
use FireflyIII\Support\Calendar\Periodicity;
|
use FireflyIII\Support\Calendar\Periodicity;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Navigation.
|
* Class Navigation.
|
||||||
@@ -94,7 +93,7 @@ class Navigation
|
|||||||
return $this->calculator->nextDateByInterval($epoch, $periodicity, $skipInterval);
|
return $this->calculator->nextDateByInterval($epoch, $periodicity, $skipInterval);
|
||||||
} catch (IntervalException $exception) {
|
} catch (IntervalException $exception) {
|
||||||
Log::warning($exception->getMessage(), ['exception' => $exception]);
|
Log::warning($exception->getMessage(), ['exception' => $exception]);
|
||||||
} catch (Throwable $exception) { // @phpstan-ignore-line
|
} catch (\Throwable $exception) { // @phpstan-ignore-line
|
||||||
Log::error($exception->getMessage(), ['exception' => $exception]);
|
Log::error($exception->getMessage(), ['exception' => $exception]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,12 +24,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Support;
|
namespace FireflyIII\Support;
|
||||||
|
|
||||||
use ArrayObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class NullArrayObject
|
* Class NullArrayObject
|
||||||
*/
|
*/
|
||||||
class NullArrayObject extends ArrayObject
|
class NullArrayObject extends \ArrayObject
|
||||||
{
|
{
|
||||||
/** @var null|mixed */
|
/** @var null|mixed */
|
||||||
public $default;
|
public $default;
|
||||||
|
@@ -52,10 +52,11 @@ class Preferences
|
|||||||
$q->whereNull('user_group_id');
|
$q->whereNull('user_group_id');
|
||||||
$q->orWhere('user_group_id', $user->user_group_id);
|
$q->orWhere('user_group_id', $user->user_group_id);
|
||||||
})
|
})
|
||||||
->get();
|
->get()
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get(string $name, null | array | bool | int | string $default = null): ?Preference
|
public function get(string $name, null|array|bool|int|string $default = null): ?Preference
|
||||||
{
|
{
|
||||||
/** @var null|User $user */
|
/** @var null|User $user */
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
@@ -69,7 +70,7 @@ class Preferences
|
|||||||
return $this->getForUser($user, $name, $default);
|
return $this->getForUser($user, $name, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getForUser(User $user, string $name, null | array | bool | int | string $default = null): ?Preference
|
public function getForUser(User $user, string $name, null|array|bool|int|string $default = null): ?Preference
|
||||||
{
|
{
|
||||||
// don't care about user group ID, except for some specific preferences.
|
// don't care about user group ID, except for some specific preferences.
|
||||||
$userGroupId = $this->getUserGroupId($user, $name);
|
$userGroupId = $this->getUserGroupId($user, $name);
|
||||||
@@ -121,7 +122,7 @@ class Preferences
|
|||||||
Cache::put($key, '', 5);
|
Cache::put($key, '', 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setForUser(User $user, string $name, null | array | bool | int | string $value): Preference
|
public function setForUser(User $user, string $name, null|array|bool|int|string $value): Preference
|
||||||
{
|
{
|
||||||
$fullName = sprintf('preference%s%s', $user->id, $name);
|
$fullName = sprintf('preference%s%s', $user->id, $name);
|
||||||
$groupId = $this->getUserGroupId($user, $name);
|
$groupId = $this->getUserGroupId($user, $name);
|
||||||
@@ -178,7 +179,8 @@ class Preferences
|
|||||||
$q->orWhere('user_group_id', $user->user_group_id);
|
$q->orWhere('user_group_id', $user->user_group_id);
|
||||||
})
|
})
|
||||||
->whereIn('name', $list)
|
->whereIn('name', $list)
|
||||||
->get(['id', 'name', 'data']);
|
->get(['id', 'name', 'data'])
|
||||||
|
;
|
||||||
|
|
||||||
/** @var Preference $preference */
|
/** @var Preference $preference */
|
||||||
foreach ($preferences as $preference) {
|
foreach ($preferences as $preference) {
|
||||||
@@ -216,7 +218,7 @@ class Preferences
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEncryptedForUser(User $user, string $name, null | array | bool | int | string $default = null): ?Preference
|
public function getEncryptedForUser(User $user, string $name, null|array|bool|int|string $default = null): ?Preference
|
||||||
{
|
{
|
||||||
$result = $this->getForUser($user, $name, $default);
|
$result = $this->getForUser($user, $name, $default);
|
||||||
if ('' === $result->data) {
|
if ('' === $result->data) {
|
||||||
@@ -237,7 +239,7 @@ class Preferences
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFresh(string $name, null | array | bool | int | string $default = null): ?Preference
|
public function getFresh(string $name, null|array|bool|int|string $default = null): ?Preference
|
||||||
{
|
{
|
||||||
/** @var null|User $user */
|
/** @var null|User $user */
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
@@ -275,7 +277,7 @@ class Preferences
|
|||||||
Session::forget('first');
|
Session::forget('first');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set(string $name, null | array | bool | int | string $value): Preference
|
public function set(string $name, null|array|bool|int|string $value): Preference
|
||||||
{
|
{
|
||||||
/** @var null|User $user */
|
/** @var null|User $user */
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
|
@@ -54,7 +54,7 @@ trait UserGroupTrait
|
|||||||
/**
|
/**
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function setUser(null | Authenticatable | User $user): void
|
public function setUser(null|Authenticatable|User $user): void
|
||||||
{
|
{
|
||||||
if ($user instanceof User) {
|
if ($user instanceof User) {
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
@@ -72,7 +72,8 @@ trait UserGroupTrait
|
|||||||
{
|
{
|
||||||
$memberships = GroupMembership::where('user_id', $this->user->id)
|
$memberships = GroupMembership::where('user_id', $this->user->id)
|
||||||
->where('user_group_id', $userGroupId)
|
->where('user_group_id', $userGroupId)
|
||||||
->count();
|
->count()
|
||||||
|
;
|
||||||
if (0 === $memberships) {
|
if (0 === $memberships) {
|
||||||
throw new FireflyException(sprintf('User #%d has no access to administration #%d', $this->user->id, $userGroupId));
|
throw new FireflyException(sprintf('User #%d has no access to administration #%d', $this->user->id, $userGroupId));
|
||||||
}
|
}
|
||||||
|
@@ -27,6 +27,4 @@ namespace FireflyIII\Support\Request;
|
|||||||
/**
|
/**
|
||||||
* Trait ConvertAPIDataTypes
|
* Trait ConvertAPIDataTypes
|
||||||
*/
|
*/
|
||||||
trait ConvertAPIDataTypes
|
trait ConvertAPIDataTypes {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
@@ -63,7 +63,8 @@ class AccountSearch implements GenericSearchInterface
|
|||||||
$searchQuery = $this->user->accounts()
|
$searchQuery = $this->user->accounts()
|
||||||
->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id')
|
->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id')
|
||||||
->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')
|
->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')
|
||||||
->whereIn('account_types.type', $this->types);
|
->whereIn('account_types.type', $this->types)
|
||||||
|
;
|
||||||
$like = sprintf('%%%s%%', $this->query);
|
$like = sprintf('%%%s%%', $this->query);
|
||||||
$originalQuery = $this->query;
|
$originalQuery = $this->query;
|
||||||
|
|
||||||
@@ -134,7 +135,7 @@ class AccountSearch implements GenericSearchInterface
|
|||||||
$this->types = $types;
|
$this->types = $types;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUser(null | Authenticatable | User $user): void
|
public function setUser(null|Authenticatable|User $user): void
|
||||||
{
|
{
|
||||||
if ($user instanceof User) {
|
if ($user instanceof User) {
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
@@ -57,8 +57,6 @@ use Gdbots\QueryParser\Node\Word;
|
|||||||
use Gdbots\QueryParser\QueryParser;
|
use Gdbots\QueryParser\QueryParser;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use LogicException;
|
|
||||||
use TypeError;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class OperatorQuerySearch
|
* Class OperatorQuerySearch
|
||||||
@@ -151,7 +149,7 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$query1 = $parser->parse($query);
|
$query1 = $parser->parse($query);
|
||||||
} catch (LogicException | TypeError $e) {
|
} catch (\LogicException|\TypeError $e) {
|
||||||
app('log')->error($e->getMessage());
|
app('log')->error($e->getMessage());
|
||||||
app('log')->error(sprintf('Could not parse search: "%s".', $query));
|
app('log')->error(sprintf('Could not parse search: "%s".', $query));
|
||||||
|
|
||||||
|
@@ -24,18 +24,12 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Support;
|
namespace FireflyIII\Support;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
|
||||||
use Exception;
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use stdClass;
|
|
||||||
use Str;
|
|
||||||
use ValueError;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Steam.
|
* Class Steam.
|
||||||
@@ -55,6 +49,7 @@ class Steam
|
|||||||
if (null === $result) {
|
if (null === $result) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TransactionCurrency::find((int) $result->data);
|
return TransactionCurrency::find((int) $result->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +67,6 @@ class Steam
|
|||||||
return $sum;
|
return $sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function finalAccountBalanceInRange(Account $account, Carbon $start, Carbon $end): array
|
public function finalAccountBalanceInRange(Account $account, Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
// expand period.
|
// expand period.
|
||||||
@@ -117,12 +111,13 @@ class Steam
|
|||||||
[ // @phpstan-ignore-line
|
[ // @phpstan-ignore-line
|
||||||
'transaction_journals.date',
|
'transaction_journals.date',
|
||||||
'transactions.transaction_currency_id',
|
'transactions.transaction_currency_id',
|
||||||
DB::raw('SUM(transactions.amount) AS modified'),
|
\DB::raw('SUM(transactions.amount) AS modified'),
|
||||||
'transactions.foreign_currency_id',
|
'transactions.foreign_currency_id',
|
||||||
DB::raw('SUM(transactions.foreign_amount) AS modified_foreign'),
|
\DB::raw('SUM(transactions.foreign_amount) AS modified_foreign'),
|
||||||
DB::raw('SUM(transactions.native_amount) AS modified_native'),
|
\DB::raw('SUM(transactions.native_amount) AS modified_native'),
|
||||||
]
|
]
|
||||||
);
|
)
|
||||||
|
;
|
||||||
|
|
||||||
$currentBalance = $startBalance;
|
$currentBalance = $startBalance;
|
||||||
|
|
||||||
@@ -159,11 +154,13 @@ class Steam
|
|||||||
return $balances;
|
return $balances;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function finalAccountsBalance(Collection $accounts, Carbon $date): array {
|
public function finalAccountsBalance(Collection $accounts, Carbon $date): array
|
||||||
|
{
|
||||||
$balances = [];
|
$balances = [];
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
$balances[$account->id] = $this->finalAccountBalance($account, $date);
|
$balances[$account->id] = $this->finalAccountBalance($account, $date);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $balances;
|
return $balances;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,10 +183,10 @@ class Steam
|
|||||||
// Log::debug(sprintf('Trying bcround("%s",%d)', $number, $precision));
|
// Log::debug(sprintf('Trying bcround("%s",%d)', $number, $precision));
|
||||||
if (str_contains($number, '.')) {
|
if (str_contains($number, '.')) {
|
||||||
if ('-' !== $number[0]) {
|
if ('-' !== $number[0]) {
|
||||||
return bcadd($number, '0.' . str_repeat('0', $precision) . '5', $precision);
|
return bcadd($number, '0.'.str_repeat('0', $precision).'5', $precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
return bcsub($number, '0.' . str_repeat('0', $precision) . '5', $precision);
|
return bcsub($number, '0.'.str_repeat('0', $precision).'5', $precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $number;
|
return $number;
|
||||||
@@ -261,11 +258,6 @@ class Steam
|
|||||||
* THAT currency.
|
* THAT currency.
|
||||||
* "native_balance" the balance according to the "native_amount" + "native_foreign_amount" fields.
|
* "native_balance" the balance according to the "native_amount" + "native_foreign_amount" fields.
|
||||||
* "ABC" the balance in this particular currency code (may repeat for each found currency).
|
* "ABC" the balance in this particular currency code (may repeat for each found currency).
|
||||||
*
|
|
||||||
* @param Account $account
|
|
||||||
* @param Carbon $date
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function finalAccountBalance(Account $account, Carbon $date): array
|
public function finalAccountBalance(Account $account, Carbon $date): array
|
||||||
{
|
{
|
||||||
@@ -280,7 +272,8 @@ class Steam
|
|||||||
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||||
->where('transaction_journals.date', '<=', $date->format('Y-m-d H:i:s'))
|
->where('transaction_journals.date', '<=', $date->format('Y-m-d H:i:s'))
|
||||||
->where('transactions.transaction_currency_id', $currency->id)
|
->where('transactions.transaction_currency_id', $currency->id)
|
||||||
->get(['transactions.amount'])->toArray();
|
->get(['transactions.amount'])->toArray()
|
||||||
|
;
|
||||||
$return['balance'] = $this->sumTransactions($array, 'amount');
|
$return['balance'] = $this->sumTransactions($array, 'amount');
|
||||||
Log::debug(sprintf('balance is %s', $return['balance']));
|
Log::debug(sprintf('balance is %s', $return['balance']));
|
||||||
// add virtual balance:
|
// add virtual balance:
|
||||||
@@ -292,7 +285,8 @@ class Steam
|
|||||||
$array = $account->transactions()
|
$array = $account->transactions()
|
||||||
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||||
->where('transaction_journals.date', '<=', $date->format('Y-m-d H:i:s'))
|
->where('transaction_journals.date', '<=', $date->format('Y-m-d H:i:s'))
|
||||||
->get(['transactions.native_amount'])->toArray();
|
->get(['transactions.native_amount'])->toArray()
|
||||||
|
;
|
||||||
$return['native_balance'] = $this->sumTransactions($array, 'native_amount');
|
$return['native_balance'] = $this->sumTransactions($array, 'native_amount');
|
||||||
Log::debug(sprintf('native_balance is %s', $return['native_balance']));
|
Log::debug(sprintf('native_balance is %s', $return['native_balance']));
|
||||||
$return['native_balance'] = bcadd('' === (string) $account->native_virtual_balance ? '0' : $account->native_virtual_balance, $return['balance']);
|
$return['native_balance'] = bcadd('' === (string) $account->native_virtual_balance ? '0' : $account->native_virtual_balance, $return['balance']);
|
||||||
@@ -304,9 +298,11 @@ class Steam
|
|||||||
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||||
->leftJoin('transaction_currencies', 'transaction_currencies.id', '=', 'transactions.transaction_currency_id')
|
->leftJoin('transaction_currencies', 'transaction_currencies.id', '=', 'transactions.transaction_currency_id')
|
||||||
->where('transaction_journals.date', '<=', $date->format('Y-m-d H:i:s'))
|
->where('transaction_journals.date', '<=', $date->format('Y-m-d H:i:s'))
|
||||||
->get(['transaction_currencies.code', 'transactions.amount'])->toArray();
|
->get(['transaction_currencies.code', 'transactions.amount'])->toArray()
|
||||||
|
;
|
||||||
$others = $this->groupAndSumTransactions($array, 'code', 'amount');
|
$others = $this->groupAndSumTransactions($array, 'code', 'amount');
|
||||||
Log::debug('All others are (joined)', $others);
|
Log::debug('All others are (joined)', $others);
|
||||||
|
|
||||||
return array_merge($return, $others);
|
return array_merge($return, $others);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,6 +314,7 @@ class Steam
|
|||||||
$groupKey = $item[$group] ?? 'unknown';
|
$groupKey = $item[$group] ?? 'unknown';
|
||||||
$return[$groupKey] = bcadd($return[$groupKey] ?? '0', $item[$field]);
|
$return[$groupKey] = bcadd($return[$groupKey] ?? '0', $item[$field]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,7 +327,7 @@ class Steam
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$hostName = gethostbyaddr($ipAddress);
|
$hostName = gethostbyaddr($ipAddress);
|
||||||
} catch (Exception $e) {
|
} catch (\Exception $e) {
|
||||||
app('log')->error($e->getMessage());
|
app('log')->error($e->getMessage());
|
||||||
$hostName = $ipAddress;
|
$hostName = $ipAddress;
|
||||||
}
|
}
|
||||||
@@ -349,7 +346,7 @@ class Steam
|
|||||||
$set = auth()->user()->transactions()
|
$set = auth()->user()->transactions()
|
||||||
->whereIn('transactions.account_id', $accounts)
|
->whereIn('transactions.account_id', $accounts)
|
||||||
->groupBy(['transactions.account_id', 'transaction_journals.user_id'])
|
->groupBy(['transactions.account_id', 'transaction_journals.user_id'])
|
||||||
->get(['transactions.account_id', DB::raw('MAX(transaction_journals.date) AS max_date')]) // @phpstan-ignore-line
|
->get(['transactions.account_id', \DB::raw('MAX(transaction_journals.date) AS max_date')]) // @phpstan-ignore-line
|
||||||
;
|
;
|
||||||
|
|
||||||
/** @var Transaction $entry */
|
/** @var Transaction $entry */
|
||||||
@@ -439,7 +436,7 @@ class Steam
|
|||||||
|
|
||||||
// URL must not lead to weird pages
|
// URL must not lead to weird pages
|
||||||
$forbiddenWords = ['jscript', 'json', 'debug', 'serviceworker', 'offline', 'delete', '/login', '/attachments/view'];
|
$forbiddenWords = ['jscript', 'json', 'debug', 'serviceworker', 'offline', 'delete', '/login', '/attachments/view'];
|
||||||
if (Str::contains($returnUrl, $forbiddenWords)) {
|
if (\Str::contains($returnUrl, $forbiddenWords)) {
|
||||||
$returnUrl = $safeUrl;
|
$returnUrl = $safeUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,7 +534,7 @@ class Steam
|
|||||||
if (-1 === bccomp($amount, '0')) {
|
if (-1 === bccomp($amount, '0')) {
|
||||||
$amount = bcmul($amount, '-1');
|
$amount = bcmul($amount, '-1');
|
||||||
}
|
}
|
||||||
} catch (ValueError $e) {
|
} catch (\ValueError $e) {
|
||||||
Log::error(sprintf('ValueError in Steam::positive("%s"): %s', $amount, $e->getMessage()));
|
Log::error(sprintf('ValueError in Steam::positive("%s"): %s', $amount, $e->getMessage()));
|
||||||
Log::error($e->getTraceAsString());
|
Log::error($e->getTraceAsString());
|
||||||
|
|
||||||
|
@@ -24,8 +24,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Support\System;
|
namespace FireflyIII\Support\System;
|
||||||
|
|
||||||
use Artisan;
|
|
||||||
use Crypt;
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use Illuminate\Contracts\Encryption\DecryptException;
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
use Laravel\Passport\Console\KeysCommand;
|
use Laravel\Passport\Console\KeysCommand;
|
||||||
@@ -67,7 +65,7 @@ class OAuthKeys
|
|||||||
try {
|
try {
|
||||||
$privateKey = (string) app('fireflyconfig')->get(self::PRIVATE_KEY)?->data;
|
$privateKey = (string) app('fireflyconfig')->get(self::PRIVATE_KEY)?->data;
|
||||||
$publicKey = (string) app('fireflyconfig')->get(self::PUBLIC_KEY)?->data;
|
$publicKey = (string) app('fireflyconfig')->get(self::PUBLIC_KEY)?->data;
|
||||||
} catch (ContainerExceptionInterface | FireflyException | NotFoundExceptionInterface $e) {
|
} catch (ContainerExceptionInterface|FireflyException|NotFoundExceptionInterface $e) {
|
||||||
app('log')->error(sprintf('Could not validate keysInDatabase(): %s', $e->getMessage()));
|
app('log')->error(sprintf('Could not validate keysInDatabase(): %s', $e->getMessage()));
|
||||||
app('log')->error($e->getTraceAsString());
|
app('log')->error($e->getTraceAsString());
|
||||||
}
|
}
|
||||||
@@ -89,16 +87,16 @@ class OAuthKeys
|
|||||||
|
|
||||||
public static function generateKeys(): void
|
public static function generateKeys(): void
|
||||||
{
|
{
|
||||||
Artisan::registerCommand(new KeysCommand());
|
\Artisan::registerCommand(new KeysCommand());
|
||||||
Artisan::call('firefly-iii:laravel-passport-keys');
|
\Artisan::call('firefly-iii:laravel-passport-keys');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function storeKeysInDB(): void
|
public static function storeKeysInDB(): void
|
||||||
{
|
{
|
||||||
$private = storage_path('oauth-private.key');
|
$private = storage_path('oauth-private.key');
|
||||||
$public = storage_path('oauth-public.key');
|
$public = storage_path('oauth-public.key');
|
||||||
app('fireflyconfig')->set(self::PRIVATE_KEY, Crypt::encrypt(file_get_contents($private)));
|
app('fireflyconfig')->set(self::PRIVATE_KEY, \Crypt::encrypt(file_get_contents($private)));
|
||||||
app('fireflyconfig')->set(self::PUBLIC_KEY, Crypt::encrypt(file_get_contents($public)));
|
app('fireflyconfig')->set(self::PUBLIC_KEY, \Crypt::encrypt(file_get_contents($public)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,8 +108,8 @@ class OAuthKeys
|
|||||||
$publicKey = (string) app('fireflyconfig')->get(self::PUBLIC_KEY)?->data;
|
$publicKey = (string) app('fireflyconfig')->get(self::PUBLIC_KEY)?->data;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$privateContent = Crypt::decrypt($privateKey);
|
$privateContent = \Crypt::decrypt($privateKey);
|
||||||
$publicContent = Crypt::decrypt($publicKey);
|
$publicContent = \Crypt::decrypt($publicKey);
|
||||||
} catch (DecryptException $e) {
|
} catch (DecryptException $e) {
|
||||||
app('log')->error('Could not decrypt pub/private keypair.');
|
app('log')->error('Could not decrypt pub/private keypair.');
|
||||||
app('log')->error($e->getMessage());
|
app('log')->error($e->getMessage());
|
||||||
|
@@ -78,6 +78,7 @@ class General extends AbstractExtension
|
|||||||
if (!$convertToNative || $currency->code === $native->code) {
|
if (!$convertToNative || $currency->code === $native->code) {
|
||||||
$strings[] = app('amount')->formatAnything($currency, $balance, false);
|
$strings[] = app('amount')->formatAnything($currency, $balance, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ('native_balance' === $key) {
|
if ('native_balance' === $key) {
|
||||||
@@ -85,6 +86,7 @@ class General extends AbstractExtension
|
|||||||
if ($convertToNative) {
|
if ($convertToNative) {
|
||||||
$strings[] = app('amount')->formatAnything($native, $balance, false);
|
$strings[] = app('amount')->formatAnything($native, $balance, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($key !== $currency->code) {
|
if ($key !== $currency->code) {
|
||||||
@@ -108,15 +110,15 @@ class General extends AbstractExtension
|
|||||||
static function (int $size): string {
|
static function (int $size): string {
|
||||||
// less than one GB, more than one MB
|
// less than one GB, more than one MB
|
||||||
if ($size < (1024 * 1024 * 2014) && $size >= (1024 * 1024)) {
|
if ($size < (1024 * 1024 * 2014) && $size >= (1024 * 1024)) {
|
||||||
return round($size / (1024 * 1024), 2) . ' MB';
|
return round($size / (1024 * 1024), 2).' MB';
|
||||||
}
|
}
|
||||||
|
|
||||||
// less than one MB
|
// less than one MB
|
||||||
if ($size < (1024 * 1024)) {
|
if ($size < (1024 * 1024)) {
|
||||||
return round($size / 1024, 2) . ' KB';
|
return round($size / 1024, 2).' KB';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $size . ' bytes';
|
return $size.' bytes';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -282,7 +284,7 @@ class General extends AbstractExtension
|
|||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$route = $args[0]; // name of the route.
|
$route = $args[0]; // name of the route.
|
||||||
|
|
||||||
if (Route::getCurrentRoute()->getName() === $route) {
|
if (\Route::getCurrentRoute()->getName() === $route) {
|
||||||
return 'active';
|
return 'active';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,7 +304,7 @@ class General extends AbstractExtension
|
|||||||
static function (): string {
|
static function (): string {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$route = $args[0]; // name of the route.
|
$route = $args[0]; // name of the route.
|
||||||
$name = Route::getCurrentRoute()->getName() ?? '';
|
$name = \Route::getCurrentRoute()->getName() ?? '';
|
||||||
if (str_contains($name, $route)) {
|
if (str_contains($name, $route)) {
|
||||||
return 'active';
|
return 'active';
|
||||||
}
|
}
|
||||||
@@ -326,7 +328,7 @@ class General extends AbstractExtension
|
|||||||
|
|
||||||
if ($objectType === $activeObjectType
|
if ($objectType === $activeObjectType
|
||||||
&& false !== stripos(
|
&& false !== stripos(
|
||||||
Route::getCurrentRoute()->getName(),
|
\Route::getCurrentRoute()->getName(),
|
||||||
$route
|
$route
|
||||||
)) {
|
)) {
|
||||||
return 'active';
|
return 'active';
|
||||||
@@ -349,7 +351,7 @@ class General extends AbstractExtension
|
|||||||
static function (): string {
|
static function (): string {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$route = $args[0]; // name of the route.
|
$route = $args[0]; // name of the route.
|
||||||
$name = Route::getCurrentRoute()->getName() ?? '';
|
$name = \Route::getCurrentRoute()->getName() ?? '';
|
||||||
if (str_contains($name, $route)) {
|
if (str_contains($name, $route)) {
|
||||||
return 'menu-open';
|
return 'menu-open';
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Support\Twig;
|
namespace FireflyIII\Support\Twig;
|
||||||
|
|
||||||
use Config;
|
|
||||||
use Twig\Extension\AbstractExtension;
|
use Twig\Extension\AbstractExtension;
|
||||||
use Twig\TwigFunction;
|
use Twig\TwigFunction;
|
||||||
|
|
||||||
@@ -64,7 +63,7 @@ class Rule extends AbstractExtension
|
|||||||
$possibleTriggers = [];
|
$possibleTriggers = [];
|
||||||
foreach ($ruleTriggers as $key) {
|
foreach ($ruleTriggers as $key) {
|
||||||
if ('user_action' !== $key) {
|
if ('user_action' !== $key) {
|
||||||
$possibleTriggers[$key] = (string) trans('firefly.rule_trigger_' . $key . '_choice');
|
$possibleTriggers[$key] = (string) trans('firefly.rule_trigger_'.$key.'_choice');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($ruleTriggers);
|
unset($ruleTriggers);
|
||||||
@@ -81,10 +80,10 @@ class Rule extends AbstractExtension
|
|||||||
'allRuleActions',
|
'allRuleActions',
|
||||||
static function () {
|
static function () {
|
||||||
// array of valid values for actions
|
// array of valid values for actions
|
||||||
$ruleActions = array_keys(Config::get('firefly.rule-actions'));
|
$ruleActions = array_keys(\Config::get('firefly.rule-actions'));
|
||||||
$possibleActions = [];
|
$possibleActions = [];
|
||||||
foreach ($ruleActions as $key) {
|
foreach ($ruleActions as $key) {
|
||||||
$possibleActions[$key] = (string) trans('firefly.rule_action_' . $key . '_choice');
|
$possibleActions[$key] = (string) trans('firefly.rule_action_'.$key.'_choice');
|
||||||
}
|
}
|
||||||
unset($ruleActions);
|
unset($ruleActions);
|
||||||
asort($possibleActions);
|
asort($possibleActions);
|
||||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Support\Twig;
|
namespace FireflyIII\Support\Twig;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
@@ -224,11 +223,12 @@ class TransactionGroupTwig extends AbstractExtension
|
|||||||
return new TwigFunction(
|
return new TwigFunction(
|
||||||
'journalHasMeta',
|
'journalHasMeta',
|
||||||
static function (int $journalId, string $metaField) {
|
static function (int $journalId, string $metaField) {
|
||||||
$count = DB::table('journal_meta')
|
$count = \DB::table('journal_meta')
|
||||||
->where('name', $metaField)
|
->where('name', $metaField)
|
||||||
->where('transaction_journal_id', $journalId)
|
->where('transaction_journal_id', $journalId)
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->count();
|
->count()
|
||||||
|
;
|
||||||
|
|
||||||
return 1 === $count;
|
return 1 === $count;
|
||||||
}
|
}
|
||||||
@@ -241,11 +241,12 @@ class TransactionGroupTwig extends AbstractExtension
|
|||||||
'journalGetMetaDate',
|
'journalGetMetaDate',
|
||||||
static function (int $journalId, string $metaField) {
|
static function (int $journalId, string $metaField) {
|
||||||
/** @var null|TransactionJournalMeta $entry */
|
/** @var null|TransactionJournalMeta $entry */
|
||||||
$entry = DB::table('journal_meta')
|
$entry = \DB::table('journal_meta')
|
||||||
->where('name', $metaField)
|
->where('name', $metaField)
|
||||||
->where('transaction_journal_id', $journalId)
|
->where('transaction_journal_id', $journalId)
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
if (null === $entry) {
|
if (null === $entry) {
|
||||||
return today(config('app.timezone'));
|
return today(config('app.timezone'));
|
||||||
}
|
}
|
||||||
@@ -261,11 +262,12 @@ class TransactionGroupTwig extends AbstractExtension
|
|||||||
'journalGetMetaField',
|
'journalGetMetaField',
|
||||||
static function (int $journalId, string $metaField) {
|
static function (int $journalId, string $metaField) {
|
||||||
/** @var null|TransactionJournalMeta $entry */
|
/** @var null|TransactionJournalMeta $entry */
|
||||||
$entry = DB::table('journal_meta')
|
$entry = \DB::table('journal_meta')
|
||||||
->where('name', $metaField)
|
->where('name', $metaField)
|
||||||
->where('transaction_journal_id', $journalId)
|
->where('transaction_journal_id', $journalId)
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->first();
|
->first()
|
||||||
|
;
|
||||||
if (null === $entry) {
|
if (null === $entry) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@@ -14,17 +14,14 @@
|
|||||||
"/public/v1/js/app.js.LICENSE.txt": "/public/v1/js/app.js.LICENSE.txt",
|
"/public/v1/js/app.js.LICENSE.txt": "/public/v1/js/app.js.LICENSE.txt",
|
||||||
"/public/v1/js/app_vue.js": "/public/v1/js/app_vue.js",
|
"/public/v1/js/app_vue.js": "/public/v1/js/app_vue.js",
|
||||||
"/public/v1/js/app_vue.js.LICENSE.txt": "/public/v1/js/app_vue.js.LICENSE.txt",
|
"/public/v1/js/app_vue.js.LICENSE.txt": "/public/v1/js/app_vue.js.LICENSE.txt",
|
||||||
"/public/v1/js/create.js": "/public/v1/js/create.js",
|
|
||||||
"/public/v1/js/create.js.LICENSE.txt": "/public/v1/js/create.js.LICENSE.txt",
|
|
||||||
"/public/v1/js/create_transaction.js": "/public/v1/js/create_transaction.js",
|
"/public/v1/js/create_transaction.js": "/public/v1/js/create_transaction.js",
|
||||||
"/public/v1/js/create_transaction.js.LICENSE.txt": "/public/v1/js/create_transaction.js.LICENSE.txt",
|
"/public/v1/js/create_transaction.js.LICENSE.txt": "/public/v1/js/create_transaction.js.LICENSE.txt",
|
||||||
"/public/v1/js/edit.js": "/public/v1/js/edit.js",
|
|
||||||
"/public/v1/js/edit.js.LICENSE.txt": "/public/v1/js/edit.js.LICENSE.txt",
|
|
||||||
"/public/v1/js/edit_transaction.js": "/public/v1/js/edit_transaction.js",
|
"/public/v1/js/edit_transaction.js": "/public/v1/js/edit_transaction.js",
|
||||||
"/public/v1/js/edit_transaction.js.LICENSE.txt": "/public/v1/js/edit_transaction.js.LICENSE.txt",
|
"/public/v1/js/edit_transaction.js.LICENSE.txt": "/public/v1/js/edit_transaction.js.LICENSE.txt",
|
||||||
"/public/v1/js/exchange-rates/index.js": "/public/v1/js/exchange-rates/index.js",
|
"/public/v1/js/exchange-rates/index.js": "/public/v1/js/exchange-rates/index.js",
|
||||||
"/public/v1/js/exchange-rates/index.js.LICENSE.txt": "/public/v1/js/exchange-rates/index.js.LICENSE.txt",
|
"/public/v1/js/exchange-rates/index.js.LICENSE.txt": "/public/v1/js/exchange-rates/index.js.LICENSE.txt",
|
||||||
"/public/v1/js/exchange-rates/rates.js": "/public/v1/js/exchange-rates/rates.js",
|
"/public/v1/js/exchange-rates/rates.js": "/public/v1/js/exchange-rates/rates.js",
|
||||||
|
"/public/v1/js/exchange-rates/rates.js.LICENSE.txt": "/public/v1/js/exchange-rates/rates.js.LICENSE.txt",
|
||||||
"/public/v1/js/ff/accounts/create.js": "/public/v1/js/ff/accounts/create.js",
|
"/public/v1/js/ff/accounts/create.js": "/public/v1/js/ff/accounts/create.js",
|
||||||
"/public/v1/js/ff/accounts/edit-reconciliation.js": "/public/v1/js/ff/accounts/edit-reconciliation.js",
|
"/public/v1/js/ff/accounts/edit-reconciliation.js": "/public/v1/js/ff/accounts/edit-reconciliation.js",
|
||||||
"/public/v1/js/ff/accounts/edit.js": "/public/v1/js/ff/accounts/edit.js",
|
"/public/v1/js/ff/accounts/edit.js": "/public/v1/js/ff/accounts/edit.js",
|
||||||
@@ -93,8 +90,6 @@
|
|||||||
"/public/v1/js/ff/transactions/mass/edit-bulk.js": "/public/v1/js/ff/transactions/mass/edit-bulk.js",
|
"/public/v1/js/ff/transactions/mass/edit-bulk.js": "/public/v1/js/ff/transactions/mass/edit-bulk.js",
|
||||||
"/public/v1/js/ff/transactions/mass/edit.js": "/public/v1/js/ff/transactions/mass/edit.js",
|
"/public/v1/js/ff/transactions/mass/edit.js": "/public/v1/js/ff/transactions/mass/edit.js",
|
||||||
"/public/v1/js/ff/transactions/show.js": "/public/v1/js/ff/transactions/show.js",
|
"/public/v1/js/ff/transactions/show.js": "/public/v1/js/ff/transactions/show.js",
|
||||||
"/public/v1/js/index.js": "/public/v1/js/index.js",
|
|
||||||
"/public/v1/js/index.js.LICENSE.txt": "/public/v1/js/index.js.LICENSE.txt",
|
|
||||||
"/public/v1/js/lib/Chart.bundle.min.js": "/public/v1/js/lib/Chart.bundle.min.js",
|
"/public/v1/js/lib/Chart.bundle.min.js": "/public/v1/js/lib/Chart.bundle.min.js",
|
||||||
"/public/v1/js/lib/accounting.min.js": "/public/v1/js/lib/accounting.min.js",
|
"/public/v1/js/lib/accounting.min.js": "/public/v1/js/lib/accounting.min.js",
|
||||||
"/public/v1/js/lib/bootstrap-multiselect.js": "/public/v1/js/lib/bootstrap-multiselect.js",
|
"/public/v1/js/lib/bootstrap-multiselect.js": "/public/v1/js/lib/bootstrap-multiselect.js",
|
||||||
@@ -153,8 +148,6 @@
|
|||||||
"/public/v1/js/lib/vue.js": "/public/v1/js/lib/vue.js",
|
"/public/v1/js/lib/vue.js": "/public/v1/js/lib/vue.js",
|
||||||
"/public/v1/js/profile.js": "/public/v1/js/profile.js",
|
"/public/v1/js/profile.js": "/public/v1/js/profile.js",
|
||||||
"/public/v1/js/profile.js.LICENSE.txt": "/public/v1/js/profile.js.LICENSE.txt",
|
"/public/v1/js/profile.js.LICENSE.txt": "/public/v1/js/profile.js.LICENSE.txt",
|
||||||
"/public/v1/js/show.js": "/public/v1/js/show.js",
|
|
||||||
"/public/v1/js/show.js.LICENSE.txt": "/public/v1/js/show.js.LICENSE.txt",
|
|
||||||
"/public/v1/js/webhooks/create.js": "/public/v1/js/webhooks/create.js",
|
"/public/v1/js/webhooks/create.js": "/public/v1/js/webhooks/create.js",
|
||||||
"/public/v1/js/webhooks/create.js.LICENSE.txt": "/public/v1/js/webhooks/create.js.LICENSE.txt",
|
"/public/v1/js/webhooks/create.js.LICENSE.txt": "/public/v1/js/webhooks/create.js.LICENSE.txt",
|
||||||
"/public/v1/js/webhooks/edit.js": "/public/v1/js/webhooks/edit.js",
|
"/public/v1/js/webhooks/edit.js": "/public/v1/js/webhooks/edit.js",
|
||||||
|
@@ -136,9 +136,9 @@
|
|||||||
"exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",
|
"exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",
|
||||||
"header_exchange_rates_rates": "Wechselkurse",
|
"header_exchange_rates_rates": "Wechselkurse",
|
||||||
"header_exchange_rates_table": "Tabelle mit Wechselkursen",
|
"header_exchange_rates_table": "Tabelle mit Wechselkursen",
|
||||||
"help_rate_form": "On this day, how many {to} will you get for one {from}?",
|
"help_rate_form": "An diesem Tag, wie viele {to} werden Sie f\u00fcr einen {from} bekommen?",
|
||||||
"add_new_rate": "Add a new exchange rate",
|
"add_new_rate": "Neuen Wechselkurs hinzuf\u00fcgen",
|
||||||
"save_new_rate": "Save new rate"
|
"save_new_rate": "Neuen Kurs speichern"
|
||||||
},
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
"webhook_delivery": "Zustellung",
|
"webhook_delivery": "Zustellung",
|
||||||
"from_currency_to_currency": "{from} → {to}",
|
"from_currency_to_currency": "{from} → {to}",
|
||||||
"to_currency_from_currency": "{to} → {from}",
|
"to_currency_from_currency": "{to} → {from}",
|
||||||
"rate": "Rate"
|
"rate": "Kurs"
|
||||||
},
|
},
|
||||||
"list": {
|
"list": {
|
||||||
"active": "Aktiv?",
|
"active": "Aktiv?",
|
||||||
|
@@ -130,15 +130,15 @@
|
|||||||
"response": "Odpowied\u017a",
|
"response": "Odpowied\u017a",
|
||||||
"visit_webhook_url": "Odwied\u017a adres URL webhooka",
|
"visit_webhook_url": "Odwied\u017a adres URL webhooka",
|
||||||
"reset_webhook_secret": "Resetuj sekret webhooka",
|
"reset_webhook_secret": "Resetuj sekret webhooka",
|
||||||
"header_exchange_rates": "Exchange rates",
|
"header_exchange_rates": "Kursy wymiany",
|
||||||
"exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",
|
"exchange_rates_intro": "Firefly III obs\u0142uguje pobieranie i korzystanie z kurs\u00f3w wymiany walut. Wi\u0119cej informacji na ten temat w <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">dokumentacji<\/a>.",
|
||||||
"exchange_rates_from_to": "Between {from} and {to} (and the other way around)",
|
"exchange_rates_from_to": "Pomi\u0119dzy {from} i {to} (i odwrotnie)",
|
||||||
"exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",
|
"exchange_rates_intro_rates": "Firefly III bla bla bla kurs wymiany. Odwrotno\u015b\u0107 jest obliczana automatycznie, je\u015bli nie zosta\u0142a podana. Zostanie u\u017cyty ostatni znaleziony kurs.",
|
||||||
"header_exchange_rates_rates": "Exchange rates",
|
"header_exchange_rates_rates": "Kursy wymiany",
|
||||||
"header_exchange_rates_table": "Table with exchange rates",
|
"header_exchange_rates_table": "Tabela z kursami wymiany walut",
|
||||||
"help_rate_form": "On this day, how many {to} will you get for one {from}?",
|
"help_rate_form": "W tym dniu, ile {to} otrzymasz za jeden {from}?",
|
||||||
"add_new_rate": "Add a new exchange rate",
|
"add_new_rate": "Dodaj nowy kurs wymiany",
|
||||||
"save_new_rate": "Save new rate"
|
"save_new_rate": "Zapisz nowy kurs"
|
||||||
},
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
"webhook_delivery": "Dor\u0119czenie",
|
"webhook_delivery": "Dor\u0119czenie",
|
||||||
"from_currency_to_currency": "{from} → {to}",
|
"from_currency_to_currency": "{from} → {to}",
|
||||||
"to_currency_from_currency": "{to} → {from}",
|
"to_currency_from_currency": "{to} → {from}",
|
||||||
"rate": "Rate"
|
"rate": "Kurs"
|
||||||
},
|
},
|
||||||
"list": {
|
"list": {
|
||||||
"active": "Jest aktywny?",
|
"active": "Jest aktywny?",
|
||||||
|
Reference in New Issue
Block a user