Compare commits

...

24 Commits

Author SHA1 Message Date
James Cole
ef4018934c Merge branch 'release/4.7.1.4' 2018-03-06 05:15:04 +01:00
James Cole
de1fe36226 Fix #1226 2018-03-05 19:56:50 +01:00
James Cole
64fd36d437 Fix #1227 2018-03-05 19:39:41 +01:00
James Cole
6f9ecc0ffa Update version. [skip ci] 2018-03-05 19:37:06 +01:00
James Cole
a97bfc92e1 Add newlines and strict types 2018-03-05 19:35:58 +01:00
James Cole
0d72fcdf02 Fix #1225 2018-03-05 19:35:39 +01:00
James Cole
0e84ca1df5 Merge branch 'release/4.7.1.3' 2018-03-04 20:57:12 +01:00
James Cole
b28bdda510 Move base href to top of page. 2018-03-04 20:40:49 +01:00
James Cole
72314e2d9f Expand tests for updated triggers / actions. 2018-03-04 17:10:36 +01:00
James Cole
d22fb9f438 Improve tests for transaction rules. 2018-03-04 16:42:29 +01:00
James Cole
04b8552d27 Implement tests. 2018-03-04 16:30:20 +01:00
James Cole
5d6f44cd91 Fix test that could select a deposit or transfer. 2018-03-04 16:07:03 +01:00
James Cole
afc8ad7ff5 Clean test. 2018-03-04 15:57:19 +01:00
James Cole
ae039bf1c7 Update composer file for failed passport thing and update version. 2018-03-04 15:36:06 +01:00
James Cole
8fa25e9d37 Update read me file. 2018-03-04 15:25:43 +01:00
James Cole
0daab491ec Remove unused file [skip ci] 2018-03-04 15:16:37 +01:00
James Cole
4f825bac1a Add newlines to files [skip ci] 2018-03-04 15:16:18 +01:00
James Cole
39c8b79ebb Add newlines to files [skip ci] 2018-03-04 15:14:29 +01:00
James Cole
7d66c90beb Make sure that the API returns all entries of a split transaction. 2018-03-04 14:20:23 +01:00
James Cole
1b8b65582a Merge branch 'release/4.7.1.2' 2018-03-04 13:27:21 +01:00
James Cole
d25971cb44 Actually upgrade version. 2018-03-04 13:26:35 +01:00
James Cole
89a56e661d Merge branch 'hotfix/4.7.1.1' into develop 2018-03-04 13:24:07 +01:00
James Cole
3482746d7c Merge branch 'hotfix/4.7.1.1' 2018-03-04 13:24:06 +01:00
James Cole
d5aeca6222 Fix import problem in 4.7.1 2018-03-04 13:23:44 +01:00
187 changed files with 339 additions and 690 deletions

View File

@@ -88,3 +88,4 @@ DEMO_PASSWORD=
IS_DOCKER=true
IS_SANDSTORM=false
IS_HEROKU=false
TZ=${TZ}

View File

@@ -13,6 +13,10 @@ SITE_OWNER=mail@example.com
# Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it
APP_KEY=SomeRandomStringOf32CharsExactly
# Change this value to your preferred time zone.
# Example: Europe/Amsterdam
TZ=UTC
# APP_URL and TRUSTED_PROXIES are useful when using Docker and/or a reverse proxy.
APP_URL=http://localhost
TRUSTED_PROXIES=

View File

@@ -13,6 +13,10 @@ SITE_OWNER=heroku@example.com
# Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it
APP_KEY=7ahyYVPVsmxjdhsweWCauGeJfwc92NP2
# Change this value to your preferred time zone.
# Example: Europe/Amsterdam
TZ=UTC
# APP_URL and TRUSTED_PROXIES are useful when using Docker and/or a reverse proxy.
APP_URL=http://localhost
TRUSTED_PROXIES=

View File

@@ -13,6 +13,10 @@ SITE_OWNER=sandstorm@example.com
# Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it
APP_KEY=SomeRandomStringOf32CharsExactly
# Change this value to your preferred time zone.
# Example: Europe/Amsterdam
TZ=UTC
# APP_URL and TRUSTED_PROXIES are useful when using Docker and/or a reverse proxy.
APP_URL=http://localhost
TRUSTED_PROXIES=

View File

@@ -6,6 +6,7 @@ APP_LOG=daily
APP_LOG_LEVEL=debug
APP_URL=http://localhost
TRUSTED_PROXIES=
TZ=Europe/Amsterdam
DB_CONNECTION=sqlite
DB_HOST=127.0.0.1

View File

@@ -85,4 +85,4 @@ class AboutController extends Controller
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json');
}
}
}

View File

@@ -260,4 +260,4 @@ class AccountController extends Controller
return $types['all']; // @codeCoverageIgnore
}
}
}

View File

@@ -166,7 +166,7 @@ class TransactionController extends Controller
}
$transactions = $collector->getJournals();
$resource = new Item($transactions->first(), new TransactionTransformer($this->parameters), 'transactions');
$resource = new FractalCollection($transactions, new TransactionTransformer($this->parameters), 'transactions');
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json');
}
@@ -330,4 +330,4 @@ class TransactionController extends Controller
return $types['default']; // @codeCoverageIgnore
}
}
}

View File

@@ -189,4 +189,4 @@ class UserController extends Controller
}
}
}

View File

@@ -104,4 +104,4 @@ class AccountRequest extends Request
return $rules;
}
}
}

View File

@@ -116,4 +116,4 @@ class BillRequest extends Request
}
);
}
}
}

View File

@@ -497,4 +497,4 @@ class TransactionRequest extends Request
return;
}
}
}

View File

@@ -86,4 +86,4 @@ class UserRequest extends Request
return $rules;
}
}
}

View File

@@ -49,4 +49,4 @@ class RequestedVersionCheckStatus extends Event
{
$this->user = $user;
}
}
}

View File

@@ -168,4 +168,4 @@ class AccountFactory
}
}
}

View File

@@ -40,4 +40,4 @@ class AccountMetaFactory
return AccountMeta::create($data);
}
}
}

View File

@@ -134,4 +134,4 @@ class BillFactory
$this->user = $user;
}
}
}

View File

@@ -97,4 +97,4 @@ class BudgetFactory
$this->user = $user;
}
}
}

View File

@@ -106,4 +106,4 @@ class CategoryFactory
$this->user = $user;
}
}
}

View File

@@ -85,4 +85,4 @@ class PiggyBankEventFactory
return $event;
}
}
}

View File

@@ -97,4 +97,4 @@ class PiggyBankFactory
}
}
}

View File

@@ -99,4 +99,4 @@ class TagFactory
$this->user = $user;
}
}
}

View File

@@ -64,4 +64,4 @@ class TransactionCurrencyFactory
}
}
}

View File

@@ -145,4 +145,4 @@ class TransactionFactory
}
}
}

View File

@@ -151,4 +151,4 @@ class TransactionJournalFactory
return $transactionType;
}
}
}

View File

@@ -69,4 +69,4 @@ class TransactionJournalMetaFactory
return $entry;
}
}
}

View File

@@ -41,4 +41,4 @@ class TransactionTypeFactory
return TransactionType::whereType(ucfirst($type))->first();
}
}
}

View File

@@ -113,4 +113,4 @@ class VersionCheckEventHandler
return;
}
}
}

View File

@@ -171,4 +171,4 @@ class DebugController extends Controller
return $packages;
}
}
}

View File

@@ -182,4 +182,4 @@ class BulkController extends Controller
return redirect($this->getPreviousUri('transactions.bulk-edit.uri'));
}
}
}

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**
* Authenticate.php
* Copyright (c) 2018 thegrumpydictator@gmail.com

View File

@@ -78,4 +78,4 @@ class ReconciliationStoreRequest extends Request
'reconcile' => 'required|in:create,nothing',
];
}
}
}

View File

@@ -382,11 +382,12 @@ class ImportAccount
Log::debug(sprintf('Found no account of type %s so must create one ourselves.', $this->expectedType));
$data = [
'accountType' => config('firefly.shortNamesByFullName.' . $this->expectedType),
'name' => $this->accountName['value'] ?? '(no name)',
'iban' => $this->accountIban['value'] ?? null,
'active' => true,
'virtualBalance' => '0',
'accountType' => config('firefly.shortNamesByFullName.' . $this->expectedType),
'name' => $this->accountName['value'] ?? '(no name)',
'iban' => $this->accountIban['value'] ?? null,
'active' => true,
'virtualBalance' => '0',
'account_type_id' => null,
];
$this->account = $this->repository->store($data);

View File

@@ -57,11 +57,11 @@ class ImportStorage
/** @var Collection */
public $journals;
/** @var BillRepositoryInterface */
protected $billRepository; // yes, hard coded
protected $billRepository;
/** @var Collection */
protected $bills;
/** @var int */
protected $defaultCurrencyId = 1;
protected $defaultCurrencyId = 1; // yes, hard coded
/** @var ImportJob */
protected $job;
/** @var ImportJobRepositoryInterface */

View File

@@ -41,4 +41,4 @@ class TransactionTypeRepository implements TransactionTypeRepositoryInterface
{
return TransactionType::where('type', ucfirst($type))->first();
}
}
}

View File

@@ -41,4 +41,4 @@ interface TransactionTypeRepositoryInterface
*/
public function findByType(string $type): ?TransactionType;
}
}

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

View File

@@ -86,4 +86,4 @@ class UniqueIban implements Rule
return true;
}
}
}

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

View File

@@ -86,4 +86,4 @@ class Release extends GithubObject
}
}
}

View File

@@ -32,4 +32,4 @@ interface GithubRequest
{
public function call();
}
}

View File

@@ -79,4 +79,4 @@ class UpdateRequest implements GithubRequest
}
}
}

View File

@@ -69,4 +69,4 @@ class AccountDestroyService
return true;
}
}
}

View File

@@ -44,4 +44,4 @@ class BillDestroyService
}
}
}
}

View File

@@ -62,4 +62,4 @@ class JournalDestroyService
return;
}
}
}

View File

@@ -394,4 +394,4 @@ trait AccountServiceTrait
return false;
}
}
}

View File

@@ -61,4 +61,4 @@ trait BillServiceTrait
return true;
}
}
}

View File

@@ -130,4 +130,4 @@ trait JournalServiceTrait
return;
}
}
}

View File

@@ -267,4 +267,4 @@ trait TransactionServiceTrait
}
}
}

View File

@@ -79,4 +79,4 @@ class AccountUpdateService
return $account;
}
}
}

View File

@@ -66,4 +66,4 @@ class BillUpdateService
return $bill;
}
}
}

View File

@@ -166,4 +166,4 @@ class JournalUpdateService
return $journal;
}
}
}

View File

@@ -159,4 +159,4 @@ class TransactionUpdateService
return $transaction;
}
}
}

View File

@@ -29,4 +29,4 @@ namespace FireflyIII\Services\Spectre\Exception;
class DuplicatedCustomerException extends SpectreException
{
}
}

View File

@@ -31,4 +31,4 @@ use Exception;
class SpectreException extends Exception
{
}
}

View File

@@ -106,4 +106,4 @@ class Account extends SpectreObject
return $array;
}
}
}

View File

@@ -205,4 +205,4 @@ class Attempt extends SpectreObject
}
}
}

View File

@@ -45,4 +45,4 @@ class Holder extends SpectreObject
{
return [];
}
}
}

View File

@@ -143,4 +143,4 @@ class Login extends SpectreObject
}
}
}

View File

@@ -73,4 +73,4 @@ class Token extends SpectreObject
return $this->token;
}
}
}

View File

@@ -185,4 +185,4 @@ class Transaction extends SpectreObject
}
}
}

View File

@@ -166,4 +166,4 @@ class TransactionExtra extends SpectreObject
}
}
}

View File

@@ -92,4 +92,4 @@ class CreateTokenRequest extends SpectreRequest
}
}
}

View File

@@ -90,4 +90,4 @@ class ListAccountsRequest extends SpectreRequest
}
}
}

View File

@@ -79,4 +79,4 @@ class ListCustomersRequest extends SpectreRequest
}
}
}

View File

@@ -89,4 +89,4 @@ class ListLoginsRequest extends SpectreRequest
}
}
}

View File

@@ -91,4 +91,4 @@ class ListTransactionsRequest extends SpectreRequest
}
}
}

View File

@@ -153,4 +153,4 @@ class HaveAccounts implements ConfigurationInterface
return $collection;
}
}
}

View File

@@ -156,6 +156,9 @@ class Preferences
if (null !== $preference) {
$lastActivity = $preference->data;
}
if (is_array($lastActivity)) {
$lastActivity = implode(',', $lastActivity);
}
return md5($lastActivity);
}

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -55,6 +56,13 @@ class ClearBudget implements ActionInterface
{
$journal->budgets()->detach();
$journal->touch();
// also remove categories from transactions:
/** @var Transaction $transaction */
foreach($journal->transactions as $transaction) {
$transaction->budgets()->detach();
}
Log::debug(sprintf('RuleAction ClearBudget removed all budgets from journal %d.', $journal->id));
return true;

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -55,6 +56,13 @@ class ClearCategory implements ActionInterface
{
$journal->categories()->detach();
$journal->touch();
// also remove categories from transactions:
/** @var Transaction $transaction */
foreach($journal->transactions as $transaction) {
$transaction->categories()->detach();
}
Log::debug(sprintf('RuleAction ClearCategory removed all categories from journal %d.', $journal->id));
return true;

View File

@@ -24,6 +24,7 @@ namespace FireflyIII\TransactionRules\Actions;
use FireflyIII\Models\Budget;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
@@ -87,7 +88,12 @@ class SetBudget implements ActionInterface
Log::debug(sprintf('RuleAction SetBudget set the budget of journal #%d to budget #%d ("%s").', $journal->id, $budget->id, $budget->name));
$journal->budgets()->sync([$budget->id]);
$journal->budgets()->detach();
// set budget on transactions:
/** @var Transaction $transaction */
foreach ($journal->transactions as $transaction) {
$transaction->budgets()->sync([$budget->id]);
}
$journal->touch();
return true;

View File

@@ -24,6 +24,7 @@ namespace FireflyIII\TransactionRules\Actions;
use FireflyIII\Models\Category;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -56,7 +57,16 @@ class SetCategory implements ActionInterface
{
$name = $this->action->action_value;
$category = Category::firstOrCreateEncrypted(['name' => $name, 'user_id' => $journal->user->id]);
$journal->categories()->sync([$category->id]);
$journal->categories()->detach();
// set category on transactions:
/** @var Transaction $transaction */
foreach ($journal->transactions as $transaction) {
$transaction->categories()->sync([$category->id]);
}
$journal->touch();
$journal->touch();
Log::debug(sprintf('RuleAction SetCategory set the category of journal #%d to budget #%d ("%s").', $journal->id, $category->id, $category->name));

View File

@@ -240,4 +240,4 @@ class AccountTransformer extends TransformerAbstract
return $result;
}
}
}

View File

@@ -106,4 +106,4 @@ class AttachmentTransformer extends TransformerAbstract
];
}
}
}

View File

@@ -292,4 +292,4 @@ class BillTransformer extends TransformerAbstract
return $simple->toArray();
}
}
}

View File

@@ -132,4 +132,4 @@ class BudgetTransformer extends TransformerAbstract
return $data;
}
}
}

View File

@@ -131,4 +131,4 @@ class CategoryTransformer extends TransformerAbstract
return $data;
}
}
}

View File

@@ -120,4 +120,4 @@ class JournalMetaTransformer extends TransformerAbstract
return $data;
}
}
}

View File

@@ -145,4 +145,4 @@ class PiggyBankEventTransformer extends TransformerAbstract
return $data;
}
}
}

View File

@@ -163,4 +163,4 @@ class PiggyBankTransformer extends TransformerAbstract
return $data;
}
}
}

View File

@@ -137,4 +137,4 @@ class TagTransformer extends TransformerAbstract
return $data;
}
}
}

View File

@@ -255,4 +255,4 @@ class TransactionTransformer extends TransformerAbstract
return $data;
}
}
}

View File

@@ -205,4 +205,4 @@ class UserTransformer extends TransformerAbstract
];
}
}
}

View File

@@ -113,7 +113,8 @@
"php artisan firefly:upgrade-database",
"php artisan firefly:verify",
"php artisan firefly:instructions update",
"php artisan optimize"
"php artisan optimize",
"php artisan passport:install"
],
"post-install-cmd": [
"php artisan optimize",

View File

@@ -27,7 +27,7 @@ return [
'env' => env('APP_ENV', 'production'),
'debug' => env('APP_DEBUG', false),
'url' => env('APP_URL', 'http://localhost'),
'timezone' => 'UTC',
'timezone' => env('TZ', 'UTC'),
'locale' => 'en_US',
'fallback_locale' => 'en_US',
'key' => env('APP_KEY'),

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

View File

@@ -33,7 +33,7 @@ return [
'is_demo_site' => false,
],
'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true),
'version' => '4.7.1',
'version' => '4.7.1.4',
'api_version' => '0.1',
'maxUploadSize' => 15242880,
'allowedMimes' => [

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**

4
public/css/app.css vendored

File diff suppressed because one or more lines are too long

View File

@@ -47,14 +47,15 @@ You can read more about this in the [official documentation](http://firefly-iii.
### Features
Most importantly...
* Firefly III runs on your own server, so you are fully in control of your data. It will not contact other sites or servers
* You can import from over 2500 financial providers, in 55 countries when you enable the [Spectre API](http://firefly-iii.readthedocs.io/en/latest/import/spectre.html)
* You can import CSV files from practically any bank
* Firefly III runs on your own server, so you are fully in control of your data. It will not contact other sites or servers.
* You can import from over 2500 financial providers, in 55 countries when you enable the [Spectre API](http://firefly-iii.readthedocs.io/en/latest/import/spectre.html).
* You can import CSV files from practically any bank.
* Firefly III features an JSON REST API.
* If you feel youre missing something you can just ask me and Ill add it!
But actually, it features:
* [A double-entry bookkeeping system](https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system)
* [A double-entry bookkeeping system](http://firefly-iii.readthedocs.io/en/latest/concepts/transactions.html)
* You can store, edit and remove [withdrawals, deposits and transfers](http://firefly-iii.readthedocs.io/en/latest/concepts/transactions.html). This allows you full financial management
* You can manage different types of accounts
* [Asset](http://firefly-iii.readthedocs.io/en/latest/concepts/accounts.html) accounts

View File

@@ -54,4 +54,4 @@ if (token) {
// encrypted: true
// });
/** Include font awesome */
/** Include font awesome */

View File

@@ -27,4 +27,4 @@ const Lang = new lang({messages});
Lang.setLocale(window.language);
Lang.setFallback('en_US');
export default Lang;
export default Lang;

File diff suppressed because one or more lines are too long

View File

@@ -27,4 +27,4 @@ return [
// bills:
'not_expected_period' => 'Unerwarteter Zeitraum',
'not_or_not_yet' => '(Noch) nicht',
];
];

Some files were not shown because too many files have changed in this diff Show More