Compare commits

...

64 Commits

Author SHA1 Message Date
James Cole
379916ee08 Merge branch 'release/5.1.0' 2020-03-06 05:27:27 +01:00
James Cole
60dbd51259 New meta files and translations. 2020-03-06 05:25:36 +01:00
James Cole
0927b0c8ae Accept strings like a good boy. 2020-03-03 19:36:03 +01:00
James Cole
40cc510057 Fix bad location storage. 2020-02-29 14:08:11 +01:00
James Cole
d580bf8f43 Fix untranslatable strings #3159 2020-02-29 13:58:34 +01:00
James Cole
4434ea40ee Add info about timezones. 2020-02-29 13:58:17 +01:00
James Cole
2ba6ffccbc Catch null pointers 2020-02-28 18:56:27 +01:00
James Cole
ec335ae88c Fix possible null pointer. 2020-02-28 18:53:20 +01:00
James Cole
542c64154c Fix for #3154 2020-02-27 17:35:21 +01:00
James Cole
e4fa437f78 Update libraries. 2020-02-26 20:29:04 +01:00
James Cole
61f3f995ad Update changelog, version and strings. 2020-02-26 20:28:54 +01:00
James Cole
8182cf1efa New texts. 2020-02-26 19:50:36 +01:00
James Cole
10d578503c Merge pull request #3146 from rubenverhoef/ING-CSV
Better CSV import for ING (NL)
2020-02-25 19:21:02 +00:00
Ruben Verhoef
75ee331f36 Move "Valutadatum" to own column
The new column has no name right now, need to fix this
2020-02-23 18:46:17 +01:00
Ruben Verhoef
a32c484fd5 fix typo row -> column 2020-02-23 18:45:56 +01:00
Ruben Verhoef
62d74e05f2 Fix saving accounts copy of account number to row 1 and name to row 3 2020-02-23 18:45:36 +01:00
Ruben Verhoef
23ec5cbaa7 Remove "Omschrijving" but not it's value, only the word. 2020-02-23 18:39:39 +01:00
Ruben Verhoef
21fcb6f853 Correctly remove the "Naam" and it's value 2020-02-23 18:38:21 +01:00
Ruben Verhoef
9b0a890531 Add also "Divers" transaction type 2020-02-23 18:37:41 +01:00
James Cole
af503597e6 Fix #3145 2020-02-23 14:01:08 +01:00
James Cole
e0c99fa80c Fix #3145 2020-02-23 13:15:48 +01:00
James Cole
a486d65893 Fix #3145 2020-02-23 12:42:28 +01:00
James Cole
08a6e22556 Fix redirect, courtesy of @SuperSandro2000 2020-02-23 11:11:38 +01:00
James Cole
2d5c4c8101 Merge tag '5.1.0-beta.1' into develop
5.1.0-beta.1
2020-02-23 07:47:40 +01:00
James Cole
4b7460c1cf Merge branch 'release/5.1.0-beta.1' 2020-02-23 07:47:37 +01:00
James Cole
8c8a2a1596 Fix query for attachment icon. 2020-02-23 07:38:23 +01:00
James Cole
ee7731b1a1 Render new JS 2020-02-23 07:09:51 +01:00
James Cole
36e4462957 Update some language strings. 2020-02-23 07:09:09 +01:00
James Cole
e71a4a5595 update version 2020-02-23 07:05:45 +01:00
James Cole
287aa76d8d update composer 2020-02-23 07:05:36 +01:00
James Cole
a9738fc2a9 Update changelog. 2020-02-23 07:05:30 +01:00
James Cole
bc485363ca Restore attachment icon (not yet in all views). Fixes #3142 2020-02-23 06:59:41 +01:00
James Cole
f53e9d91c0 Fix #3143 2020-02-23 06:37:37 +01:00
James Cole
99fd90ee49 Add installation ID 2020-02-23 06:37:04 +01:00
James Cole
fb77210f2c Add installation ID 2020-02-23 06:36:58 +01:00
James Cole
6c163ebef3 Add debug information. 2020-02-22 11:05:16 +01:00
James Cole
1d8f34275a Flash success message. 2020-02-22 06:28:18 +01:00
James Cole
1fcc2f6b39 Updated a lot of language strings. 2020-02-22 06:21:56 +01:00
James Cole
2eaa31163c Fix link #3140 2020-02-21 20:58:20 +01:00
James Cole
3de4441bcd Trigger cache to fix #3141 2020-02-21 20:47:10 +01:00
James Cole
cbc43b9dc1 Merge pull request #3137 from DanYoSon/trans-format-fix
add 2 <th> to fix header row border, fix alignment on action btn
2020-02-21 05:05:10 +00:00
Daniel Idzerda
d018c57b17 add 2 <th> to fix header row border, fix alignment on action btn 2020-02-20 20:21:03 -05:00
James Cole
a5d0658241 Fix #3135 2020-02-19 20:13:09 +01:00
James Cole
ce29beaf55 Fix bad role names #3129 2020-02-19 20:06:41 +01:00
James Cole
b11bcc1fbe Trigger cache, fixes #3127 2020-02-19 19:55:35 +01:00
James Cole
ab0e77a2e8 New and optimised Vue code, courtesy of @GaryQ 2020-02-19 17:13:01 +01:00
James Cole
80f0637c77 Fix #3130 2020-02-19 07:17:58 +01:00
James Cole
a280319a0b Merge pull request #3131 from cpmsmith/patch-1
Fix search modifiers claiming the whole query
2020-02-18 04:19:51 +00:00
Calum Smith
eb3a55d6e0 Fix search modifiers claiming the whole query
The regex was only restricting to characters without the Unicode property Other, which is most characters, including spaces.
2020-02-17 20:35:15 -05:00
James Cole
64a6661ea4 Update email address. 2020-02-16 14:00:57 +01:00
James Cole
7f46cf805c Update email address. 2020-02-16 13:59:55 +01:00
James Cole
d0d5dea5ce Update email address. 2020-02-16 13:59:41 +01:00
James Cole
018ca29184 Update email address. 2020-02-16 13:58:48 +01:00
James Cole
4b4f78b9eb Update email address. 2020-02-16 13:58:33 +01:00
James Cole
f084e742c9 Update email address. 2020-02-16 13:58:22 +01:00
James Cole
ab4de3fdd6 Update email address. 2020-02-16 13:57:18 +01:00
James Cole
9f7d5b8e88 Update email address. 2020-02-16 13:57:05 +01:00
James Cole
4958f6e4a6 Update email address. 2020-02-16 13:56:52 +01:00
James Cole
b3e3a17add Update email address. 2020-02-16 13:56:35 +01:00
James Cole
0b25fdd043 Update email address. 2020-02-16 13:56:25 +01:00
James Cole
cfc48ccc26 Update email address. 2020-02-16 13:55:59 +01:00
James Cole
3810085ea6 Update email address. 2020-02-16 13:55:52 +01:00
James Cole
0088886915 Update email address. 2020-02-16 13:55:32 +01:00
James Cole
c427404e5d Merge tag '5.1.0-alpha.1' into develop
5.1.0-alpha.1
2020-02-16 06:57:54 +01:00
1017 changed files with 3786 additions and 3150 deletions

View File

@@ -24,6 +24,7 @@ DEFAULT_LANGUAGE=en_US
# Change this value to your preferred time zone.
# Example: Europe/Amsterdam
# For a list of supported time zones, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ=Europe/Amsterdam
# This variable must match your installation's external address but keep in mind that

View File

@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at thegrumpydictator@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at james@firefly-iii.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

View File

@@ -4,7 +4,7 @@
## Feature requests
I am always interested in expanding Firefly III's many features. Just open a ticket or [drop me a line](mailto:thegrumpydictator@gmail.com).
I am always interested in expanding Firefly III's many features. Just open a ticket or [drop me a line](mailto:james@firefly-iii.org).
## Pull requests

2
.github/security.md vendored
View File

@@ -6,7 +6,7 @@ Only the latest version of Firefly III is supported. If you're not running the l
## Reporting a Vulnerability
If you find something that compromises the security of Firefly III, you should [send me a message](mailto:thegrumpydictator@gmail.com) as soon as possible. These issues will be fixed immediately. You can also open an issue, but if you feel the issue is sensitive, please drop me a message instead.
If you find something that compromises the security of Firefly III, you should [send me a message](mailto:james@firefly-iii.org) as soon as possible. These issues will be fixed immediately. You can also open an issue, but if you feel the issue is sensitive, please drop me a message instead.
You can use my [GPG key](https://keybase.io/jc5) for extra security. My [GitHub commits](https://github.com/firefly-iii/firefly-iii/commits/master) are almost always signed with this key.

View File

@@ -32,6 +32,7 @@ use Illuminate\Http\Response;
use Illuminate\Pagination\LengthAwarePaginator;
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection;
use Log;
/**
* Class AccountController
@@ -62,6 +63,7 @@ class AccountController extends Controller
*/
public function search(Request $request)
{
Log::debug('Now in account search()');
$manager = $this->getManager();
$query = $request->get('query');
$field = $request->get('field');
@@ -70,6 +72,8 @@ class AccountController extends Controller
return response(null, 422);
}
$types = $this->mapAccountTypes($type);
Log::debug(sprintf('Going to search for "%s" in types', $query), $types);
/** @var AccountSearch $search */
$search = app(AccountSearch::class);
$search->setUser(auth()->user());
@@ -79,6 +83,8 @@ class AccountController extends Controller
$accounts = $search->search();
Log::debug(sprintf('Found %d accounts', $accounts->count()));
/** @var AccountTransformer $transformer */
$transformer = app(AccountTransformer::class);
$transformer->setParameters($this->parameters);

View File

@@ -274,6 +274,7 @@ class TransactionController extends Controller
*/
public function store(TransactionStoreRequest $request): JsonResponse
{
Log::debug('Now in API TransactionController::store()');
$data = $request->getAll();
$data['user'] = auth()->user()->id;
@@ -283,6 +284,7 @@ class TransactionController extends Controller
try {
$transactionGroup = $this->groupRepository->store($data);
} catch (DuplicateTransactionException $e) {
Log::warning('Caught a duplicate. Return error message.');
// return bad validation message.
// TODO use Laravel's internal validation thing to do this.
$response = [
@@ -294,7 +296,7 @@ class TransactionController extends Controller
return response()->json($response, 422);
}
app('preferences')->mark();
event(new StoredTransactionGroup($transactionGroup));
$manager = $this->getManager();
@@ -338,6 +340,7 @@ class TransactionController extends Controller
$transactionGroup = $this->groupRepository->update($transactionGroup, $data);
$manager = $this->getManager();
app('preferences')->mark();
event(new UpdatedTransactionGroup($transactionGroup));
/** @var User $admin */

View File

@@ -30,7 +30,7 @@ use FireflyIII\Rules\IsDateOrTime;
use FireflyIII\Support\NullArrayObject;
use FireflyIII\Validation\TransactionValidation;
use Illuminate\Validation\Validator;
use Log;
/**
* Class TransactionStoreRequest
@@ -46,6 +46,7 @@ class TransactionStoreRequest extends Request
*/
public function authorize(): bool
{
Log::debug('Authorize TransactionStoreRequest');
// Only allow authenticated users
return auth()->check();
}
@@ -57,6 +58,7 @@ class TransactionStoreRequest extends Request
*/
public function getAll(): array
{
Log::debug('get all data in TransactionStoreRequest');
$data = [
'group_title' => $this->string('group_title'),
'error_if_duplicate_hash' => $this->boolean('error_if_duplicate_hash'),
@@ -73,6 +75,7 @@ class TransactionStoreRequest extends Request
*/
public function rules(): array
{
Log::debug('Collect rules of TransactionStoreRequest');
$rules = [
// basic fields for group:
'group_title' => 'between:1,1000|nullable',
@@ -260,11 +263,11 @@ class TransactionStoreRequest extends Request
'tags' => $this->arrayFromValue($object['tags']),
// all custom fields:
'internal_reference' => $this->stringFromValue($object['internal_reference']),
'external_id' => $this->stringFromValue($object['external_id']),
'internal_reference' => $this->stringFromValue((string)$object['internal_reference']),
'external_id' => $this->stringFromValue((string)$object['external_id']),
'original_source' => sprintf('ff3-v%s|api-v%s', config('firefly.version'), config('firefly.api_version')),
'recurrence_id' => $this->integerFromValue($object['recurrence_id']),
'bunq_payment_id' => $this->stringFromValue($object['bunq_payment_id']),
'bunq_payment_id' => $this->stringFromValue((string)$object['bunq_payment_id']),
'sepa_cc' => $this->stringFromValue($object['sepa_cc']),
'sepa_ct_op' => $this->stringFromValue($object['sepa_ct_op']),

View File

@@ -65,6 +65,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
return parent::render($request, $exception);
case 'accounts.show':
case 'accounts.show.all':
return $this->handleAccount($request, $exception);
case 'transactions.show':
return $this->handleGroup($request, $exception);

View File

@@ -2,7 +2,7 @@
/**
* AccountFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -2,7 +2,7 @@
/**
* AccountMetaFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AttachmentFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -2,7 +2,7 @@
/**
* BillFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* BudgetFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* CategoryFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* PiggyBankEventFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* PiggyBankFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RecurrenceFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TagFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionCurrencyFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -2,7 +2,7 @@
/**
* TransactionFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionGroupFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
@@ -26,6 +26,7 @@ namespace FireflyIII\Factory;
use FireflyIII\Exceptions\DuplicateTransactionException;
use FireflyIII\Models\TransactionGroup;
use FireflyIII\User;
use Log;
/**
* Class TransactionGroupFactory
@@ -60,7 +61,12 @@ class TransactionGroupFactory
$this->journalFactory->setUser($this->user);
$this->journalFactory->setErrorOnHash($data['error_if_duplicate_hash'] ?? false);
$collection = $this->journalFactory->create($data);
try {
$collection = $this->journalFactory->create($data);
} catch(DuplicateTransactionException $e) {
Log::warning('GroupFactory::create() caught journalFactory::create() with a duplicate!');
throw new DuplicateTransactionException($e->getMessage());
}
$title = $data['group_title'] ?? null;
$title = '' === $title ? null : $title;

View File

@@ -2,7 +2,7 @@
/**
* TransactionJournalFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
@@ -129,11 +129,11 @@ class TransactionJournalFactory
public function create(array $data): Collection
{
// convert to special object.
$data = new NullArrayObject($data);
$dataObject = new NullArrayObject($data);
Log::debug('Start of TransactionJournalFactory::create()');
$collection = new Collection;
$transactions = $data['transactions'] ?? [];
$transactions = $dataObject['transactions'] ?? [];
if (0 === count($transactions)) {
Log::error('There are no transactions in the array, the TransactionJournalFactory cannot continue.');
@@ -145,7 +145,12 @@ class TransactionJournalFactory
Log::debug(sprintf('Now creating journal %d/%d', $index + 1, count($transactions)));
Log::debug('Going to call createJournal', $row);
$journal = $this->createJournal(new NullArrayObject($row));
try {
$journal = $this->createJournal(new NullArrayObject($row));
} catch (DuplicateTransactionException|Exception $e) {
Log::warning('TransactionJournalFactory::create() caught a duplicate journal in createJournal()');
throw new DuplicateTransactionException($e->getMessage());
}
if (null !== $journal) {
$collection->push($journal);
}
@@ -395,17 +400,20 @@ class TransactionJournalFactory
*/
private function errorIfDuplicate(string $hash): void
{
Log::debug(sprintf('In errorIfDuplicate(%s)', $hash));
if (false === $this->errorOnHash) {
return;
}
$result = null;
if ($this->errorOnHash) {
Log::debug('Will verify duplicate!');
/** @var TransactionJournalMeta $result */
$result = TransactionJournalMeta::where('data', json_encode($hash, JSON_THROW_ON_ERROR))
->with(['transactionJournal', 'transactionJournal.transactionGroup'])
->first();
}
if (null !== $result) {
Log::warning('Found a duplicate!');
throw new DuplicateTransactionException(sprintf('Duplicate of transaction #%d.', $result->transactionJournal->transaction_group_id));
}
}
@@ -526,6 +534,9 @@ class TransactionJournalFactory
public function setErrorOnHash(bool $errorOnHash): void
{
$this->errorOnHash = $errorOnHash;
if (true === $errorOnHash) {
Log::info('Will trigger duplication alert for this journal.');
}
}

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionJournalMetaFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -2,7 +2,7 @@
/**
* TransactionTypeFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -60,6 +60,8 @@ class GroupCollector implements GroupCollectorInterface
private $hasCatInformation;
/** @var bool Will be true of the query has the tag info tables joined. */
private $hasJoinedTagTables;
/** @var bool Will be true for attachments */
private $hasJoinedAttTables;
/** @var int The maximum number of results. */
private $limit;
/** @var int The page to return. */
@@ -86,7 +88,8 @@ class GroupCollector implements GroupCollectorInterface
$this->hasBudgetInformation = false;
$this->hasBillInformation = false;
$this->hasJoinedTagTables = false;
$this->integerFields = [
$this->hasJoinedAttTables = false;
$this->integerFields = [
'transaction_group_id',
'user_id',
'transaction_journal_id',
@@ -101,10 +104,10 @@ class GroupCollector implements GroupCollectorInterface
'destination_transaction_id',
'destination_account_id',
'category_id',
'budget_id'
'budget_id',
];
$this->total = 0;
$this->fields = [
$this->total = 0;
$this->fields = [
# group
'transaction_groups.id as transaction_group_id',
'transaction_groups.user_id as user_id',
@@ -281,11 +284,10 @@ class GroupCollector implements GroupCollectorInterface
*/
public function getGroups(): Collection
{
$start = microtime(true);
//$start = microtime(true);
/** @var Collection $result */
$result = $this->query->get($this->fields);
$end = round(microtime(true) - $start, 5);
//$end = round(microtime(true) - $start, 5);
// log info about query time.
//Log::info(sprintf('Query took Firefly III %s seconds', $end));
//Log::info($this->query->toSql(), $this->query->getBindings());
@@ -950,6 +952,24 @@ class GroupCollector implements GroupCollectorInterface
}
}
/**
* Join table to get attachment information.
*/
private function joinAttachmentTables(): void
{
if (false === $this->hasJoinedAttTables) {
// join some extra tables:
$this->hasJoinedAttTables = true;
$this->query->leftJoin('attachments', 'attachments.attachable_id', '=', 'transaction_journals.id')
->where(
static function (EloquentBuilder $q1) {
$q1->where('attachments.attachable_type', TransactionJournal::class);
$q1->orWhereNull('attachments.attachable_type');
}
);
}
}
/**
* @param array $existingJournal
* @param TransactionJournal $newJournal
@@ -980,6 +1000,26 @@ class GroupCollector implements GroupCollectorInterface
return $existingJournal;
}
/**
* @param array $existingJournal
* @param TransactionJournal $newJournal
*
* @return array
*/
private function mergeAttachments(array $existingJournal, TransactionJournal $newJournal): array
{
$newArray = $newJournal->toArray();
if (isset($newArray['attachment_id'])) {
$attachmentId = (int)$newJournal['tag_id'];
$existingJournal['attachments'][$attachmentId] = [
'id' => $attachmentId,
];
}
return $existingJournal;
}
/**
* @param Collection $collection
*
@@ -994,7 +1034,7 @@ class GroupCollector implements GroupCollectorInterface
if (!isset($groups[$groupId])) {
// make new array
$parsedGroup = $this->parseAugmentedGroup($augumentedJournal);
$parsedGroup = $this->parseAugmentedJournal($augumentedJournal);
$groupArray = [
'id' => (int)$augumentedJournal->transaction_group_id,
'user_id' => (int)$augumentedJournal->user_id,
@@ -1014,11 +1054,14 @@ class GroupCollector implements GroupCollectorInterface
$groups[$groupId]['count']++;
if (isset($groups[$groupId]['transactions'][$journalId])) {
// append data to existing group + journal (for multiple tags or multiple attachments)
$groups[$groupId]['transactions'][$journalId] = $this->mergeTags($groups[$groupId]['transactions'][$journalId], $augumentedJournal);
$groups[$groupId]['transactions'][$journalId] = $this->mergeAttachments($groups[$groupId]['transactions'][$journalId], $augumentedJournal);
}
if (!isset($groups[$groupId]['transactions'][$journalId])) {
$groups[$groupId]['transactions'][$journalId] = $this->parseAugmentedGroup($augumentedJournal);
// create second, third, fourth split:
$groups[$groupId]['transactions'][$journalId] = $this->parseAugmentedJournal($augumentedJournal);
}
@@ -1034,10 +1077,11 @@ class GroupCollector implements GroupCollectorInterface
*
* @return array
*/
private function parseAugmentedGroup(TransactionJournal $augumentedJournal): array
private function parseAugmentedJournal(TransactionJournal $augumentedJournal): array
{
$result = $augumentedJournal->toArray();
$result['tags'] = [];
$result = $augumentedJournal->toArray();
$result['tags'] = [];
$result['attachments'] = [];
try {
$result['date'] = new Carbon($result['date']);
$result['created_at'] = new Carbon($result['created_at']);
@@ -1067,6 +1111,14 @@ class GroupCollector implements GroupCollectorInterface
];
}
// also merge attachments:
if (isset($augumentedJournal['attachment_id'])) {
$attachmentId = (int)$augumentedJournal['attachment_id'];
$result['attachments'][$attachmentId] = [
'id' => $attachmentId,
];
}
return $result;
}
@@ -1230,4 +1282,15 @@ class GroupCollector implements GroupCollectorInterface
return $this;
}
/**
* @inheritDoc
*/
public function withAttachmentInformation(): GroupCollectorInterface
{
$this->fields[] = 'attachments.id as attachment_id';
$this->joinAttachmentTables();
return $this;
}
}

View File

@@ -57,6 +57,13 @@ interface GroupCollectorInterface
*/
public function amountLess(string $amount): GroupCollectorInterface;
/**
* Add basic info on attachments of transactions.
*
* @return GroupCollectorInterface
*/
public function withAttachmentInformation(): GroupCollectorInterface;
/**
* Get transactions where the amount is more than.
*

View File

@@ -114,7 +114,7 @@ class CategoryController extends Controller
$cache->addProperty($end);
$cache->addProperty('chart.category.frontpage');
if ($cache->has()) {
return response()->json($cache->get()); // @codeCoverageIgnore
// return response()->json($cache->get()); // @codeCoverageIgnore
}
// currency repos:
@@ -163,22 +163,24 @@ class CategoryController extends Controller
// no category per currency:
$noCategory = $noCatRepository->sumExpenses($start, $end);
if (0 !== bccomp($noCategory[0]['sum'] ?? '0', '0')) {
foreach ($noCategory as $currency) {
$currencyId = $currency['currency_id'];
$currencies[$currencyId] = $currencies[$currencyId] ?? [
'currency_id' => $currency['currency_id'],
'currency_name' => $currency['currency_name'],
'currency_symbol' => $currency['currency_symbol'],
'currency_code' => $currency['currency_code'],
'currency_decimal_places' => $currency['currency_decimal_places'],
foreach ($noCategory as $currency) {
$currencyId = $currency['currency_id'];
$currencies[$currencyId] = $currencies[$currencyId] ?? [
'currency_id' => $currency['currency_id'],
'currency_name' => $currency['currency_name'],
'currency_symbol' => $currency['currency_symbol'],
'currency_code' => $currency['currency_code'],
'currency_decimal_places' => $currency['currency_decimal_places'],
];
$tempData[] = [
'name' => trans('firefly.no_category'),
'sum' => $currency['sum'],
'sum_float' => round($currency['sum'], $currency['currency_decimal_places'] ?? 2),
'currency_id' => $currency['currency_id'],
];
$tempData[] = [
'name' => trans('firefly.no_category'),
'sum' => $currency['sum'],
'sum_float' => round($currency['sum'], $currency['currency_decimal_places']),
'currency_id' => $currency['currency_id'],
];
}
}
// sort temp array by amount.
@@ -203,6 +205,7 @@ class CategoryController extends Controller
$name = $entry['name'];
$chartData[$currencyId]['entries'][$name] = bcmul($entry['sum'], '-1');
}
$data = $this->generator->multiSet($chartData);
$cache->store($data);

View File

@@ -118,6 +118,7 @@ class DebugController extends Controller
$search = ['~', '#'];
$replace = ['\~', '# '];
$installationId = app('fireflyconfig')->get('installation_id', '')->data;
$phpVersion = str_replace($search, $replace, PHP_VERSION);
$phpOs = str_replace($search, $replace, PHP_OS);
$interface = PHP_SAPI;
@@ -126,8 +127,6 @@ class DebugController extends Controller
$drivers = implode(', ', DB::availableDrivers());
$currentDriver = DB::getDriverName();
$userAgent = $request->header('user-agent');
$isSandstorm = var_export(config('firefly.is_sandstorm'), true);
$toSandbox = var_export(config('firefly.bunq_use_sandbox'), true);
$trustedProxies = config('firefly.trusted_proxies');
$displayErrors = ini_get('display_errors');
$errorReporting = $this->errorReporting((int)ini_get('error_reporting'));
@@ -174,9 +173,10 @@ class DebugController extends Controller
return view(
'debug', compact(
'phpVersion', 'extensions', 'localeAttempts', 'appEnv', 'appDebug', 'logChannel', 'appLogLevel', 'now', 'drivers', 'currentDriver', 'loginProvider',
'userAgent', 'displayErrors', 'errorReporting', 'phpOs', 'interface', 'logContent', 'cacheDriver', 'isSandstorm', 'trustedProxies', 'toSandbox'
)
'phpVersion', 'extensions', 'localeAttempts', 'appEnv', 'appDebug', 'logChannel', 'appLogLevel', 'now', 'drivers', 'currentDriver',
'loginProvider',
'userAgent', 'displayErrors', 'installationId', 'errorReporting', 'phpOs', 'interface', 'logContent', 'cacheDriver', 'trustedProxies'
)
);
}

View File

@@ -185,7 +185,7 @@ class BoxController extends Controller
foreach ($set as $journal) {
$currencyId = (int)$journal['currency_id'];
$expenses[$currencyId] = $expenses[$currencyId] ?? '0';
$expenses[$currencyId] = bcadd($expenses[$currencyId], $journal['amount']);
$expenses[$currencyId] = bcadd($expenses[$currencyId], $journal['amount'] ?? '0');
$sums[$currencyId] = $sums[$currencyId] ?? '0';
$sums[$currencyId] = bcadd($sums[$currencyId], $journal['amount']);
}

View File

@@ -70,6 +70,12 @@ class CreateController extends Controller
$service = app(GroupCloneService::class);
$newGroup = $service->cloneGroup($group);
app('preferences')->mark();
$title = $newGroup->title ?? $newGroup->transactionJournals->first()->description;
session()->flash('success', trans('firefly.stored_journal', ['description' => $title]));
return redirect(route('transactions.show', [$newGroup->id]));
}

View File

@@ -107,7 +107,8 @@ class IndexController extends Controller
->setPage($page)
->withBudgetInformation()
->withCategoryInformation()
->withAccountInformation();
->withAccountInformation()
->withAttachmentInformation();
$groups = $collector->getPaginatedGroups();
$groups->setPath($path);
@@ -147,7 +148,8 @@ class IndexController extends Controller
->setPage($page)
->withAccountInformation()
->withBudgetInformation()
->withCategoryInformation();
->withCategoryInformation()
->withAttachmentInformation();
$groups = $collector->getPaginatedGroups();
$groups->setPath($path);

View File

@@ -88,7 +88,7 @@ class ShowController extends Controller
throw new FireflyException('This transaction is broken :(.');
}
$type = $first->transactionType->type;
$type = (string)trans(sprintf('firefly.%s',$first->transactionType->type));
$title = 1 === $splits ? $first->description : $transactionGroup->title;
$subTitle = sprintf('%s: "%s"', $type, $title);

View File

@@ -347,6 +347,7 @@ class Request extends FormRequest
$longitudeKey = null === $prefix ? 'longitude' : sprintf('%s_longitude', $prefix);
$latitudeKey = null === $prefix ? 'latitude' : sprintf('%s_latitude', $prefix);
$zoomLevelKey = null === $prefix ? 'zoom_level' : sprintf('%s_zoom_level', $prefix);
$hasLocationKey = null === $prefix ? 'has_location' : sprintf('%s_has_location', $prefix);
// for a POST (store, all fields must be present and accounted for:
if (
@@ -354,7 +355,8 @@ class Request extends FormRequest
&& ($this->has($longitudeKey) && $this->has($latitudeKey) && $this->has($zoomLevelKey))
) {
Log::debug('Method is POST and all fields present.');
$data['store_location'] = true;
$data['store_location'] = $this->boolean($hasLocationKey);
$data['longitude'] = '' === $this->string($longitudeKey) ? null : $this->string($longitudeKey);
$data['latitude'] = '' === $this->string($latitudeKey) ? null : $this->string($latitudeKey);
$data['zoom_level'] = '' === $this->string($zoomLevelKey) ? null : $this->integer($zoomLevelKey);

View File

@@ -70,18 +70,22 @@ class IngDescription implements SpecificInterface
public function run(array $row): array
{
$this->row = array_values($row);
array_push($this->row); // New column for "Valutadatum"
if (count($this->row) >= 8) { // check if the array is correct
switch ($this->row[4]) { // Get value for the mutation type
case 'GT': // InternetBankieren
case 'OV': // Overschrijving
case 'VZ': // Verzamelbetaling
case 'IC': // Incasso
$this->removeIBANIngDescription();
$this->removeNameIngDescription();
// if "tegenrekening" empty, copy the description. Primitive, but it works.
$this->copyDescriptionToOpposite();
case 'DV': // Divers
$this->removeIBANIngDescription(); // Remove "IBAN:", because it is already at "Tegenrekening"
$this->removeNameIngDescription(); // Remove "Naam:", because it is already at "Naam/ Omschrijving"
$this->removeIngDescription(); // Remove "Omschrijving", but not the value from description
$this->moveValutadatumDescription(); // Move "Valutadatum" from description to new column
$this->MoveSavingsAccount(); // Move savings account number and name
break;
case 'BA': // Betaalautomaat
$this->moveValutadatumDescription(); // Move "Valutadatum" from description to new column
$this->addNameIngDescription();
break;
}
@@ -99,33 +103,60 @@ class IngDescription implements SpecificInterface
$this->row[8] = $this->row[1] . ' ' . $this->row[8];
}
/**
* Remove "Omschrijving" (and NOT its value) from the description.
*/
protected function removeIngDescription(): void
{
$this->row[8] = preg_replace('/Omschrijving: /', '', $this->row[8]);
}
/**
* Remove IBAN number out of the description
* Default description of Description is: Naam: <OPPOS NAME> Omschrijving: <DESCRIPTION> IBAN: <OPPOS IBAN NR>.
*/
protected function removeIBANIngDescription(): void
{
// Try replace the iban number with nothing. The IBAN nr is found in the third row
// Try replace the iban number with nothing. The IBAN nr is found in the third column
$this->row[8] = preg_replace('/\sIBAN:\s' . $this->row[3] . '/', '', $this->row[8]);
}
/**
* Remove name from the description (Remove everything before the description incl the word 'Omschrijving' ).
* Remove "Naam" (and its value) from the description.
*/
protected function removeNameIngDescription(): void
{
// Try remove everything before the 'Omschrijving'
$this->row[8] = preg_replace('/.+Omschrijving: /', '', $this->row[8]);
$this->row[8] = preg_replace('/Naam:.*?([a-zA-Z\/]+:)/', '$1', $this->row[8]);
}
/**
* Copy description to name of opposite account.
* Move "Valutadatum" from the description to new column.
*/
private function copyDescriptionToOpposite(): void
protected function moveValutadatumDescription(): void
{
$search = ['Naar Oranje Spaarrekening ', 'Afschrijvingen'];
$matches = array();
preg_match('/Valutadatum: ([0-9-]+)/', $this->row[8], $matches);
$this->row[9] = date("Ymd", strtotime($matches[1]));
$this->row[8] = preg_replace('/Valutadatum: [0-9-]+/', '', $this->row[8]);
}
/**
* Move savings account number to column 1 and name to column 3.
*/
private function MoveSavingsAccount(): void
{
$matches = array();
if ('' === (string)$this->row[3]) {
$this->row[3] = trim(str_ireplace($search, '', $this->row[8]));
if (preg_match('/(Naar|Van) (.*rekening) ([0-9]+)/', $this->row[8], $matches)) {
$matches[3] = sprintf("%010d", $matches[3]);
$this->row[1] = $matches[2]; // Savings account name
$this->row[3] = $matches[3]; // Savings account number
$this->row[8] = preg_replace('/(Naar|Van) (.*rekening) ([0-9]+)/', '', $this->row[8]); // Remove the savings account content from description
} elseif (preg_match('/(Naar|Van) (.*rekening) ([0-9]+)/', $this->row[1], $matches)) {
$matches[3] = sprintf("%010d", $matches[3]);
$this->row[1] = $matches[2]; // Savings account name
$this->row[3] = $matches[3]; // Savings account number
}
}
}
}

View File

@@ -1,7 +1,7 @@
<?php
/**
* Account.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AccountMeta.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AccountType.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Attachment.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AvailableBudget.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Bill.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Budget.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* BudgetLimit.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Category.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Configuration.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* CurrencyExchangeRate.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* ImportJob.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* LinkType.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Location.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Note.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* PiggyBank.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* PiggyBankEvent.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* PiggyBankRepetition.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Preference.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Recurrence.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RecurrenceMeta.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RecurrenceRepetition.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RecurrenceTransaction.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RecurrenceTransactionMeta.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Role.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Rule.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RuleAction.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RuleGroup.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RuleTrigger.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Tag.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* Transaction.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionCurrency.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionGroup.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionJournal.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionJournalLink.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionJournalMeta.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TransactionType.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AccountServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AdminServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AppServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AttachmentServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AuthServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* BillServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* BroadcastServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* BudgetServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* CategoryServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* CurrencyServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* EventServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* FireflyServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* FireflySessionProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* ImportServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* JournalServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* PiggyBankServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RecurringServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RouteServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RuleGroupServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* RuleServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* SearchServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* SessionServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* TagServiceProvider.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AccountRepository.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
@@ -473,7 +473,9 @@ class AccountRepository implements AccountRepositoryInterface
if (AccountType::ASSET !== $account->accountType->type) {
throw new FireflyException(sprintf('%s is not an asset account.', $account->name));
}
$name = $account->name . ' reconciliation';
$name = trans('firefly.reconciliation_account_name', ['name' => $account->name]);
/** @var AccountType $type */
$type = AccountType::where('type', AccountType::RECONCILIATION)->first();
$accounts = $this->user->accounts()->where('account_type_id', $type->id)->get();

View File

@@ -1,7 +1,7 @@
<?php
/**
* AccountRepositoryInterface.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AccountTasker.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* AccountTaskerInterface.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* OperationsRepository.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

View File

@@ -1,7 +1,7 @@
<?php
/**
* OperationsRepositoryInterface.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*

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