mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Merge branch 'develop' into bugfix/abn-amro-specific
This commit is contained in:
22
CHANGELOG.md
22
CHANGELOG.md
@@ -2,6 +2,28 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.0.2] - 2016-10-x
|
||||||
|
### Added
|
||||||
|
- Initial release.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Initial release.
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
- Initial release.
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Initial release.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- PostgreSQL compatibility thanks to @SanderKleykens
|
||||||
|
|
||||||
|
### Security
|
||||||
|
- Initial release.
|
||||||
|
|
||||||
|
|
||||||
## [4.0.1] - 2016-10-04
|
## [4.0.1] - 2016-10-04
|
||||||
### Added
|
### Added
|
||||||
- New ING import specific by @tomwerf
|
- New ING import specific by @tomwerf
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ConfigureLogging.php
|
* ConfigureLogging.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* EncryptFile.php
|
* EncryptFile.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Import.php
|
* Import.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ScanAttachments.php
|
* ScanAttachments.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UpgradeFireflyInstructions.php
|
* UpgradeFireflyInstructions.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* VerifyDatabase.php
|
* VerifyDatabase.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
@@ -195,7 +197,7 @@ class VerifyDatabase extends Command
|
|||||||
$date = is_null($entry->transaction_deleted_at) ? $entry->journal_deleted_at : $entry->transaction_deleted_at;
|
$date = is_null($entry->transaction_deleted_at) ? $entry->journal_deleted_at : $entry->transaction_deleted_at;
|
||||||
$this->error(
|
$this->error(
|
||||||
'Error: Account #' . $entry->account_id . ' should have been deleted, but has not.' .
|
'Error: Account #' . $entry->account_id . ' should have been deleted, but has not.' .
|
||||||
' Find it in the table called `accounts` and change the `deleted_at` field to: "' . $date . '"'
|
' Find it in the table called "accounts" and change the "deleted_at" field to: "' . $date . '"'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -222,7 +224,7 @@ class VerifyDatabase extends Command
|
|||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$this->error(
|
$this->error(
|
||||||
'Error: Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' .
|
'Error: Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' .
|
||||||
' Find it in the table called `transactions` and change the `deleted_at` field to: "' . $entry->journal_deleted . '"'
|
' Find it in the table called "transactions" and change the "deleted_at" field to: "' . $entry->journal_deleted . '"'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,7 +242,7 @@ class VerifyDatabase extends Command
|
|||||||
|
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$this->error(
|
$this->error(
|
||||||
'Error: Journal #' . $entry->id . ' has zero transactions. Open table `transaction_journals` and delete the entry with id #' . $entry->id
|
'Error: Journal #' . $entry->id . ' has zero transactions. Open table "transaction_journals" and delete the entry with id #' . $entry->id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,7 +303,7 @@ class VerifyDatabase extends Command
|
|||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$this->error(
|
$this->error(
|
||||||
'Error: Transaction journal #' . $entry->journal_id . ' should have been deleted, but has not.' .
|
'Error: Transaction journal #' . $entry->journal_id . ' should have been deleted, but has not.' .
|
||||||
' Find it in the table called `transaction_journals` and change the `deleted_at` field to: "' . $entry->transaction_deleted . '"'
|
' Find it in the table called "transaction_journals" and change the "deleted_at" field to: "' . $entry->transaction_deleted . '"'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Kernel.php
|
* Kernel.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AccountCrud.php
|
* AccountCrud.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
@@ -12,7 +14,7 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Crud\Account;
|
namespace FireflyIII\Crud\Account;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountMeta;
|
use FireflyIII\Models\AccountMeta;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
@@ -49,23 +51,6 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Account $account
|
|
||||||
* @param Account $moveTo
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function destroy(Account $account, Account $moveTo): bool
|
|
||||||
{
|
|
||||||
if (!is_null($moveTo->id)) {
|
|
||||||
DB::table('transactions')->where('account_id', $account->id)->update(['account_id' => $moveTo->id]);
|
|
||||||
}
|
|
||||||
if (!is_null($account)) {
|
|
||||||
$account->delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $accountId
|
* @param $accountId
|
||||||
@@ -117,7 +102,7 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
*/
|
*/
|
||||||
public function findByIban(string $iban, array $types): Account
|
public function findByIban(string $iban, array $types): Account
|
||||||
{
|
{
|
||||||
$query = $this->user->accounts()->where('iban', '!=', '');
|
$query = $this->user->accounts()->where('iban', '!=', '')->whereNotNull('iban');
|
||||||
|
|
||||||
if (count($types) > 0) {
|
if (count($types) > 0) {
|
||||||
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
|
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
|
||||||
@@ -174,11 +159,7 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
public function getAccountsById(array $accountIds): Collection
|
public function getAccountsById(array $accountIds): Collection
|
||||||
{
|
{
|
||||||
/** @var Collection $result */
|
/** @var Collection $result */
|
||||||
$query = $this->user->accounts()->with(
|
$query = $this->user->accounts();
|
||||||
['accountmeta' => function (HasMany $query) {
|
|
||||||
$query->where('name', 'accountRole');
|
|
||||||
}]
|
|
||||||
);
|
|
||||||
|
|
||||||
if (count($accountIds) > 0) {
|
if (count($accountIds) > 0) {
|
||||||
$query->whereIn('accounts.id', $accountIds);
|
$query->whereIn('accounts.id', $accountIds);
|
||||||
@@ -202,11 +183,7 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
public function getAccountsByType(array $types): Collection
|
public function getAccountsByType(array $types): Collection
|
||||||
{
|
{
|
||||||
/** @var Collection $result */
|
/** @var Collection $result */
|
||||||
$query = $this->user->accounts()->with(
|
$query = $this->user->accounts();
|
||||||
['accountmeta' => function (HasMany $query) {
|
|
||||||
$query->where('name', 'accountRole');
|
|
||||||
}]
|
|
||||||
);
|
|
||||||
if (count($types) > 0) {
|
if (count($types) > 0) {
|
||||||
$query->accountTypeIn($types);
|
$query->accountTypeIn($types);
|
||||||
}
|
}
|
||||||
@@ -256,13 +233,14 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
public function store(array $data): Account
|
public function store(array $data): Account
|
||||||
{
|
{
|
||||||
$newAccount = $this->storeAccount($data);
|
$newAccount = $this->storeAccount($data);
|
||||||
if (!is_null($newAccount->id)) {
|
$this->updateMetadata($newAccount, $data);
|
||||||
$this->storeMetadata($newAccount, $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($data['openingBalance'] != 0) {
|
if ($this->validOpeningBalanceData($data)) {
|
||||||
$this->storeInitialBalance($newAccount, $data);
|
$this->updateInitialBalance($newAccount, $data);
|
||||||
|
|
||||||
|
return $newAccount;
|
||||||
}
|
}
|
||||||
|
$this->deleteInitialBalance($newAccount);
|
||||||
|
|
||||||
return $newAccount;
|
return $newAccount;
|
||||||
|
|
||||||
@@ -303,31 +281,63 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
* @param string $type
|
|
||||||
*
|
|
||||||
* @return Account
|
|
||||||
*/
|
*/
|
||||||
public function updateAccountType(Account $account, string $type): Account
|
protected function deleteInitialBalance(Account $account)
|
||||||
{
|
{
|
||||||
$type = AccountType::whereType($type)->first();
|
$journal = $this->openingBalanceTransaction($account);
|
||||||
if (!is_null($type)) {
|
if (!is_null($journal->id)) {
|
||||||
$account->accountType()->associate($type);
|
$journal->delete();
|
||||||
$account->save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->find($account->id);
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Account $account
|
||||||
|
*
|
||||||
|
* @return TransactionJournal|null
|
||||||
|
*/
|
||||||
|
protected function openingBalanceTransaction(Account $account): TransactionJournal
|
||||||
|
{
|
||||||
|
$journal = TransactionJournal
|
||||||
|
::sortCorrectly()
|
||||||
|
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||||
|
->where('transactions.account_id', $account->id)
|
||||||
|
->transactionTypes([TransactionType::OPENING_BALANCE])
|
||||||
|
->first(['transaction_journals.*']);
|
||||||
|
if (is_null($journal)) {
|
||||||
|
Log::debug('Could not find a opening balance journal, return empty one.');
|
||||||
|
|
||||||
|
return new TransactionJournal;
|
||||||
|
}
|
||||||
|
Log::debug(sprintf('Found opening balance: journal #%d.', $journal->id));
|
||||||
|
|
||||||
|
return $journal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return Account
|
* @return Account
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
protected function storeAccount(array $data): Account
|
protected function storeAccount(array $data): Account
|
||||||
{
|
{
|
||||||
|
$data['accountType'] = $data['accountType'] ?? 'invalid';
|
||||||
$type = config('firefly.accountTypeByIdentifier.' . $data['accountType']);
|
$type = config('firefly.accountTypeByIdentifier.' . $data['accountType']);
|
||||||
$accountType = AccountType::whereType($type)->first();
|
$accountType = AccountType::whereType($type)->first();
|
||||||
|
|
||||||
|
// verify account type
|
||||||
|
if (is_null($accountType)) {
|
||||||
|
throw new FireflyException(sprintf('Account type "%s" is invalid. Cannot create account.', $data['accountType']));
|
||||||
|
}
|
||||||
|
|
||||||
|
// account may exist already:
|
||||||
|
$existingAccount = $this->findByName($data['name'], [$data['accountType']]);
|
||||||
|
if (!is_null($existingAccount->id)) {
|
||||||
|
throw new FireflyException(sprintf('There already is an account named "%s" of type "%s".', $data['name'], $data['accountType']));
|
||||||
|
}
|
||||||
|
|
||||||
|
// create it:
|
||||||
$newAccount = new Account(
|
$newAccount = new Account(
|
||||||
[
|
[
|
||||||
'user_id' => $data['user'],
|
'user_id' => $data['user'],
|
||||||
@@ -338,26 +348,14 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
'iban' => $data['iban'],
|
'iban' => $data['iban'],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$newAccount->isValid()) {
|
|
||||||
// does the account already exist?
|
|
||||||
$searchData = [
|
|
||||||
'user_id' => $data['user'],
|
|
||||||
'account_type_id' => $accountType->id,
|
|
||||||
'virtual_balance' => $data['virtualBalance'],
|
|
||||||
'name' => $data['name'],
|
|
||||||
'iban' => $data['iban'],
|
|
||||||
];
|
|
||||||
$existingAccount = Account::firstOrNullEncrypted($searchData);
|
|
||||||
if (!$existingAccount) {
|
|
||||||
Log::error('Account create error', $newAccount->getErrors()->toArray());
|
|
||||||
|
|
||||||
return new Account;
|
|
||||||
}
|
|
||||||
$newAccount = $existingAccount;
|
|
||||||
|
|
||||||
}
|
|
||||||
$newAccount->save();
|
$newAccount->save();
|
||||||
|
// verify its creation:
|
||||||
|
if (is_null($newAccount->id)) {
|
||||||
|
Log::error(
|
||||||
|
sprintf('Could not create account "%s" (%d error(s))', $data['name'], $newAccount->getErrors()->count()), $newAccount->getErrors()->toArray()
|
||||||
|
);
|
||||||
|
throw new FireflyException(sprintf('Tried to create account named "%s" but failed. The logs have more details.', $data['name']));
|
||||||
|
}
|
||||||
|
|
||||||
return $newAccount;
|
return $newAccount;
|
||||||
}
|
}
|
||||||
@@ -386,6 +384,7 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
'encrypted' => true,
|
'encrypted' => true,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
Log::debug(sprintf('Created new opening balance journal: #%d', $journal->id));
|
||||||
|
|
||||||
$firstAccount = $account;
|
$firstAccount = $account;
|
||||||
$secondAccount = $opposing;
|
$secondAccount = $opposing;
|
||||||
@@ -404,27 +403,32 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
$two = new Transaction(['account_id' => $secondAccount->id, 'transaction_journal_id' => $journal->id, 'amount' => $secondAmount]);
|
$two = new Transaction(['account_id' => $secondAccount->id, 'transaction_journal_id' => $journal->id, 'amount' => $secondAmount]);
|
||||||
$two->save(); // second transaction: to
|
$two->save(); // second transaction: to
|
||||||
|
|
||||||
|
Log::debug(sprintf('Stored two transactions, #%d and #%d', $one->id, $two->id));
|
||||||
|
|
||||||
return $journal;
|
return $journal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param float $amount
|
||||||
* @param array $data
|
* @param int $user
|
||||||
|
* @param string $name
|
||||||
|
*
|
||||||
|
* @return Account
|
||||||
*/
|
*/
|
||||||
protected function storeMetadata(Account $account, array $data)
|
protected function storeOpposingAccount(float $amount, int $user, string $name):Account
|
||||||
{
|
{
|
||||||
foreach ($this->validFields as $field) {
|
$type = $amount < 0 ? 'expense' : 'revenue';
|
||||||
if (isset($data[$field])) {
|
$opposingData = [
|
||||||
$metaData = new AccountMeta(
|
'user' => $user,
|
||||||
[
|
'accountType' => $type,
|
||||||
'account_id' => $account->id,
|
'name' => $name . ' initial balance',
|
||||||
'name' => $field,
|
'active' => false,
|
||||||
'data' => $data[$field],
|
'iban' => '',
|
||||||
]
|
'virtualBalance' => 0,
|
||||||
);
|
];
|
||||||
$metaData->save();
|
Log::debug('Going to create an opening balance opposing account');
|
||||||
}
|
|
||||||
}
|
return $this->storeAccount($opposingData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -436,21 +440,24 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
protected function updateInitialBalance(Account $account, array $data): bool
|
protected function updateInitialBalance(Account $account, array $data): bool
|
||||||
{
|
{
|
||||||
$openingBalance = $this->openingBalanceTransaction($account);
|
$openingBalance = $this->openingBalanceTransaction($account);
|
||||||
if ($data['openingBalance'] != 0) {
|
|
||||||
if (!is_null($openingBalance->id)) {
|
|
||||||
$date = $data['openingBalanceDate'];
|
|
||||||
$amount = $data['openingBalance'];
|
|
||||||
|
|
||||||
return $this->updateJournal($account, $openingBalance, $date, $amount);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// no opening balance journal? create it:
|
||||||
|
if (is_null($openingBalance->id)) {
|
||||||
|
Log::debug('No opening balance journal yet, create journal.');
|
||||||
$this->storeInitialBalance($account, $data);
|
$this->storeInitialBalance($account, $data);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// else, delete it:
|
// opening balance data? update it!
|
||||||
if ($openingBalance) { // opening balance is zero, should we delete it?
|
if (!is_null($openingBalance->id)) {
|
||||||
$openingBalance->delete(); // delete existing opening balance.
|
$date = $data['openingBalanceDate'];
|
||||||
|
$amount = $data['openingBalance'];
|
||||||
|
|
||||||
|
Log::debug('Opening balance journal found, update journal.');
|
||||||
|
|
||||||
|
$this->updateOpeningBalanceJournal($account, $openingBalance, $date, $amount);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -464,71 +471,41 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
protected function updateMetadata(Account $account, array $data)
|
protected function updateMetadata(Account $account, array $data)
|
||||||
{
|
{
|
||||||
foreach ($this->validFields as $field) {
|
foreach ($this->validFields as $field) {
|
||||||
|
/** @var AccountMeta $entry */
|
||||||
$entry = $account->accountMeta()->where('name', $field)->first();
|
$entry = $account->accountMeta()->where('name', $field)->first();
|
||||||
|
|
||||||
if (isset($data[$field])) {
|
// if $data has field and $entry is null, create new one:
|
||||||
// update if new data is present:
|
if (isset($data[$field]) && is_null($entry)) {
|
||||||
if (!is_null($entry)) {
|
Log::debug(
|
||||||
$entry->data = $data[$field];
|
sprintf(
|
||||||
$entry->save();
|
'Created meta-field "%s":"%s" for account #%d ("%s") ',
|
||||||
|
$field, $data[$field], $account->id, $account->name
|
||||||
continue;
|
)
|
||||||
}
|
);
|
||||||
$metaData = new AccountMeta(
|
AccountMeta::create(
|
||||||
[
|
[
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'name' => $field,
|
'name' => $field,
|
||||||
'data' => $data[$field],
|
'data' => $data[$field],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$metaData->save();
|
}
|
||||||
|
|
||||||
|
// if $data has field and $entry is not null, update $entry:
|
||||||
|
if (isset($data[$field]) && !is_null($entry)) {
|
||||||
|
$entry->data = $data[$field];
|
||||||
|
$entry->save();
|
||||||
|
Log::debug(
|
||||||
|
sprintf(
|
||||||
|
'Updated meta-field "%s":"%s" for account #%d ("%s") ',
|
||||||
|
$field, $data[$field], $account->id, $account->name
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Account $account
|
|
||||||
*
|
|
||||||
* @return TransactionJournal|null
|
|
||||||
*/
|
|
||||||
private function openingBalanceTransaction(Account $account): TransactionJournal
|
|
||||||
{
|
|
||||||
$journal = TransactionJournal
|
|
||||||
::sortCorrectly()
|
|
||||||
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
|
||||||
->where('transactions.account_id', $account->id)
|
|
||||||
->transactionTypes([TransactionType::OPENING_BALANCE])
|
|
||||||
->first(['transaction_journals.*']);
|
|
||||||
if (is_null($journal)) {
|
|
||||||
return new TransactionJournal;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $journal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param float $amount
|
|
||||||
* @param int $user
|
|
||||||
* @param string $name
|
|
||||||
*
|
|
||||||
* @return Account
|
|
||||||
*/
|
|
||||||
private function storeOpposingAccount(float $amount, int $user, string $name):Account
|
|
||||||
{
|
|
||||||
$type = $amount < 0 ? 'expense' : 'revenue';
|
|
||||||
$opposingData = [
|
|
||||||
'user' => $user,
|
|
||||||
'accountType' => $type,
|
|
||||||
'name' => $name . ' initial balance',
|
|
||||||
'active' => false,
|
|
||||||
'iban' => '',
|
|
||||||
'virtualBalance' => 0,
|
|
||||||
];
|
|
||||||
|
|
||||||
return $this->storeAccount($opposingData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
@@ -537,7 +514,7 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function updateJournal(Account $account, TransactionJournal $journal, Carbon $date, float $amount): bool
|
protected function updateOpeningBalanceJournal(Account $account, TransactionJournal $journal, Carbon $date, float $amount): bool
|
||||||
{
|
{
|
||||||
// update date:
|
// update date:
|
||||||
$journal->date = $date;
|
$journal->date = $date;
|
||||||
@@ -554,8 +531,30 @@ class AccountCrud implements AccountCrudInterface
|
|||||||
$transaction->save();
|
$transaction->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Log::debug('Updated opening balance journal.');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $data
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function validOpeningBalanceData(array $data): bool
|
||||||
|
{
|
||||||
|
if (isset($data['openingBalance'])
|
||||||
|
&& isset($data['openingBalanceDate'])
|
||||||
|
&& isset($data['openingBalanceCurrency'])
|
||||||
|
&& bccomp(strval($data['openingBalance']), '0') !== 0
|
||||||
|
) {
|
||||||
|
Log::debug('Array has valid opening balance data.');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Log::debug('Array does not have valid opening balance data.');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AccountCrudInterface.php
|
* AccountCrudInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
@@ -22,13 +24,6 @@ use Illuminate\Support\Collection;
|
|||||||
*/
|
*/
|
||||||
interface AccountCrudInterface
|
interface AccountCrudInterface
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @param Account $account
|
|
||||||
* @param Account $moveTo
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function destroy(Account $account, Account $moveTo): bool;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $accountId
|
* @param int $accountId
|
||||||
@@ -106,11 +101,4 @@ interface AccountCrudInterface
|
|||||||
*/
|
*/
|
||||||
public function update(Account $account, array $data): Account;
|
public function update(Account $account, array $data): Account;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Account $account
|
|
||||||
* @param string $type
|
|
||||||
*
|
|
||||||
* @return Account
|
|
||||||
*/
|
|
||||||
public function updateAccountType(Account $account, string $type): Account;
|
|
||||||
}
|
}
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Journal.php
|
* Journal.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* JournalInterface.php
|
* JournalInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BudgetLimitStored.php
|
* BudgetLimitStored.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BudgetLimitUpdated.php
|
* BudgetLimitUpdated.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Event.php
|
* Event.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ResendConfirmation.php
|
* ResendConfirmation.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* TransactionJournalStored.php
|
* TransactionJournalStored.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* TransactionJournalUpdated.php
|
* TransactionJournalUpdated.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* TransactionStored.php
|
* TransactionStored.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UserIsConfirmed.php
|
* UserIsConfirmed.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UserIsDeleted.php
|
* UserIsDeleted.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UserRegistration.php
|
* UserRegistration.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* FireflyException.php
|
* FireflyException.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Handler.php
|
* Handler.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
@@ -107,6 +109,7 @@ class Handler extends ExceptionHandler
|
|||||||
* Convert an authentication exception into an unauthenticated response.
|
* Convert an authentication exception into an unauthenticated response.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
protected function unauthenticated($request)
|
protected function unauthenticated($request)
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* NotImplementedException.php
|
* NotImplementedException.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ValidationException.php
|
* ValidationException.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AttachmentCollector.php
|
* AttachmentCollector.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BasicCollector.php
|
* BasicCollector.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* CollectorInterface.php
|
* CollectorInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UploadCollector.php
|
* UploadCollector.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ConfigurationFile.php
|
* ConfigurationFile.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Entry.php
|
* Entry.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* EntryAccount.php
|
* EntryAccount.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* EntryBill.php
|
* EntryBill.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* EntryBudget.php
|
* EntryBudget.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* EntryCategory.php
|
* EntryCategory.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BasicExporter.php
|
* BasicExporter.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* CsvExporter.php
|
* CsvExporter.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ExporterInterface.php
|
* ExporterInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Processor.php
|
* Processor.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AccountChartGeneratorInterface.php
|
* AccountChartGeneratorInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ChartJsAccountChartGenerator.php
|
* ChartJsAccountChartGenerator.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BillChartGeneratorInterface.php
|
* BillChartGeneratorInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ChartJsBillChartGenerator.php
|
* ChartJsBillChartGenerator.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BudgetChartGeneratorInterface.php
|
* BudgetChartGeneratorInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ChartJsBudgetChartGenerator.php
|
* ChartJsBudgetChartGenerator.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* CategoryChartGeneratorInterface.php
|
* CategoryChartGeneratorInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ChartJsCategoryChartGenerator.php
|
* ChartJsCategoryChartGenerator.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ChartJsPiggyBankChartGenerator.php
|
* ChartJsPiggyBankChartGenerator.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* PiggyBankChartGeneratorInterface.php
|
* PiggyBankChartGeneratorInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ChartJsReportChartGenerator.php
|
* ChartJsReportChartGenerator.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ReportChartGeneratorInterface.php
|
* ReportChartGeneratorInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AttachUserRole.php
|
* AttachUserRole.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BudgetLimitEventHandler.php
|
* BudgetLimitEventHandler.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ConnectJournalToPiggyBank.php
|
* ConnectJournalToPiggyBank.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ConnectTransactionToPiggyBank.php
|
* ConnectTransactionToPiggyBank.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* FireRulesForStore.php
|
* FireRulesForStore.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* FireRulesForUpdate.php
|
* FireRulesForUpdate.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ScanForBillsAfterStore.php
|
* ScanForBillsAfterStore.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ScanForBillsAfterUpdate.php
|
* ScanForBillsAfterUpdate.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* SendRegistrationMail.php
|
* SendRegistrationMail.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UpdateJournalConnection.php
|
* UpdateJournalConnection.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UserConfirmation.php
|
* UserConfirmation.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UserEventListener.php
|
* UserEventListener.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UserSaveIpAddress.php
|
* UserSaveIpAddress.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AttachmentHelper.php
|
* AttachmentHelper.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AttachmentHelperInterface.php
|
* AttachmentHelperInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Account.php
|
* Account.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Balance.php
|
* Balance.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BalanceEntry.php
|
* BalanceEntry.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BalanceHeader.php
|
* BalanceHeader.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BalanceLine.php
|
* BalanceLine.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Bill.php
|
* Bill.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BillLine.php
|
* BillLine.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Budget.php
|
* Budget.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BudgetLine.php
|
* BudgetLine.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Category.php
|
* Category.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,14 +3,15 @@
|
|||||||
* Expense.php
|
* Expense.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
namespace FireflyIII\Helpers\Collection;
|
namespace FireflyIII\Helpers\Collection;
|
||||||
|
|
||||||
use FireflyIII\Models\TransactionJournal;
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
@@ -36,36 +37,11 @@ class Expense
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param TransactionJournal $entry
|
* @param stdClass $entry
|
||||||
*/
|
*/
|
||||||
public function addOrCreateExpense(TransactionJournal $entry)
|
public function addOrCreateExpense(stdClass $entry)
|
||||||
{
|
{
|
||||||
// add each account individually:
|
$this->expenses->put($entry->id, $entry);
|
||||||
$destinations = TransactionJournal::destinationTransactionList($entry);
|
|
||||||
|
|
||||||
foreach ($destinations as $transaction) {
|
|
||||||
$amount = strval($transaction->amount);
|
|
||||||
$account = $transaction->account;
|
|
||||||
if (bccomp('0', $amount) === -1) {
|
|
||||||
$amount = bcmul($amount, '-1');
|
|
||||||
}
|
|
||||||
|
|
||||||
$object = new stdClass;
|
|
||||||
$object->amount = $amount;
|
|
||||||
$object->name = $account->name;
|
|
||||||
$object->count = 1;
|
|
||||||
$object->id = $account->id;
|
|
||||||
|
|
||||||
// overrule some properties:
|
|
||||||
if ($this->expenses->has($account->id)) {
|
|
||||||
$object = $this->expenses->get($account->id);
|
|
||||||
$object->amount = bcadd($object->amount, $amount);
|
|
||||||
$object->count++;
|
|
||||||
}
|
|
||||||
$this->expenses->put($account->id, $object);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -3,14 +3,15 @@
|
|||||||
* Income.php
|
* Income.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
namespace FireflyIII\Helpers\Collection;
|
namespace FireflyIII\Helpers\Collection;
|
||||||
|
|
||||||
use FireflyIII\Models\TransactionJournal;
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
@@ -37,32 +38,11 @@ class Income
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param TransactionJournal $entry
|
* @param stdClass $entry
|
||||||
*/
|
*/
|
||||||
public function addOrCreateIncome(TransactionJournal $entry)
|
public function addOrCreateIncome(stdClass $entry)
|
||||||
{
|
{
|
||||||
// add each account individually:
|
$this->incomes->put($entry->id, $entry);
|
||||||
$sources = TransactionJournal::sourceTransactionList($entry);
|
|
||||||
|
|
||||||
foreach ($sources as $transaction) {
|
|
||||||
$amount = strval($transaction->amount);
|
|
||||||
$account = $transaction->account;
|
|
||||||
$amount = bcmul($amount, '-1');
|
|
||||||
|
|
||||||
$object = new stdClass;
|
|
||||||
$object->amount = $amount;
|
|
||||||
$object->name = $account->name;
|
|
||||||
$object->count = 1;
|
|
||||||
$object->id = $account->id;
|
|
||||||
|
|
||||||
// overrule some properties:
|
|
||||||
if ($this->incomes->has($account->id)) {
|
|
||||||
$object = $this->incomes->get($account->id);
|
|
||||||
$object->amount = bcadd($object->amount, $amount);
|
|
||||||
$object->count++;
|
|
||||||
}
|
|
||||||
$this->incomes->put($account->id, $object);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* FiscalHelper.php
|
* FiscalHelper.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* FiscalHelperInterface.php
|
* FiscalHelperInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* Help.php
|
* Help.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* HelpInterface.php
|
* HelpInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -1,142 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* AccountReportHelper.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms
|
|
||||||
* of the MIT license. See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Helpers\Report;
|
|
||||||
|
|
||||||
use Carbon\Carbon;
|
|
||||||
use DB;
|
|
||||||
use FireflyIII\Helpers\Collection\Account as AccountCollection;
|
|
||||||
use FireflyIII\Models\Account;
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class AccountReportHelper
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Helpers\Report
|
|
||||||
*/
|
|
||||||
class AccountReportHelper implements AccountReportHelperInterface
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param Account $account
|
|
||||||
* @param Collection $startSet
|
|
||||||
* @param Collection $endSet
|
|
||||||
* @param Collection $backupSet
|
|
||||||
*
|
|
||||||
* @return Account
|
|
||||||
*/
|
|
||||||
public static function reportFilter(Account $account, Collection $startSet, Collection $endSet, Collection $backupSet)
|
|
||||||
{
|
|
||||||
// The balance for today always incorporates transactions made on today. So to get todays "start" balance, we sub one day.
|
|
||||||
$account->startBalance = '0';
|
|
||||||
$account->endBalance = '0';
|
|
||||||
$currentStart = $startSet->filter(
|
|
||||||
function (Account $entry) use ($account) {
|
|
||||||
return $account->id == $entry->id;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
$currentBackup = $backupSet->filter( // grab entry from current backup as well:
|
|
||||||
function (Account $entry) use ($account) {
|
|
||||||
return $account->id == $entry->id;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// first try to set from backup
|
|
||||||
if (!is_null($currentBackup->first())) {
|
|
||||||
$account->startBalance = $currentBackup->first()->balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
// overrule with data from start
|
|
||||||
if (!is_null($currentStart->first())) {
|
|
||||||
$account->startBalance = $currentStart->first()->balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
$currentEnd = $endSet->filter(
|
|
||||||
function (Account $entry) use ($account) {
|
|
||||||
return $account->id == $entry->id;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!is_null($currentEnd->first())) {
|
|
||||||
$account->endBalance = $currentEnd->first()->balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $account;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method generates a full report for the given period on all
|
|
||||||
* given accounts.
|
|
||||||
*
|
|
||||||
* a special consideration for accounts that did exist on this exact day.
|
|
||||||
* we also grab the balance from today just in case, to see if that changes things.
|
|
||||||
* it's a fall back for users who (rightly so) start keeping score at the first of
|
|
||||||
* the month and find the first report lacking / broken.
|
|
||||||
*
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
* @param Collection $accounts
|
|
||||||
*
|
|
||||||
* @return AccountCollection
|
|
||||||
*/
|
|
||||||
public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection
|
|
||||||
{
|
|
||||||
$startAmount = '0';
|
|
||||||
$endAmount = '0';
|
|
||||||
$diff = '0';
|
|
||||||
$ids = $accounts->pluck('id')->toArray();
|
|
||||||
$yesterday = clone $start;
|
|
||||||
$yesterday->subDay();
|
|
||||||
$startSet = $this->getSet($ids, $yesterday); // get balances for start.
|
|
||||||
$backupSet = $this->getSet($ids, $start);
|
|
||||||
$endSet = $this->getSet($ids, $end);
|
|
||||||
|
|
||||||
$accounts->each(
|
|
||||||
function (Account $account) use ($startSet, $endSet, $backupSet) {
|
|
||||||
return self::reportFilter($account, $startSet, $endSet, $backupSet);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// summarize:
|
|
||||||
foreach ($accounts as $account) {
|
|
||||||
$startAmount = bcadd($startAmount, $account->startBalance);
|
|
||||||
$endAmount = bcadd($endAmount, $account->endBalance);
|
|
||||||
$diff = bcadd($diff, bcsub($account->endBalance, $account->startBalance));
|
|
||||||
}
|
|
||||||
|
|
||||||
$object = new AccountCollection;
|
|
||||||
$object->setStart($startAmount);
|
|
||||||
$object->setEnd($endAmount);
|
|
||||||
$object->setDifference($diff);
|
|
||||||
$object->setAccounts($accounts);
|
|
||||||
|
|
||||||
return $object;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $ids
|
|
||||||
* @param Carbon $date
|
|
||||||
*
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
private function getSet(array $ids, Carbon $date): Collection
|
|
||||||
{
|
|
||||||
return Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id')
|
|
||||||
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
|
||||||
->whereIn('accounts.id', $ids)
|
|
||||||
->whereNull('transaction_journals.deleted_at')
|
|
||||||
->whereNull('transactions.deleted_at')
|
|
||||||
->where('transaction_journals.date', '<=', $date->format('Y-m-d'))
|
|
||||||
->groupBy('accounts.id')
|
|
||||||
->get(['accounts.id', DB::raw('SUM(`transactions`.`amount`) as `balance`')]);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* AccountReportHelperInterface.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms
|
|
||||||
* of the MIT license. See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Helpers\Report;
|
|
||||||
|
|
||||||
use Carbon\Carbon;
|
|
||||||
use FireflyIII\Helpers\Collection\Account as AccountCollection;
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Interface AccountReportHelperInterface
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Helpers\Report
|
|
||||||
*/
|
|
||||||
interface AccountReportHelperInterface
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* This method generates a full report for the given period on all
|
|
||||||
* given accounts
|
|
||||||
*
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
* @param Collection $accounts
|
|
||||||
*
|
|
||||||
* @return AccountCollection
|
|
||||||
*/
|
|
||||||
public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection;
|
|
||||||
|
|
||||||
}
|
|
@@ -3,8 +3,10 @@
|
|||||||
* BalanceReportHelper.php
|
* BalanceReportHelper.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
@@ -126,7 +128,7 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
|||||||
->get(
|
->get(
|
||||||
[
|
[
|
||||||
't_destination.account_id',
|
't_destination.account_id',
|
||||||
DB::raw('SUM(`t_destination`.`amount`) as `sum`'),
|
DB::raw('SUM(t_destination.amount) AS sum'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BalanceReportHelperInterface.php
|
* BalanceReportHelperInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BudgetReportHelper.php
|
* BudgetReportHelper.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* BudgetReportHelperInterface.php
|
* BudgetReportHelperInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ReportHelper.php
|
* ReportHelper.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
@@ -22,7 +24,7 @@ use FireflyIII\Models\Bill;
|
|||||||
use FireflyIII\Models\Category;
|
use FireflyIII\Models\Category;
|
||||||
use FireflyIII\Models\Tag;
|
use FireflyIII\Models\Tag;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
@@ -30,6 +32,7 @@ use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
|||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Database\Query\JoinClause;
|
use Illuminate\Database\Query\JoinClause;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use stdClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ReportHelper
|
* Class ReportHelper
|
||||||
@@ -144,14 +147,14 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): Expense
|
public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): Expense
|
||||||
{
|
{
|
||||||
$object = new Expense;
|
$object = new Expense;
|
||||||
/** @var AccountRepositoryInterface $repos */
|
|
||||||
$repos = app(AccountRepositoryInterface::class);
|
|
||||||
$journals = $repos->expensesInPeriod($accounts, $start, $end);
|
|
||||||
|
|
||||||
/** @var TransactionJournal $entry */
|
/** @var AccountTaskerInterface $tasker */
|
||||||
foreach ($journals as $entry) {
|
$tasker = app(AccountTaskerInterface::class);
|
||||||
$amount = TransactionJournal::amount($entry);
|
$collection = $tasker->expenseReport($accounts, $accounts, $start, $end);
|
||||||
$object->addToTotal($amount);
|
|
||||||
|
/** @var stdClass $entry */
|
||||||
|
foreach ($collection as $entry) {
|
||||||
|
$object->addToTotal($entry->amount);
|
||||||
$object->addOrCreateExpense($entry);
|
$object->addOrCreateExpense($entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,13 +173,13 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): Income
|
public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): Income
|
||||||
{
|
{
|
||||||
$object = new Income;
|
$object = new Income;
|
||||||
/** @var AccountRepositoryInterface $repos */
|
/** @var AccountTaskerInterface $tasker */
|
||||||
$repos = app(AccountRepositoryInterface::class);
|
$tasker = app(AccountTaskerInterface::class);
|
||||||
$journals = $repos->incomesInPeriod($accounts, $start, $end);
|
$collection = $tasker->incomeReport($accounts, $accounts, $start, $end);
|
||||||
|
|
||||||
foreach ($journals as $entry) {
|
/** @var stdClass $entry */
|
||||||
$amount = TransactionJournal::amount($entry);
|
foreach ($collection as $entry) {
|
||||||
$object->addToTotal($amount);
|
$object->addToTotal($entry->amount);
|
||||||
$object->addOrCreateIncome($entry);
|
$object->addOrCreateIncome($entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,9 +258,19 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
|
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
|
||||||
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
|
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
|
||||||
->where(
|
->where(
|
||||||
function (Builder $q) use ($ids) {
|
// source.account_id in accountIds XOR destination.account_id in accountIds
|
||||||
$q->whereIn('source.account_id', $ids)
|
function (Builder $query) use ($ids) {
|
||||||
->whereIn('destination.account_id', $ids, 'xor');
|
$query->where(
|
||||||
|
function (Builder $q1) use ($ids) {
|
||||||
|
$q1->whereIn('source.account_id', $ids)
|
||||||
|
->whereNotIn('destination.account_id', $ids);
|
||||||
|
}
|
||||||
|
)->orWhere(
|
||||||
|
function (Builder $q2) use ($ids) {
|
||||||
|
$q2->whereIn('destination.account_id', $ids)
|
||||||
|
->whereNotIn('source.account_id', $ids);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
->get(['tags.id', 'tags.tag', 'transaction_journals.id as journal_id', 'destination.amount']);
|
->get(['tags.id', 'tags.tag', 'transaction_journals.id as journal_id', 'destination.amount']);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ReportHelperInterface.php
|
* ReportHelperInterface.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AccountController.php
|
* AccountController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
@@ -18,6 +20,7 @@ use FireflyIII\Http\Requests\AccountFormRequest;
|
|||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||||
|
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
||||||
use FireflyIII\Support\CacheProperties;
|
use FireflyIII\Support\CacheProperties;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@@ -91,19 +94,20 @@ class AccountController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param ARI $repository
|
||||||
* @param AccountCrudInterface $crud
|
* @param AccountCrudInterface $crud
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
public function destroy(AccountCrudInterface $crud, Account $account)
|
public function destroy(ARI $repository, AccountCrudInterface $crud, Account $account)
|
||||||
{
|
{
|
||||||
$type = $account->accountType->type;
|
$type = $account->accountType->type;
|
||||||
$typeName = config('firefly.shortNamesByFullName.' . $type);
|
$typeName = config('firefly.shortNamesByFullName.' . $type);
|
||||||
$name = $account->name;
|
$name = $account->name;
|
||||||
$moveTo = $crud->find(intval(Input::get('move_account_before_delete')));
|
$moveTo = $crud->find(intval(Input::get('move_account_before_delete')));
|
||||||
|
|
||||||
$crud->destroy($account, $moveTo);
|
$repository->destroy($account, $moveTo);
|
||||||
|
|
||||||
Session::flash('success', strval(trans('firefly.' . $typeName . '_deleted', ['name' => $name])));
|
Session::flash('success', strval(trans('firefly.' . $typeName . '_deleted', ['name' => $name])));
|
||||||
Preferences::mark();
|
Preferences::mark();
|
||||||
@@ -194,12 +198,14 @@ class AccountController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param AccountTaskerInterface $tasker
|
||||||
|
* @param AccountCrudInterface $crud
|
||||||
* @param ARI $repository
|
* @param ARI $repository
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
public function show(ARI $repository, Account $account)
|
public function show(AccountTaskerInterface $tasker, AccountCrudInterface $crud, ARI $repository, Account $account)
|
||||||
{
|
{
|
||||||
// show journals from current period only:
|
// show journals from current period only:
|
||||||
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $account->accountType->type);
|
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $account->accountType->type);
|
||||||
@@ -220,10 +226,7 @@ class AccountController extends Controller
|
|||||||
|
|
||||||
// grouped other months thing:
|
// grouped other months thing:
|
||||||
// oldest transaction in account:
|
// oldest transaction in account:
|
||||||
$start = $repository->firstUseDate($account);
|
$start = $repository->oldestJournalDate($account);
|
||||||
if ($start->year == 1900) {
|
|
||||||
$start = new Carbon;
|
|
||||||
}
|
|
||||||
$range = Preferences::get('viewRange', '1M')->data;
|
$range = Preferences::get('viewRange', '1M')->data;
|
||||||
$start = Navigation::startOfPeriod($start, $range);
|
$start = Navigation::startOfPeriod($start, $range);
|
||||||
$end = Navigation::endOfX(new Carbon, $range);
|
$end = Navigation::endOfX(new Carbon, $range);
|
||||||
@@ -243,11 +246,17 @@ class AccountController extends Controller
|
|||||||
return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle'));
|
return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only include asset accounts when this account is an asset:
|
||||||
|
$assets = new Collection;
|
||||||
|
if (in_array($account->accountType->type, [AccountType::ASSET, AccountType::DEFAULT])) {
|
||||||
|
$assets = $crud->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT]);
|
||||||
|
}
|
||||||
|
|
||||||
while ($end >= $start) {
|
while ($end >= $start) {
|
||||||
$end = Navigation::startOfPeriod($end, $range);
|
$end = Navigation::startOfPeriod($end, $range);
|
||||||
$currentEnd = Navigation::endOfPeriod($end, $range);
|
$currentEnd = Navigation::endOfPeriod($end, $range);
|
||||||
$spent = $this->spentInPeriod($account, $end, $currentEnd);
|
$spent = $tasker->amountOutInPeriod(new Collection([$account]), $assets, $end, $currentEnd);
|
||||||
$earned = $this->earnedInPeriod($account, $end, $currentEnd);
|
$earned = $tasker->amountInInPeriod(new Collection([$account]), $assets, $end, $currentEnd);
|
||||||
$dateStr = $end->format('Y-m-d');
|
$dateStr = $end->format('Y-m-d');
|
||||||
$dateName = Navigation::periodShow($end, $range);
|
$dateName = Navigation::periodShow($end, $range);
|
||||||
$entries->push([$dateStr, $dateName, $spent, $earned]);
|
$entries->push([$dateStr, $dateName, $spent, $earned]);
|
||||||
@@ -389,69 +398,4 @@ class AccountController extends Controller
|
|||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Asset accounts actually earn money by being the destination of a deposit or the destination
|
|
||||||
* of a transfer. The money moves to them.
|
|
||||||
*
|
|
||||||
* A revenue account doesn't really earn money itself. Money is earned "from" the revenue account.
|
|
||||||
* So, the call to find out how many money has been earned by/from a revenue account is slightly different.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param Account $account
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
private function earnedInPeriod(Account $account, Carbon $start, Carbon $end)
|
|
||||||
{
|
|
||||||
/** @var ARI $repository */
|
|
||||||
$repository = app(ARI::class);
|
|
||||||
$collection = new Collection([$account]);
|
|
||||||
$type = $account->accountType->type;
|
|
||||||
switch ($type) {
|
|
||||||
case AccountType::DEFAULT:
|
|
||||||
case AccountType::ASSET:
|
|
||||||
return $repository->earnedInPeriod($collection, $start, $end);
|
|
||||||
case AccountType::REVENUE:
|
|
||||||
return $repository->earnedFromInPeriod($collection, $start, $end);
|
|
||||||
default:
|
|
||||||
return '0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Asset accounts actually spend money by being the source of a withdrawal or the source
|
|
||||||
* of a transfer. The money moves away from them.
|
|
||||||
*
|
|
||||||
* An expense account doesn't really spend money itself. Money is spent "at" the expense account.
|
|
||||||
* So, the call to find out how many money has been spent on/at an expense account is slightly different.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param Account $account
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
private function spentInPeriod(Account $account, Carbon $start, Carbon $end): string
|
|
||||||
{
|
|
||||||
/** @var ARI $repository */
|
|
||||||
$repository = app(ARI::class);
|
|
||||||
$collection = new Collection([$account]);
|
|
||||||
$type = $account->accountType->type;
|
|
||||||
switch ($type) {
|
|
||||||
case AccountType::DEFAULT:
|
|
||||||
case AccountType::ASSET:
|
|
||||||
return $repository->spentInPeriod($collection, $start, $end);
|
|
||||||
case AccountType::EXPENSE:
|
|
||||||
return $repository->spentAtInPeriod($collection, $start, $end);
|
|
||||||
default:
|
|
||||||
return '0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ConfigurationController.php
|
* ConfigurationController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
@@ -58,6 +60,8 @@ class ConfigurationController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ConfigurationRequest $request
|
* @param ConfigurationRequest $request
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function store(ConfigurationRequest $request)
|
public function store(ConfigurationRequest $request)
|
||||||
{
|
{
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* DomainController.php
|
* DomainController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* HomeController.php
|
* HomeController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* UserController.php
|
* UserController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* AttachmentController.php
|
* AttachmentController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ConfirmationController.php
|
* ConfirmationController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* ForgotPasswordController.php
|
* ForgotPasswordController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
@@ -3,8 +3,10 @@
|
|||||||
* LoginController.php
|
* LoginController.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms of the
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
@@ -110,6 +112,8 @@ class LoginController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Show the application login form.
|
* Show the application login form.
|
||||||
*
|
*
|
||||||
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function showLoginForm(Request $request)
|
public function showLoginForm(Request $request)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user