Merge branch 'release/4.8.3-alpha.1'

This commit is contained in:
James Cole
2019-12-20 06:15:25 +01:00
24 changed files with 1301 additions and 1112 deletions

View File

@@ -18,12 +18,12 @@ mkdir -p $FIREFLY_PATH/storage/framework/views/v2
mkdir -p $FIREFLY_PATH/storage/logs
mkdir -p $FIREFLY_PATH/storage/upload
echo "Touch DB file (if SQLlite)..."
if [[ $DB_CONNECTION == "sqlite" ]]
then
if [[ $DKR_CHECK_SQLITE != "false" ]]; then
echo "Touch DB file (if SQLlite)..."
if [[ $DB_CONNECTION == "sqlite" ]]; then
touch $FIREFLY_PATH/storage/database/database.sqlite
echo "Touched!"
fi
fi
# make sure we own the volumes:
@@ -41,7 +41,7 @@ composer dump-autoload
echo "Discover packages..."
php artisan package:discover
echo "Run various artisan commands..."
echo "Wait for the database."
if [[ -z "$DB_PORT" ]]; then
if [[ $DB_CONNECTION == "pgsql" ]]; then
DB_PORT=5432
@@ -50,60 +50,103 @@ if [[ -z "$DB_PORT" ]]; then
fi
fi
if [[ ! -z "$DB_PORT" ]]; then
$FIREFLY_PATH/.deploy/docker/wait-for-it.sh "${DB_HOST}:${DB_PORT}" -- echo "db is up. Time to execute artisan commands"
$FIREFLY_PATH/.deploy/docker/wait-for-it.sh "${DB_HOST}:${DB_PORT}" -t 60 -- echo "DB is up. Time to execute artisan commands."
fi
#env $(grep -v "^\#" .env | xargs)
echo "Run various artisan commands..."
php artisan cache:clear
php artisan firefly-iii:create-database
php artisan migrate --seed
php artisan firefly-iii:decrypt-all
if [[ $DKR_RUN_MIGRATION == "false" ]]; then
echo "Will NOT run migration commands."
fi
if [[ $DKR_RUN_MIGRATION != "false" ]]; then
php artisan firefly-iii:create-database
php artisan migrate --seed
php artisan firefly-iii:decrypt-all
fi
# there are 13 upgrade commands
php artisan firefly-iii:transaction-identifiers
php artisan firefly-iii:migrate-to-groups
php artisan firefly-iii:account-currencies
php artisan firefly-iii:transfer-currencies
php artisan firefly-iii:other-currencies
php artisan firefly-iii:migrate-notes
php artisan firefly-iii:migrate-attachments
php artisan firefly-iii:bills-to-rules
php artisan firefly-iii:bl-currency
php artisan firefly-iii:cc-liabilities
php artisan firefly-iii:back-to-journals
php artisan firefly-iii:rename-account-meta
php artisan firefly-iii:migrate-recurrence-meta
if [[ $DKR_RUN_UPGRADE == "false" ]]; then
echo 'Will NOT run upgrade commands.'
fi
if [[ $DKR_RUN_UPGRADE != "false" ]]; then
php artisan firefly-iii:transaction-identifiers
php artisan firefly-iii:migrate-to-groups
php artisan firefly-iii:account-currencies
php artisan firefly-iii:transfer-currencies
php artisan firefly-iii:other-currencies
php artisan firefly-iii:migrate-notes
php artisan firefly-iii:migrate-attachments
php artisan firefly-iii:bills-to-rules
php artisan firefly-iii:bl-currency
php artisan firefly-iii:cc-liabilities
php artisan firefly-iii:back-to-journals
php artisan firefly-iii:rename-account-meta
php artisan firefly-iii:migrate-recurrence-meta
fi
# there are 15 verify commands
php artisan firefly-iii:fix-piggies
php artisan firefly-iii:create-link-types
php artisan firefly-iii:create-access-tokens
php artisan firefly-iii:remove-bills
php artisan firefly-iii:enable-currencies
php artisan firefly-iii:fix-transfer-budgets
php artisan firefly-iii:fix-uneven-amount
php artisan firefly-iii:delete-zero-amount
php artisan firefly-iii:delete-orphaned-transactions
php artisan firefly-iii:delete-empty-journals
php artisan firefly-iii:delete-empty-groups
php artisan firefly-iii:fix-account-types
php artisan firefly-iii:rename-meta-fields
php artisan firefly-iii:fix-ob-currencies
php artisan firefly-iii:fix-long-descriptions
if [[ $DKR_RUN_VERIFY == "false" ]]; then
echo 'Will NOT run verify commands.'
fi
if [[ $DKR_RUN_VERIFY != "false" ]]; then
php artisan firefly-iii:fix-piggies
php artisan firefly-iii:create-link-types
php artisan firefly-iii:create-access-tokens
php artisan firefly-iii:remove-bills
php artisan firefly-iii:enable-currencies
php artisan firefly-iii:fix-transfer-budgets
php artisan firefly-iii:fix-uneven-amount
php artisan firefly-iii:delete-zero-amount
php artisan firefly-iii:delete-orphaned-transactions
php artisan firefly-iii:delete-empty-journals
php artisan firefly-iii:delete-empty-groups
php artisan firefly-iii:fix-account-types
php artisan firefly-iii:rename-meta-fields
php artisan firefly-iii:fix-ob-currencies
php artisan firefly-iii:fix-long-descriptions
fi
# report commands
php artisan firefly-iii:report-empty-objects
php artisan firefly-iii:report-sum
if [[ $DKR_RUN_REPORT == "false" ]]; then
echo 'Will NOT run report commands.'
fi
if [[ $DKR_RUN_REPORT != "false" ]]; then
php artisan firefly-iii:report-empty-objects
php artisan firefly-iii:report-sum
fi
php artisan firefly-iii:restore-oauth-keys
if [[ $DKR_RUN_REPORT == "false" ]]; then
echo 'Will NOT generate new OAuth keys.'
fi
if [[ $DKR_RUN_PASSPORT_INSTALL != "false" ]]; then
php artisan passport:install
fi
php artisan firefly-iii:set-latest-version --james-is-cool
php artisan passport:install
php artisan cache:clear
php artisan firefly:instructions install
# make sure we own everything
echo "Run chown on ${FIREFLY_PATH}"
chown -R www-data:www-data -R $FIREFLY_PATH
php artisan firefly:instructions install
echo "DKR_CHECK_SQLITE '$DKR_CHECK_SQLITE'"
echo "DKR_RUN_MIGRATION '$DKR_RUN_MIGRATION'"
echo "DKR_RUN_UPGRADE '$DKR_RUN_UPGRADE'"
echo "DKR_RUN_VERIFY '$DKR_RUN_VERIFY'"
echo "DKR_RUN_REPORT '$DKR_RUN_REPORT'"
echo "DKR_RUN_PASSPORT_INSTALL '$DKR_RUN_PASSPORT_INSTALL'"
echo "Go!"
exec apache2-foreground

View File

@@ -60,6 +60,12 @@ PGSQL_SSL_CRL_FILE=null
CACHE_DRIVER=file
SESSION_DRIVER=file
# If you set either of these to 'redis', you might want to update these settings too
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_DB="0" # always use quotes
REDIS_CACHE_DB="1"
# You can configure another file storage backend if you cannot use the local storage option.
# To set this up, fill in the following variables. The upload path is used to store uploaded
# files and the export path is to store exported data (before download).
@@ -165,15 +171,42 @@ ADLDAP_SYNC_FIELD=userprincipalname
# Organizr. This is at your own risk.
DISABLE_FRAME_HEADER=false
# You can fine tune the start-up of a Docker container by editing these environment variables.
# Use this at your own risk. Disabling certain checks and features may result in lost of inconsistent data.
# However if you know what you're doing you can significantly speed up container start times.
# Set each value to true to enable, or false to disable.
# Check if the SQLite database exists. Can be skipped if you're not using SQLite.
# Won't significantly speed up things.
DKR_CHECK_SQLITE=true
# Run database creation and migration commands. Disable this only if you're 100% sure the DB exists
# and is up to date.
DKR_RUN_MIGRATION=true
# Run database upgrade commands. Disable this only when you're 100% sure your DB is up-to-date
# with the latest fixes (outside of migrations!)
DKR_RUN_UPGRADE=true
# Verify database integrity. Includes all data checks and verifications.
# Disabling this makes Firefly III assume your DB is intact.
DKR_RUN_VERIFY=true
# Run database reporting commands. When disabled, Firefly III won't go over your data to report current state.
# Disabling this should have no impact on data integrity or safety but it won't warn you of possible issues.
DKR_RUN_REPORT=true
# Generate OAuth2 keys.
# When disabled, Firefly III won't attempt to generate OAuth2 Passport keys. This won't be an issue, IFF (if and only if)
# you had previously generated keys already and they're stored in your database for restauration.
DKR_RUN_PASSPORT_INSTALL=true
# Leave the following configuration vars as is.
# Unless you like to tinker and know what you're doing.
APP_NAME=FireflyIII
ADLDAP_CONNECTION=default
BROADCAST_DRIVER=log
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
CACHE_PREFIX=firefly
SEARCH_RESULT_LIMIT=50
PUSHER_KEY=

View File

@@ -14,21 +14,21 @@ jobs:
include:
- dist: xenial
arch: amd64
env: ARCH=amd64 CHANNEL=stable VERSION=4.8.2
env: ARCH=amd64 CHANNEL=alpha VERSION=4.8.3-alpha.1
stage: build
script: ./.deploy/docker/travis.sh
- dist: xenial
arch: amd64
env: ARCH=arm CHANNEL=stable VERSION=4.8.2
env: ARCH=arm CHANNEL=alpha VERSION=4.8.3-alpha.1
stage: build
script: ./.deploy/docker/travis.sh
- dist: xenial
arch: arm64
env: ARCH=arm64 CHANNEL=stable VERSION=4.8.2
env: ARCH=arm64 CHANNEL=alpha VERSION=4.8.3-alpha.1
stage: build
script: ./.deploy/docker/travis.sh
- dist: xenial
arch: amd64
env: CHANNEL=stable VERSION=4.8.2
env: CHANNEL=alpha VERSION=4.8.3-alpha.1
stage: manifest
script: ./.deploy/docker/manifest.sh

View File

@@ -3,7 +3,7 @@ FROM jc5x/firefly-iii-base-image:latest
# See also: https://github.com/JC5/firefly-iii-base-image
ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1
LABEL version="1.5" maintainer="thegrumpydictator@gmail.com"
LABEL version="1.6" maintainer="thegrumpydictator@gmail.com"
# Create volumes
VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload

View File

@@ -3,7 +3,7 @@ FROM jc5x/firefly-iii-base-image:latest
# See also: https://github.com/JC5/firefly-iii-base-image
ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1
LABEL version="1.5" maintainer="thegrumpydictator@gmail.com"
LABEL version="1.6" maintainer="thegrumpydictator@gmail.com"
# Create volumes
VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload

View File

@@ -3,7 +3,7 @@ FROM jc5x/firefly-iii-base-image:latest-arm
# See also: https://github.com/JC5/firefly-iii-base-image
ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1
LABEL version="1.5" maintainer="thegrumpydictator@gmail.com"
LABEL version="1.6" maintainer="thegrumpydictator@gmail.com"
# Create volumes
VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload

View File

@@ -3,7 +3,7 @@ FROM jc5x/firefly-iii-base-image:latest-arm
# See also: https://github.com/JC5/firefly-iii-base-image
ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1
LABEL version="1.5" maintainer="thegrumpydictator@gmail.com"
LABEL version="1.6" maintainer="thegrumpydictator@gmail.com"
# Create volumes
VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload

View File

@@ -144,11 +144,17 @@ class ShowController extends Controller
public function show(Request $request, Budget $budget)
{
/** @var Carbon $start */
$start = session('first', Carbon::now()->startOfYear());
$end = new Carbon;
$allStart = session('first', Carbon::now()->startOfYear());
$allEnd = new Carbon;
// use session range:
$start = session('start');
$end = session('end');
$page = (int)$request->get('page');
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
$limits = $this->getLimits($budget, $start, $end);
$limits = $this->getLimits($budget, $allStart, $allEnd);
$repetition = null;
// collector:

View File

@@ -55,12 +55,26 @@ class Controller extends BaseController
public function __construct()
{
// is site a demo site?
$isDemoSite = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site', ), )->data;
app('view')->share('IS_DEMO_SITE', $isDemoSite, );
$isDemoSite = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site',),)->data;
app('view')->share('IS_DEMO_SITE', $isDemoSite,);
app('view')->share('DEMO_USERNAME', config('firefly.demo_username'));
app('view')->share('DEMO_PASSWORD', config('firefly.demo_password'));
app('view')->share('FF_VERSION', config('firefly.version'));
// share is alpha, is beta
$isAlpha = false;
if (false !== strpos(config('firefly.version'), 'alpha')) {
$isAlpha = true;
}
$isBeta = false;
if (false !== strpos(config('firefly.version'), 'beta')) {
$isBeta = true;
}
app('view')->share('FF_IS_ALPHA', $isAlpha);
app('view')->share('FF_IS_BETA', $isBeta);
$this->middleware(
function ($request, $next) {
// translations for specific strings:

View File

@@ -50,6 +50,7 @@ class BankDebitCredit implements ConverterInterface
'Af', // ING (NL).
'Debet', // Triodos (NL)
'S', // "Soll", German term for debit
'Debit', // Community America (US)
];
if (in_array(trim($value), $negative, true)) {
return -1;

View File

@@ -228,16 +228,20 @@ class AccountForm
// get all asset accounts:
$repository = $this->getAccountRepository();
$types = [AccountType::ASSET, AccountType::DEFAULT];
$types = [AccountType::ASSET, AccountType::DEFAULT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::DEBT];
$assetAccounts = $repository->getAccountsByType($types);
$grouped = [];
// group accounts:
/** @var Account $account */
foreach ($assetAccounts as $account) {
$role = $repository->getMetaValue($account, 'account_role');
if (null === $role) {
if (null === $role && in_array($account->accountType->type, [AccountType::LOAN, AccountType::MORTGAGE, AccountType::DEBT], true)) {
$role = sprintf('l_%s', $account->accountType->type);
}
if (null === $role && !in_array($account->accountType->type, [AccountType::LOAN, AccountType::MORTGAGE, AccountType::DEBT], true)) {
$role = 'no_account_type';
}
$key = (string)trans(sprintf('firefly.opt_group_%s', $role));
$grouped[$key][$account->id] = $account->name;
}

View File

@@ -166,68 +166,6 @@ trait UserNavigation
Log::debug(sprintf('Return direct link %s', $uri));
return $uri;
}
//
// /**
// * Redirect to asset account that transaction belongs to.
// *
// * @param TransactionGroup $group
// *
// * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
// * @codeCoverageIgnore
// */
// protected function redirectToAccount(TransactionGroup $group)
// {
// $journals = $group->transactionJournals;
// $first = $journals->first();
//
// if (null === $first) {
// return redirect(route('index'));
// }
//
// $valid = [AccountType::DEFAULT, AccountType::ASSET];
// $transactions = $journal->transactions;
// /** @var Transaction $transaction */
// foreach ($transactions as $transaction) {
// $account = $transaction->account;
// if (in_array($account->accountType->type, $valid, true)) {
// return redirect(route('accounts.show', [$account->id]));
// }
// }
// // @codeCoverageIgnoreStart
// session()->flash('error', (string)trans('firefly.cannot_redirect_to_account'));
//
// return redirect(route('index'));
// // @codeCoverageIgnoreEnd
// }
//
// /**
// * @param Account $account
// *
// * @return RedirectResponse|\Illuminate\Routing\Redirector
// * @codeCoverageIgnore
// */
// protected function redirectToOriginalAccount(Account $account)
// {
// /** @var Transaction $transaction */
// $transaction = $account->transactions()->first();
// if (null === $transaction) {
// app('session')->flash('error', trans('firefly.account_missing_transaction', ['name' => e($account->name), 'id' => $account->id]));
// Log::error(sprintf('Expected a transaction. Account #%d has none. BEEP, error.', $account->id));
//
// return redirect(route('index'));
// }
//
// $journal = $transaction->transactionJournal;
// /** @var Transaction $opposingTransaction */
// $opposingTransaction = $journal->transactions()->where('transactions.id', '!=', $transaction->id)->first();
//
// if (null === $opposingTransaction) {
// app('session')->flash('error', trans('firefly.account_missing_transaction', ['name' => e($account->name), 'id' => $account->id]));
// Log::error(sprintf('Expected an opposing transaction. Account #%d has none. BEEP, error.', $account->id));
// }
//
// return redirect(route('accounts.show', [$opposingTransaction->account_id]));
// }
/**
* @param string $identifier
@@ -236,12 +174,12 @@ trait UserNavigation
*/
protected function rememberPreviousUri(string $identifier): ?string
{
$return = null;
$return = app('url')->previous();
/** @var ViewErrorBag $errors */
$errors = session()->get('errors');
$forbidden = ['json'];
if ((null === $errors || (null !== $errors && 0 === $errors->count())) && !Str::contains($return, $forbidden)) {
$return = app('url')->previous();
Log::debug(sprintf('Saving URL %s under key %s', $return, $identifier));
session()->put($identifier, $return);
}
return $return;

View File

@@ -62,6 +62,7 @@ class BillTransformer extends AbstractTransformer
{
$paidData = $this->paidData($bill);
$payDates = $this->payDates($bill);
$currency = $bill->transactionCurrency;
$notes = $this->repository->getNoteText($bill);
$notes = '' === $notes ? null : $notes;
@@ -132,10 +133,18 @@ class BillTransformer extends AbstractTransformer
*/
protected function nextDateMatch(Bill $bill, Carbon $date): Carbon
{
Log::debug(sprintf('Now in nextDateMatch(%d, %s)', $bill->id, $date->format('Y-m-d')));
$start = clone $bill->date;
Log::debug(sprintf('Bill start date is %s', $start->format('Y-m-d')));
while ($start < $date) {
Log::debug(
sprintf(
'%s (bill start date) < %s (given date) so we jump ahead one period (with a skip maybe).', $start->format('Y-m-d'), $date->format('Y-m-d')
)
);
$start = app('navigation')->addPeriod($start, $bill->repeat_freq, $bill->skip);
}
Log::debug(sprintf('End of loop, bill start date is now %s', $start->format('Y-m-d')));
return $start;
}
@@ -194,22 +203,48 @@ class BillTransformer extends AbstractTransformer
*/
protected function payDates(Bill $bill): array
{
$this->parameters->set('start', Carbon::create(2019, 11, 1));
$this->parameters->set('end', Carbon::create(2019, 11, 30));
Log::debug(sprintf('Now in payDates() for bill #%d', $bill->id));
if (null === $this->parameters->get('start') || null === $this->parameters->get('end')) {
Log::debug('No start or end date, give empty array.');
return [];
}
Log::debug(
sprintf(
'Start date is %s, end is %s', $this->parameters->get('start')->format('Y-m-d'),
$this->parameters->get('end')->format('Y-m-d')
)
);
$set = new Collection;
$currentStart = clone $this->parameters->get('start');
$loop = 0;
while ($currentStart <= $this->parameters->get('end')) {
Log::debug(
sprintf(
'In loop #%d, where %s (start param) <= %s (end param).', $loop, $currentStart->format('Y-m-d'),
$this->parameters->get('end')->format('Y-m-d')
)
);
$nextExpectedMatch = $this->nextDateMatch($bill, $currentStart);
Log::debug(sprintf('Next expected match is %s', $nextExpectedMatch->format('Y-m-d')));
// If nextExpectedMatch is after end, we continue:
if ($nextExpectedMatch > $this->parameters->get('end')) {
Log::debug(
sprintf('%s is > %s, so were not going to use it.', $nextExpectedMatch->format('Y-m-d'), $this->parameters->get('end')->format('Y-m-d'))
);
break;
}
// add to set
$set->push(clone $nextExpectedMatch);
Log::debug(sprintf('Add next expected match to set because its in the current start/end range, which now contains %d item(s)', $set->count()));
$nextExpectedMatch->addDay();
$currentStart = clone $nextExpectedMatch;
$loop++;
}
Log::debug(sprintf('Loop has ended after %d loops', $loop));
$simple = $set->map(
static function (Carbon $date) {
return $date->format('Y-m-d');

View File

@@ -2,14 +2,26 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [4.8.2 (API 0.10.5)] - 2019-11-28
## [4.8.3 (API 0.10.5)] - 20xx-xx-xx
### 4.8.3-alpha.1
- #2874
- #2878
- #2876
- Firefly III now supports redis as cache backend.
- Fine tune Docker container startup times using new environment variables.
- #2895
- #2881
- Footer will warn you of alpha and beta versions.
- #2901
## [4.8.2 (API 0.10.5)] - 2019-11-29
After several alpha and beta versions (which were mainly released because I was
farting around with the idea of doing these things) here's the final version
of the latest release, 4.8.2. Several improvements and lots of bug fixes.
## [3.4.2] - 2015-05-25
### Added
- You can now cash out a liability.
- (Better) support for Kubernetes
@@ -22,12 +34,6 @@ of the latest release, 4.8.2. Several improvements and lots of bug fixes.
- Firefly III will use version.firefly-iii.org to check what the latest version is.
- Firefly III is now built for ARM, ARM64 and AMD64 in one Docker build.
### Deprecated
- Initial release.
### Removed
- Initial release.
### Fixed
- [Issue 2783](https://github.com/firefly-iii/firefly-iii/issues/2783) Fixes issues with SQLite databases.
- [Issue 2774](https://github.com/firefly-iii/firefly-iii/issues/2774) Bad redirect when using exotic ports.
@@ -51,14 +57,9 @@ of the latest release, 4.8.2. Several improvements and lots of bug fixes.
- [Issue 2852](https://github.com/firefly-iii/firefly-iii/issues/2852) Missing columns from budget overview
- [Issue 2851](https://github.com/firefly-iii/firefly-iii/issues/2851) Missing chart data.
### Security
- Initial release.
### API
- Most API errors now have a number. See [this page](https://docs.firefly-iii.org/support/error_codes) for more details.
## [4.8.2-alpha.1 (API 0.10.5)] - 2019-11-03
Normally I won't be detailling alpha versions in the changelog but this is a

View File

@@ -61,9 +61,10 @@
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-intl": "*",
"ext-session": "*",
"ext-json": "*",
"ext-openssl": "*",
"ext-pdo": "*",
"ext-session": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xml": "*",
@@ -74,6 +75,7 @@
"davejamesmiller/laravel-breadcrumbs": "5.*",
"doctrine/dbal": "2.*",
"fideloper/proxy": "4.*",
"jc5/google2fa-laravel": "2.0.3",
"laravel/framework": "5.8.*",
"laravel/passport": "7.*",
"laravelcollective/html": "5.8.*",
@@ -85,10 +87,9 @@
"litipk/flysystem-fallback-adapter": "0.*",
"mschindler83/fints-hbci-php": "1.*",
"pragmarx/google2fa": "6.1.3",
"pragmarx/google2fa-laravel": "1.*",
"pragmarx/recovery": "^0.1.0",
"rcrowe/twigbridge": "0.9.*",
"ext-pdo": "*"
"predis/predis": "^1.1",
"rcrowe/twigbridge": "0.9.*"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "2.*",

672
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -21,6 +21,9 @@
declare(strict_types=1);
use Illuminate\Support\Str;
$databaseUrl = getenv('DATABASE_URL');
$host = '';
@@ -90,15 +93,36 @@ return [
],
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'client' => 'predis',
'client' => env('REDIS_CLIENT', 'predis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'predis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', '1'),
],
],
];

View File

@@ -125,7 +125,7 @@ return [
'is_demo_site' => false,
],
'encryption' => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true,
'version' => '4.8.2',
'version' => '4.8.3-alpha.1',
'api_version' => '0.10.5',
'db_version' => 11,
'maxUploadSize' => 15242880,

View File

@@ -91,4 +91,7 @@ return [
*/
'throw_exceptions' => true,
'store_in_cookie' => true,
];

2
public/v1/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -623,10 +623,13 @@
}
}
// unique some things
this.transactions[transactionIndex].errors.source_account =
Array.from(new Set(this.transactions[transactionIndex].errors.source_account));
this.transactions[transactionIndex].errors.destination_account =
Array.from(new Set(this.transactions[transactionIndex].errors.destination_account));
if (typeof this.transactions[transactionIndex] !== 'undefined') {
this.transactions[transactionIndex].errors.source_account =
Array.from(new Set(this.transactions[transactionIndex].errors.source_account));
this.transactions[transactionIndex].errors.destination_account =
Array.from(new Set(this.transactions[transactionIndex].errors.destination_account));
}
}
}
},

View File

@@ -121,6 +121,7 @@
</div>
</div>
<div class="col-lg-4">
<!-- -->
<amount
:source="transaction.source_account"
:destination="transaction.destination_account"
@@ -221,6 +222,10 @@
}
return amount;
},
roundNumber(amount, decimals) {
let multiplier = Math.pow(10, decimals);
return Math.round(amount * multiplier) / multiplier;
},
selectedSourceAccount(index, model) {
if (typeof model === 'string') {
// cant change types, only name.
@@ -367,20 +372,20 @@
}
this.transactions.push({
transaction_journal_id: transaction.transaction_journal_id,
description: transaction.description,
date: transaction.date.substr(0, 10),
amount: this.positiveAmount(transaction.amount),
category: transaction.category_name,
errors: {
source_account: [],
destination_account: [],
description: [],
amount: [],
date: [],
budget_id: [],
foreign_amount: [],
category: [],
transaction_journal_id: transaction.transaction_journal_id,
description: transaction.description,
date: transaction.date.substr(0, 10),
amount: this.roundNumber(this.positiveAmount(transaction.amount), transaction.currency_decimal_places),
category: transaction.category_name,
errors: {
source_account: [],
destination_account: [],
description: [],
amount: [],
date: [],
budget_id: [],
foreign_amount: [],
category: [],
piggy_bank: [],
tags: [],
// custom fields:
@@ -409,7 +414,7 @@
notes: transaction.notes
},
foreign_amount: {
amount: this.positiveAmount(transaction.foreign_amount),
amount: this.roundNumber(this.positiveAmount(transaction.foreign_amount), transaction.foreign_currency_decimal_places),
currency_id: transaction.foreign_currency_id
},
source_account: {

View File

@@ -140,7 +140,10 @@
<div class="pull-right hidden-xs">
<b>{{ 'version'|_ }}</b> <a href="{{ route('debug') }}">{{ Config.get('firefly.version') }}</a>
</div>
<strong><a href="https://github.com/firefly-iii/firefly-iii">Firefly III</a></strong> <small class="text-muted">Developed by James Cole, the source code is licensed under the <a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0-or-later</a>.</small>
<strong><a href="https://github.com/firefly-iii/firefly-iii">Firefly III</a></strong>
<small class="text-muted">Developed by James Cole, the source code is licensed under the <a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0-or-later</a>.</small>
{% if FF_IS_ALPHA %}<small class="text-danger"><br>You are running an ALPHA version. Be wary of bugs and issues.</small>{% endif %}
{% if FF_IS_BETA %}<small class="text-warning"><br>You are running an BETA version. Be wary of bugs and issues.</small>{% endif %}
</footer>
{% include('partials.control-bar') %}

1289
yarn.lock

File diff suppressed because it is too large Load Diff