mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code cleanup.
This commit is contained in:
parent
260b611293
commit
962965b5b7
@ -10,7 +10,6 @@
|
||||
namespace FireflyIII\Crud\Split;
|
||||
|
||||
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
@ -14,7 +14,6 @@ namespace FireflyIII\Events;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class BudgetLimitStored
|
||||
@ -40,7 +39,6 @@ class BudgetLimitStored extends Event
|
||||
*/
|
||||
public function __construct(BudgetLimit $budgetLimit, Carbon $end)
|
||||
{
|
||||
Log::debug('Created new BudgetLimitStored.');
|
||||
//
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
$this->end = $end;
|
||||
|
@ -14,7 +14,6 @@ namespace FireflyIII\Events;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class BudgetLimitUpdated
|
||||
@ -40,7 +39,6 @@ class BudgetLimitUpdated extends Event
|
||||
*/
|
||||
public function __construct(BudgetLimit $budgetLimit, Carbon $end)
|
||||
{
|
||||
Log::debug('Created new BudgetLimitUpdated.');
|
||||
//
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
$this->end = $end;
|
||||
|
@ -12,7 +12,6 @@ namespace FireflyIII\Events;
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class TransactionJournalStored
|
||||
@ -35,7 +34,6 @@ class TransactionJournalStored extends Event
|
||||
*/
|
||||
public function __construct(TransactionJournal $journal, int $piggyBankId)
|
||||
{
|
||||
Log::debug('Created new TransactionJournalStored.');
|
||||
//
|
||||
$this->journal = $journal;
|
||||
$this->piggyBankId = $piggyBankId;
|
||||
|
@ -5,7 +5,6 @@ namespace FireflyIII\Events;
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class TransactionJournalUpdated
|
||||
@ -26,7 +25,6 @@ class TransactionJournalUpdated extends Event
|
||||
*/
|
||||
public function __construct(TransactionJournal $journal)
|
||||
{
|
||||
Log::debug('Created new TransactionJournalUpdated');
|
||||
//
|
||||
$this->journal = $journal;
|
||||
}
|
||||
|
@ -69,7 +69,6 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
// put the explanation string in a file and attach it as well.
|
||||
$file = $this->job->key . '-Source of all your attachments explained.txt';
|
||||
$this->exportDisk->put($file, $this->explanationString);
|
||||
Log::debug('Also put explanation file "' . $file . '" in the zip.');
|
||||
$this->getFiles()->push($file);
|
||||
|
||||
return true;
|
||||
@ -104,14 +103,12 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
private function exportAttachment(Attachment $attachment): bool
|
||||
{
|
||||
$file = $attachment->fileName();
|
||||
Log::debug('Original file is at "' . $file . '".');
|
||||
if ($this->uploadDisk->exists($file)) {
|
||||
try {
|
||||
$decrypted = Crypt::decrypt($this->uploadDisk->get($file));
|
||||
$exportFile = $this->exportFileName($attachment);
|
||||
$this->exportDisk->put($exportFile, $decrypted);
|
||||
$this->getFiles()->push($exportFile);
|
||||
Log::debug('Stored file content in new file "' . $exportFile . '", which will be in the final zip file.');
|
||||
|
||||
// explain:
|
||||
$this->explain($attachment);
|
||||
@ -144,8 +141,6 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
{
|
||||
$attachments = $this->repository->get();
|
||||
|
||||
Log::debug('Found ' . $attachments->count() . ' attachments.');
|
||||
|
||||
return $attachments;
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
||||
{
|
||||
// grab upload directory.
|
||||
$files = $this->uploadDisk->files();
|
||||
Log::debug('Found ' . count($files) . ' files in the upload directory.');
|
||||
|
||||
foreach ($files as $entry) {
|
||||
$this->processOldUpload($entry);
|
||||
@ -86,11 +85,9 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
||||
{
|
||||
$len = strlen($this->expected);
|
||||
if (substr($entry, 0, $len) === $this->expected) {
|
||||
Log::debug($entry . ' is part of this users original uploads.');
|
||||
|
||||
return true;
|
||||
}
|
||||
Log::debug($entry . ' is not part of this users original uploads.');
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -113,7 +110,6 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
||||
// continue with file:
|
||||
$date = $this->getOriginalUploadDate($entry);
|
||||
$file = $this->job->key . '-Old CSV import dated ' . $date . '.csv';
|
||||
Log::debug('Will put "' . $file . '" in the zip file.');
|
||||
$this->exportDisk->put($file, $content);
|
||||
$this->getFiles()->push($file);
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ namespace FireflyIII\Export;
|
||||
|
||||
use FireflyIII\Export\Entry\Entry;
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use Log;
|
||||
use Storage;
|
||||
|
||||
/**
|
||||
@ -58,8 +57,6 @@ class ConfigurationFile
|
||||
$configuration['roles'][] = $types[$field];
|
||||
}
|
||||
$file = $this->job->key . '-configuration.json';
|
||||
Log::debug('Created JSON config file.');
|
||||
Log::debug('Will put "' . $file . '" in the ZIP file.');
|
||||
$this->exportDisk->put($file, json_encode($configuration, JSON_PRETTY_PRINT));
|
||||
|
||||
return $file;
|
||||
|
@ -19,7 +19,6 @@ use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use Illuminate\Filesystem\FilesystemAdapter;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Storage;
|
||||
use ZipArchive;
|
||||
|
||||
@ -97,14 +96,6 @@ class Processor
|
||||
$repository = app(JournalRepositoryInterface::class);
|
||||
$this->journals = $repository->getJournalsInRange($this->accounts, $this->settings['startDate'], $this->settings['endDate']);
|
||||
|
||||
Log::debug(
|
||||
'Collected ' .
|
||||
$this->journals->count() . ' journals (between ' .
|
||||
$this->settings['startDate']->format('Y-m-d') . ' and ' .
|
||||
$this->settings['endDate']->format('Y-m-d')
|
||||
. ').'
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -133,7 +124,6 @@ class Processor
|
||||
$this->exportEntries->push(Entry::fromJournal($journal));
|
||||
$count++;
|
||||
}
|
||||
Log::debug('Converted ' . $count . ' journals to "Entry" objects.');
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -158,7 +148,6 @@ class Processor
|
||||
$zip = new ZipArchive;
|
||||
$file = $this->job->key . '.zip';
|
||||
$fullPath = storage_path('export') . '/' . $file;
|
||||
Log::debug('Will create zip file at ' . $fullPath);
|
||||
|
||||
if ($zip->open($fullPath, ZipArchive::CREATE) !== true) {
|
||||
throw new FireflyException('Cannot store zip file.');
|
||||
@ -170,7 +159,6 @@ class Processor
|
||||
$zipFileName = str_replace($this->job->key . '-', '', $entry);
|
||||
$result = $zip->addFromString($zipFileName, $disk->get($entry));
|
||||
if (!$result) {
|
||||
Log::error('Could not add "' . $entry . '" into zip file as "' . $zipFileName . '".');
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,7 +166,6 @@ class Processor
|
||||
|
||||
// delete the files:
|
||||
$this->deleteFiles($disk);
|
||||
Log::debug('Done!');
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -190,11 +177,9 @@ class Processor
|
||||
{
|
||||
$exporterClass = config('firefly.export_formats.' . $this->exportFormat);
|
||||
$exporter = app($exporterClass, [$this->job]);
|
||||
Log::debug('Going to export ' . $this->exportEntries->count() . ' export entries into ' . $this->exportFormat . ' format.');
|
||||
$exporter->setEntries($this->exportEntries);
|
||||
$exporter->run();
|
||||
$this->files->push($exporter->getFileName());
|
||||
Log::debug('Added "' . $exporter->getFileName() . '" to the list of files to include in the zip.');
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -212,9 +197,7 @@ class Processor
|
||||
*/
|
||||
private function deleteFiles(FilesystemAdapter $disk)
|
||||
{
|
||||
Log::debug('Class of $disk: ' . get_class($disk));
|
||||
foreach ($this->getFiles() as $file) {
|
||||
Log::debug('Will now delete file "' . $file . '".');
|
||||
$disk->delete($file);
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ namespace FireflyIII\Generator\Chart\Account;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
use Illuminate\Support\Collection;
|
||||
use Steam;
|
||||
|
||||
/**
|
||||
* Class ChartJsAccountChartGenerator
|
||||
@ -83,7 +82,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
|
||||
*/
|
||||
public function single(Account $account, array $labels, array $dataSet): array
|
||||
{
|
||||
$data = [
|
||||
$data = [
|
||||
'count' => 1,
|
||||
'labels' => $labels,
|
||||
'datasets' => [
|
||||
@ -93,6 +92,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,6 @@ namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use FireflyIII\Events\UserRegistration;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class AttachUserRole
|
||||
@ -38,13 +37,11 @@ class AttachUserRole
|
||||
*/
|
||||
public function handle(UserRegistration $event)
|
||||
{
|
||||
Log::debug('Trigger attachuserrole');
|
||||
/** @var UserRepositoryInterface $repository */
|
||||
$repository = app(UserRepositoryInterface::class);
|
||||
|
||||
// first user ever?
|
||||
if ($repository->count() == 1) {
|
||||
Log::debug('Will attach role.');
|
||||
$repository->attachRole($event->user, 'owner');
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Rules\Processor;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class FireRulesForStore
|
||||
@ -36,7 +35,6 @@ class FireRulesForStore
|
||||
*/
|
||||
public function handle(TransactionJournalStored $event): bool
|
||||
{
|
||||
Log::debug('Now running FireRulesForStore because TransactionJournalStored fired.');
|
||||
// get all the user's rule groups, with the rules, order by 'order'.
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
@ -44,7 +42,6 @@ class FireRulesForStore
|
||||
//
|
||||
/** @var RuleGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
Log::debug('Now processing group "' . $group->title . '".');
|
||||
$rules = $group->rules()
|
||||
->leftJoin('rule_triggers', 'rules.id', '=', 'rule_triggers.rule_id')
|
||||
->where('rule_triggers.trigger_type', 'user_action')
|
||||
@ -54,7 +51,6 @@ class FireRulesForStore
|
||||
/** @var Rule $rule */
|
||||
foreach ($rules as $rule) {
|
||||
|
||||
Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')');
|
||||
$processor = Processor::make($rule);
|
||||
$processor->handleTransactionJournal($event->journal);
|
||||
|
||||
|
@ -16,7 +16,6 @@ use FireflyIII\Models\Rule;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Rules\Processor;
|
||||
use FireflyIII\User;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class FireRulesForUpdate
|
||||
@ -34,7 +33,6 @@ class FireRulesForUpdate
|
||||
*/
|
||||
public function handle(TransactionJournalUpdated $event): bool
|
||||
{
|
||||
Log::debug('Now running FireRulesForUpdate because TransactionJournalUpdated fired.');
|
||||
// get all the user's rule groups, with the rules, order by 'order'.
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
@ -42,7 +40,6 @@ class FireRulesForUpdate
|
||||
//
|
||||
/** @var RuleGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
Log::debug('Now processing group "' . $group->title . '".');
|
||||
$rules = $group->rules()
|
||||
->leftJoin('rule_triggers', 'rules.id', '=', 'rule_triggers.rule_id')
|
||||
->where('rule_triggers.trigger_type', 'user_action')
|
||||
@ -51,9 +48,6 @@ class FireRulesForUpdate
|
||||
->get(['rules.*']);
|
||||
/** @var Rule $rule */
|
||||
foreach ($rules as $rule) {
|
||||
Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')');
|
||||
|
||||
Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')');
|
||||
$processor = Processor::make($rule);
|
||||
$processor->handleTransactionJournal($event->journal);
|
||||
|
||||
|
@ -73,10 +73,8 @@ class UserConfirmation
|
||||
*/
|
||||
private function doConfirm(User $user, string $ipAddress)
|
||||
{
|
||||
Log::debug('Trigger UserConfirmation::doConfirm');
|
||||
$confirmAccount = env('MUST_CONFIRM_ACCOUNT', false);
|
||||
if ($confirmAccount === false) {
|
||||
Log::debug('Confirm account is false, so user will be auto-confirmed.');
|
||||
Preferences::setForUser($user, 'user_confirmed', true);
|
||||
Preferences::setForUser($user, 'user_confirmed_last_mail', 0);
|
||||
Preferences::mark();
|
||||
@ -90,7 +88,6 @@ class UserConfirmation
|
||||
Preferences::setForUser($user, 'user_confirmed_last_mail', time());
|
||||
Preferences::setForUser($user, 'user_confirmed_code', $code);
|
||||
try {
|
||||
Log::debug('Now in try block for user email message thing to ' . $email . '.');
|
||||
Mail::send(
|
||||
['emails.confirm-account-html', 'emails.confirm-account'], ['route' => $route, 'ip' => $ipAddress],
|
||||
function (Message $message) use ($email) {
|
||||
@ -100,10 +97,8 @@ class UserConfirmation
|
||||
} catch (Swift_TransportException $e) {
|
||||
Log::error($e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
Log::debug('Caught general exception.');
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
Log::debug('Finished mail handling for activation.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -251,6 +251,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
$this->processFile($entry, $model);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@ use Auth;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class AssetAccountIban
|
||||
@ -27,7 +26,6 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface
|
||||
// is mapped? Then it's easy!
|
||||
if (isset($this->mapped[$this->index][$this->value])) {
|
||||
$account = $repository->find(intval($this->mapped[$this->index][$this->value]));
|
||||
Log::debug('Found mapped account for value "' . $this->value . '". It is account #' . $account->id);
|
||||
|
||||
return $account;
|
||||
}
|
||||
@ -54,13 +52,11 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface
|
||||
/** @var Account $entry */
|
||||
foreach ($set as $entry) {
|
||||
if ($entry->iban == $this->value) {
|
||||
Log::debug('Found an account with the same IBAN ("' . $this->value . '"). It is account #' . $entry->id);
|
||||
|
||||
return $entry;
|
||||
}
|
||||
}
|
||||
|
||||
Log::debug('Found no account with the same IBAN ("' . $this->value . '"), so will create a new one.');
|
||||
|
||||
// create it if doesn't exist.
|
||||
$accountData = [
|
||||
|
@ -26,7 +26,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
||||
|
||||
$currency = $repository->findByCode($this->value);
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ class CurrencyName extends BasicConverter implements ConverterInterface
|
||||
return $currency;
|
||||
}
|
||||
$currency = $repository->findByName($this->value);
|
||||
|
||||
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class CurrencySymbol extends BasicConverter implements ConverterInterface
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
||||
|
||||
$currency = $repository->findBySymbol($this->value);
|
||||
|
||||
|
||||
|
@ -108,7 +108,6 @@ class Importer
|
||||
|
||||
foreach ($this->data->getReader() as $index => $row) {
|
||||
if ($this->parseRow($index)) {
|
||||
Log::debug('--- Importing row ' . $index);
|
||||
$this->rows++;
|
||||
$result = $this->importRow($row);
|
||||
if (!($result instanceof TransactionJournal)) {
|
||||
@ -119,7 +118,6 @@ class Importer
|
||||
$this->journals->push($result);
|
||||
event(new TransactionJournalStored($result, 0));
|
||||
}
|
||||
Log::debug('---');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -221,7 +219,6 @@ class Importer
|
||||
$class = config('csv.roles.' . $role . '.converter');
|
||||
$field = config('csv.roles.' . $role . '.field');
|
||||
|
||||
Log::debug('Column #' . $index . ' (role: ' . $role . ') : converter ' . $class . ' stores its data into field ' . $field . ':');
|
||||
|
||||
// here would be the place where preprocessors would fire.
|
||||
|
||||
@ -275,7 +272,6 @@ class Importer
|
||||
if ($specifix->getProcessorType() == SpecifixInterface::POST_PROCESSOR) {
|
||||
$specifix->setData($this->importData);
|
||||
$specifix->setRow($this->importRow);
|
||||
Log::debug('Now post-process specifix named ' . $className . ':');
|
||||
$this->importData = $specifix->fix();
|
||||
}
|
||||
}
|
||||
@ -287,7 +283,6 @@ class Importer
|
||||
$postProcessor = app('FireflyIII\Helpers\Csv\PostProcessing\\' . $className);
|
||||
$array = $this->importData ?? [];
|
||||
$postProcessor->setData($array);
|
||||
Log::debug('Now post-process processor named ' . $className . ':');
|
||||
$this->importData = $postProcessor->process();
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use Log;
|
||||
use Validator;
|
||||
|
||||
/**
|
||||
@ -207,7 +206,6 @@ class AssetAccount implements PostProcessorInterface
|
||||
$accounts = Auth::user()->accounts()->where('account_type_id', $accountType->id)->get();
|
||||
foreach ($accounts as $entry) {
|
||||
if ($entry->name == $this->data['asset-account-name']) {
|
||||
Log::debug('Found an asset account with this name (#' . $entry->id . ': ******)');
|
||||
|
||||
return $entry;
|
||||
}
|
||||
@ -239,7 +237,6 @@ class AssetAccount implements PostProcessorInterface
|
||||
foreach ($accounts as $entry) {
|
||||
$metaFieldValue = $entry->getMeta('accountNumber');
|
||||
if ($metaFieldValue === $accountNumber && $metaFieldValue !== '') {
|
||||
Log::debug('Found an asset account with this account number (#' . $entry->id . ')');
|
||||
|
||||
return $entry;
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ namespace FireflyIII\Helpers\Csv\PostProcessing;
|
||||
use Auth;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use Log;
|
||||
use Validator;
|
||||
|
||||
/**
|
||||
@ -65,7 +64,6 @@ class OpposingAccount implements PostProcessorInterface
|
||||
$validator = Validator::make($check, $rules);
|
||||
if (is_string($iban) && strlen($iban) > 0 && !$validator->fails()) {
|
||||
|
||||
Log::debug('OpposingAccountPostProcession: opposing-account-iban is a string (******).');
|
||||
$this->data['opposing-account-object'] = $this->parseIbanString();
|
||||
|
||||
return $this->data;
|
||||
@ -80,13 +78,11 @@ class OpposingAccount implements PostProcessorInterface
|
||||
protected function checkIdNameObject()
|
||||
{
|
||||
if ($this->data['opposing-account-id'] instanceof Account) { // first priority. try to find the account based on ID, if any
|
||||
Log::debug('OpposingAccountPostProcession: opposing-account-id is an Account.');
|
||||
$this->data['opposing-account-object'] = $this->data['opposing-account-id'];
|
||||
|
||||
return $this->data;
|
||||
}
|
||||
if ($this->data['opposing-account-iban'] instanceof Account) { // second: try to find the account based on IBAN, if any.
|
||||
Log::debug('OpposingAccountPostProcession: opposing-account-iban is an Account.');
|
||||
$this->data['opposing-account-object'] = $this->data['opposing-account-iban'];
|
||||
|
||||
return $this->data;
|
||||
@ -101,7 +97,6 @@ class OpposingAccount implements PostProcessorInterface
|
||||
protected function checkNameString()
|
||||
{
|
||||
if ($this->data['opposing-account-name'] instanceof Account) { // third: try to find account based on name, if any.
|
||||
Log::debug('OpposingAccountPostProcession: opposing-account-name is an Account.');
|
||||
$this->data['opposing-account-object'] = $this->data['opposing-account-name'];
|
||||
|
||||
return $this->data;
|
||||
@ -135,7 +130,6 @@ class OpposingAccount implements PostProcessorInterface
|
||||
'active' => true,
|
||||
]
|
||||
);
|
||||
Log::debug('OpposingAccountPostProcession: created a new account.');
|
||||
|
||||
return $account;
|
||||
}
|
||||
@ -169,7 +163,6 @@ class OpposingAccount implements PostProcessorInterface
|
||||
$accounts = Auth::user()->accounts()->get();
|
||||
foreach ($accounts as $entry) {
|
||||
if ($entry->iban == $this->data['opposing-account-iban']) {
|
||||
Log::debug('OpposingAccountPostProcession: opposing-account-iban matches an Account.');
|
||||
|
||||
return $entry;
|
||||
}
|
||||
@ -189,7 +182,6 @@ class OpposingAccount implements PostProcessorInterface
|
||||
$accounts = Auth::user()->accounts()->where('account_type_id', $accountType->id)->get();
|
||||
foreach ($accounts as $entry) {
|
||||
if ($entry->name == $this->data['opposing-account-name']) {
|
||||
Log::debug('Found an account with this name (#' . $entry->id . ': ******)');
|
||||
|
||||
return $entry;
|
||||
}
|
||||
|
@ -2,8 +2,6 @@
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Specifix;
|
||||
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Parses the description from txt files for ABN AMRO bank accounts.
|
||||
*
|
||||
@ -71,7 +69,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface
|
||||
{
|
||||
// See if the current description is formatted in ABN AMRO format
|
||||
if (preg_match('/ABN AMRO.{24} (.*)/', $this->data['description'], $matches)) {
|
||||
Log::debug('AbnAmroSpecifix: Description is structured as costs from ABN AMRO itself.');
|
||||
|
||||
$this->data['opposing-account-name'] = 'ABN AMRO';
|
||||
$this->data['description'] = $matches[1];
|
||||
@ -91,7 +88,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface
|
||||
{
|
||||
// See if the current description is formatted in GEA/BEA format
|
||||
if (preg_match('/([BG]EA) +(NR:[a-zA-Z:0-9]+) +([0-9.\/]+) +([^,]*)/', $this->data['description'], $matches)) {
|
||||
Log::debug('AbnAmroSpecifix: Description is structured as GEA or BEA format.');
|
||||
|
||||
// description and opposing account will be the same.
|
||||
$this->data['opposing-account-name'] = $matches[4];
|
||||
@ -116,7 +112,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface
|
||||
{
|
||||
// See if the current description is formatted as a SEPA plain description
|
||||
if (preg_match('/^SEPA(.{28})/', $this->data['description'], $matches)) {
|
||||
Log::debug('AbnAmroSpecifix: Description is structured as SEPA plain description.');
|
||||
|
||||
$type = $matches[1];
|
||||
$reference = '';
|
||||
@ -130,7 +125,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface
|
||||
foreach ($matches as $match) {
|
||||
$key = $match[1];
|
||||
$value = trim($match[2]);
|
||||
Log::debug('SEPA: ' . $key . ' - ' . $value);
|
||||
switch (strtoupper($key)) {
|
||||
case 'OMSCHRIJVING':
|
||||
$newDescription = $value;
|
||||
@ -173,7 +167,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface
|
||||
{
|
||||
// See if the current description is formatted in TRTP format
|
||||
if (preg_match_all('!\/([A-Z]{3,4})\/([^/]*)!', $this->data['description'], $matches, PREG_SET_ORDER)) {
|
||||
Log::debug('AbnAmroSpecifix: Description is structured as TRTP format.');
|
||||
|
||||
$type = '';
|
||||
$name = '';
|
||||
|
@ -2,8 +2,6 @@
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Specifix;
|
||||
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class RabobankDescription
|
||||
*
|
||||
@ -58,14 +56,10 @@ class RabobankDescription extends Specifix implements SpecifixInterface
|
||||
*/
|
||||
protected function rabobankFixEmptyOpposing()
|
||||
{
|
||||
Log::debug('RaboSpecifix: Opposing account name is "******".');
|
||||
if (is_string($this->data['opposing-account-name']) && strlen($this->data['opposing-account-name']) == 0) {
|
||||
Log::debug('RaboSpecifix: opp-name is zero length, changed to: "******"');
|
||||
$this->data['opposing-account-name'] = $this->row[10];
|
||||
|
||||
Log::debug('Description was: "******".');
|
||||
$this->data['description'] = trim(str_replace($this->row[10], '', $this->data['description']));
|
||||
Log::debug('Description is now: "******".');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ namespace FireflyIII\Helpers\Help;
|
||||
|
||||
use Cache;
|
||||
use League\CommonMark\CommonMarkConverter;
|
||||
use Log;
|
||||
use Requests;
|
||||
use Route;
|
||||
|
||||
@ -44,11 +43,9 @@ class Help implements HelpInterface
|
||||
'title' => $title,
|
||||
];
|
||||
|
||||
Log::debug('Going to get from Github: ' . $uri);
|
||||
|
||||
$result = Requests::get($uri);
|
||||
|
||||
Log::debug('Status code was ' . $result->status_code . '.');
|
||||
|
||||
if ($result->status_code === 200) {
|
||||
$content['text'] = $result->body;
|
||||
@ -56,7 +53,6 @@ class Help implements HelpInterface
|
||||
|
||||
|
||||
if (strlen(trim($content['text'])) == 0) {
|
||||
Log::debug('No actual help text for this route (even though a page was found).');
|
||||
$content['text'] = '<p>' . strval(trans('firefly.route_has_no_help')) . '</p>';
|
||||
}
|
||||
$converter = new CommonMarkConverter();
|
||||
|
@ -64,7 +64,7 @@ class AccountReportHelper implements AccountReportHelperInterface
|
||||
return $account->id == $entry->id;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
if (!is_null($currentEnd->first())) {
|
||||
$account->endBalance = $currentEnd->first()->balance;
|
||||
}
|
||||
|
@ -17,18 +17,15 @@ use FireflyIII\Helpers\Collection\Balance;
|
||||
use FireflyIII\Helpers\Collection\BalanceEntry;
|
||||
use FireflyIII\Helpers\Collection\BalanceHeader;
|
||||
use FireflyIII\Helpers\Collection\BalanceLine;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Budget as BudgetModel;
|
||||
use FireflyIII\Models\LimitRepetition;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||
use Illuminate\Database\Query\JoinClause;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class BalanceReportHelper
|
||||
@ -67,19 +64,16 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance
|
||||
{
|
||||
$balance = new Balance;
|
||||
Log::debug('Build new report.');
|
||||
// build a balance header:
|
||||
$header = new BalanceHeader;
|
||||
$limitRepetitions = $this->budgetRepository->getAllBudgetLimitRepetitions($start, $end);
|
||||
foreach ($accounts as $account) {
|
||||
$header->addAccount($account);
|
||||
Log::debug('Add account #' . $account->id . ' to header.');
|
||||
}
|
||||
|
||||
/** @var LimitRepetition $repetition */
|
||||
foreach ($limitRepetitions as $repetition) {
|
||||
$budget = $this->budgetRepository->find($repetition->budget_id);
|
||||
Log::debug('Create and add balance line for budget #' . $budget->id);
|
||||
$balance->addBalanceLine($this->createBalanceLine($budget, $repetition, $accounts));
|
||||
}
|
||||
$noBudgetLine = $this->createNoBudgetLine($accounts, $start, $end);
|
||||
@ -155,7 +149,6 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
*/
|
||||
private function createBalanceLine(BudgetModel $budget, LimitRepetition $repetition, Collection $accounts): BalanceLine
|
||||
{
|
||||
Log::debug('Create line for budget #' . $budget->id . ' and repetition #' . $repetition->id);
|
||||
$line = new BalanceLine;
|
||||
$budget->amount = $repetition->amount;
|
||||
$line->setBudget($budget);
|
||||
|
@ -19,7 +19,6 @@ use FireflyIII\Models\LimitRepetition;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class BudgetReportHelper
|
||||
@ -45,12 +44,10 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
|
||||
/** @var Budget $budget */
|
||||
foreach ($set as $budget) {
|
||||
Log::debug('Now at budget #' . $budget->id . ' (' . $budget->name . ')');
|
||||
$repetitions = $budget->limitrepetitions()->before($end)->after($start)->get();
|
||||
|
||||
// no repetition(s) for this budget:
|
||||
if ($repetitions->count() == 0) {
|
||||
Log::debug('Found zero repetitions.');
|
||||
// spent for budget in time range:
|
||||
$spent = $repository->spentInPeriod(new Collection([$budget]), $accounts, $start, $end);
|
||||
|
||||
@ -63,7 +60,6 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
}
|
||||
continue;
|
||||
}
|
||||
Log::debug('Found ' . $repetitions->count() . ' repetitions.');
|
||||
// one or more repetitions for budget:
|
||||
/** @var LimitRepetition $repetition */
|
||||
foreach ($repetitions as $repetition) {
|
||||
@ -72,7 +68,6 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
$budgetLine->setBudget($budget);
|
||||
$budgetLine->setRepetition($repetition);
|
||||
$expenses = $repository->spentInPeriod(new Collection([$budget]), $accounts, $repetition->startdate, $repetition->enddate);
|
||||
Log::debug('Spent in p. [' . $repetition->startdate->format('Y-m-d') . '] to [' . $repetition->enddate->format('Y-m-d') . '] is ' . $expenses);
|
||||
|
||||
$left = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? bcadd($repetition->amount, $expenses) : '0';
|
||||
$spent = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? $expenses : '0';
|
||||
|
@ -13,7 +13,6 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
use Input;
|
||||
use Log;
|
||||
use Navigation;
|
||||
use Preferences;
|
||||
use Response;
|
||||
@ -193,7 +192,6 @@ class BudgetController extends Controller
|
||||
/** @var LimitRepetition $repetition */
|
||||
foreach ($allRepetitions as $repetition) {
|
||||
if ($repetition->budget_id == $budget->id) {
|
||||
Log::debug('Repetition #' . $repetition->id . ' with budget #' . $repetition->budget_id . ' (current = ' . $budget->id . ')');
|
||||
if ($repetition->budgetLimit->repeat_freq == $repeatFreq
|
||||
&& $repetition->startdate->format('Y-m-d') == $startAsString
|
||||
&& $repetition->enddate->format('Y-m-d') == $endAsString
|
||||
|
@ -53,7 +53,7 @@ class AccountController extends Controller
|
||||
$cache->addProperty('expenseAccounts');
|
||||
$cache->addProperty('accounts');
|
||||
if ($cache->has()) {
|
||||
return Response::json($cache->get());
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
$accounts = $repository->getAccountsByType(['Expense account', 'Beneficiary account']);
|
||||
|
||||
@ -105,7 +105,7 @@ class AccountController extends Controller
|
||||
$cache->addProperty('frontpage');
|
||||
$cache->addProperty('accounts');
|
||||
if ($cache->has()) {
|
||||
return Response::json($cache->get());
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
|
||||
$frontPage = Preferences::get('frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray());
|
||||
@ -151,7 +151,7 @@ class AccountController extends Controller
|
||||
$cache->addProperty('default');
|
||||
$cache->addProperty($accounts);
|
||||
if ($cache->has()) {
|
||||
return Response::json($cache->get());
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
|
||||
foreach ($accounts as $account) {
|
||||
@ -196,7 +196,7 @@ class AccountController extends Controller
|
||||
$cache->addProperty('single');
|
||||
$cache->addProperty($account->id);
|
||||
if ($cache->has()) {
|
||||
return Response::json($cache->get());
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
|
||||
$format = (string)trans('config.month_and_day');
|
||||
|
@ -12,7 +12,6 @@ use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Navigation;
|
||||
use Preferences;
|
||||
use Response;
|
||||
@ -67,7 +66,6 @@ class BudgetController extends Controller
|
||||
$budgetCollection = new Collection([$budget]);
|
||||
$last = Navigation::endOfX($last, $range, $final); // not to overshoot.
|
||||
$entries = new Collection;
|
||||
Log::debug('---- now at chart');
|
||||
while ($first < $last) {
|
||||
|
||||
// periodspecific dates:
|
||||
@ -115,7 +113,6 @@ class BudgetController extends Controller
|
||||
$entries = new Collection;
|
||||
$amount = $repetition->amount;
|
||||
$budgetCollection = new Collection([$budget]);
|
||||
Log::debug('amount starts ' . $amount);
|
||||
while ($start <= $end) {
|
||||
$spent = $repository->spentInPeriod($budgetCollection, new Collection, $start, $start);
|
||||
$amount = bcadd($amount, $spent);
|
||||
|
@ -11,7 +11,6 @@ use FireflyIII\Models\Category;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Navigation;
|
||||
use Preferences;
|
||||
use Response;
|
||||
@ -69,10 +68,9 @@ class CategoryController extends Controller
|
||||
|
||||
while ($start <= $end) {
|
||||
$currentEnd = Navigation::endOfPeriod($start, $range);
|
||||
Log::debug('Searching for expenses from ' . $start . ' to ' . $currentEnd);
|
||||
$spent = $repository->spentInPeriod($categoryCollection, new Collection, $start, $currentEnd);
|
||||
$earned = $repository->earnedInPeriod($categoryCollection, new Collection, $start, $currentEnd);
|
||||
$date = Navigation::periodShow($start, $range);
|
||||
$spent = $repository->spentInPeriod($categoryCollection, new Collection, $start, $currentEnd);
|
||||
$earned = $repository->earnedInPeriod($categoryCollection, new Collection, $start, $currentEnd);
|
||||
$date = Navigation::periodShow($start, $range);
|
||||
$entries->push([clone $start, $date, $spent, $earned]);
|
||||
$start = Navigation::addPeriod($start, $range, 0);
|
||||
}
|
||||
@ -126,7 +124,6 @@ class CategoryController extends Controller
|
||||
/** @var Category $category */
|
||||
foreach ($categories as $category) {
|
||||
$spent = $repository->spentInPeriod(new Collection([$category]), new Collection, $start, $end);
|
||||
Log::debug('Spent for ' . $category->name . ' is ' . $spent . ' (' . bccomp($spent, '0') . ')');
|
||||
if (bccomp($spent, '0') === -1) {
|
||||
$category->spent = $spent;
|
||||
$set->push($category);
|
||||
@ -255,17 +252,13 @@ class CategoryController extends Controller
|
||||
$cache->addProperty('specific-period');
|
||||
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
$entries = new Collection;
|
||||
Log::debug('Start is ' . $start . ' en end is ' . $end);
|
||||
while ($start <= $end) {
|
||||
Log::debug('Now at ' . $start);
|
||||
$spent = $repository->spentInPeriod($categoryCollection, new Collection, $start, $start);
|
||||
Log::debug('spent: ' . $spent);
|
||||
$spent = $repository->spentInPeriod($categoryCollection, new Collection, $start, $start);
|
||||
$earned = $repository->earnedInPeriod($categoryCollection, new Collection, $start, $start);
|
||||
Log::debug('earned: ' . $earned);
|
||||
$date = Navigation::periodShow($start, '1D');
|
||||
$date = Navigation::periodShow($start, '1D');
|
||||
$entries->push([clone $start, $date, $spent, $earned]);
|
||||
$start->addDay();
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ class ReportController extends Controller
|
||||
$cache->addProperty($accounts);
|
||||
$cache->addProperty($end);
|
||||
if ($cache->has()) {
|
||||
return Response::json($cache->get());
|
||||
return Response::json($cache->get());
|
||||
}
|
||||
|
||||
// always per month.
|
||||
|
@ -311,12 +311,10 @@ class CsvController extends Controller
|
||||
return redirect(route('csv.index'));
|
||||
}
|
||||
|
||||
Log::debug('Created importer');
|
||||
/** @var Importer $importer */
|
||||
$importer = app(Importer::class);
|
||||
$importer->setData($this->data);
|
||||
$importer->run();
|
||||
Log::debug('Done importing!');
|
||||
|
||||
$rows = $importer->getRows();
|
||||
$errors = $importer->getErrors();
|
||||
|
@ -19,7 +19,6 @@ use FireflyIII\Http\Requests\ExportFormRequest;
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface as EJRI;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Response;
|
||||
use Storage;
|
||||
@ -62,7 +61,6 @@ class ExportController extends Controller
|
||||
|
||||
|
||||
$job->change('export_downloaded');
|
||||
Log::debug('Will send user file "' . $file . '".');
|
||||
|
||||
return response($disk->get($file), 200)
|
||||
->header('Content-Description', 'File Transfer')
|
||||
|
@ -49,7 +49,6 @@ class HelpController extends Controller
|
||||
return Response::json($content);
|
||||
}
|
||||
|
||||
Log::debug('Will get help from Github for language "' . $language . '" and route "' . $route . '".');
|
||||
$content = $help->getFromGithub($language, $route);
|
||||
|
||||
$help->putInCache($route, $language, $content);
|
||||
|
@ -226,7 +226,7 @@ class ReportController extends Controller
|
||||
}
|
||||
);
|
||||
|
||||
$view = view('popup.report.income-entry', compact('journals', 'account'))->render();
|
||||
$view = view('popup.report.income-entry', compact('journals', 'account'))->render();
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use Steam;
|
||||
@ -100,7 +99,6 @@ class ReportController extends Controller
|
||||
|
||||
// lower threshold
|
||||
if ($start < session('first')) {
|
||||
Log::debug('Start is ' . $start . ' but session first is ' . session('first'));
|
||||
$start = session('first');
|
||||
}
|
||||
|
||||
@ -167,7 +165,7 @@ class ReportController extends Controller
|
||||
* Is there even activity on this account between the requested dates?
|
||||
*/
|
||||
if ($start->between($first, $last) || $end->between($first, $last)) {
|
||||
$exists = true;
|
||||
$exists = true;
|
||||
$journals = $repos->journalsInPeriod($accounts, [], $start, $end);
|
||||
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ use FireflyIII\Http\Requests\SplitJournalFormRequest;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use Steam;
|
||||
@ -198,7 +197,6 @@ class SplitController extends Controller
|
||||
private function arrayFromJournal(Request $request, TransactionJournal $journal): array
|
||||
{
|
||||
if (Session::has('_old_input')) {
|
||||
Log::debug('Old input: ', session('_old_input'));
|
||||
}
|
||||
$sourceAccounts = TransactionJournal::sourceAccountList($journal);
|
||||
$destinationAccounts = TransactionJournal::destinationAccountList($journal);
|
||||
|
@ -45,7 +45,6 @@ class MailError extends Job implements ShouldQueue
|
||||
$this->ipAddress = $ipAddress;
|
||||
$this->exception = $exceptionData;
|
||||
|
||||
Log::debug('In mail job constructor for error handler.');
|
||||
$debug = $exceptionData;
|
||||
unset($debug['stackTrace']);
|
||||
Log::error('Exception is: ' . json_encode($debug));
|
||||
@ -58,7 +57,6 @@ class MailError extends Job implements ShouldQueue
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
Log::debug('Start of handle()');
|
||||
if ($this->attempts() < 3) {
|
||||
// mail?
|
||||
try {
|
||||
@ -82,7 +80,6 @@ class MailError extends Job implements ShouldQueue
|
||||
} catch (ErrorException $e) {
|
||||
Log::error('ErrorException ' . $e->getMessage());
|
||||
}
|
||||
Log::debug('Successfully handled error.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,21 +10,21 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
/**
|
||||
* FireflyIII\Models\Budget
|
||||
*
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Carbon\Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property integer $user_id
|
||||
* @property boolean $active
|
||||
* @property boolean $encrypted
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|BudgetLimit[] $budgetlimits
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals
|
||||
* @property-read \FireflyIII\User $user
|
||||
* @property string $dateFormatted
|
||||
* @property string $budgeted
|
||||
* @property float $amount
|
||||
* @property \Carbon\Carbon $date
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Carbon\Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property integer $user_id
|
||||
* @property boolean $active
|
||||
* @property boolean $encrypted
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|BudgetLimit[] $budgetlimits
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals
|
||||
* @property-read \FireflyIII\User $user
|
||||
* @property string $dateFormatted
|
||||
* @property string $budgeted
|
||||
* @property float $amount
|
||||
* @property \Carbon\Carbon $date
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereUpdatedAt($value)
|
||||
|
@ -10,19 +10,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
/**
|
||||
* FireflyIII\Models\Category
|
||||
*
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Carbon\Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property integer $user_id
|
||||
* @property boolean $encrypted
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals
|
||||
* @property-read \FireflyIII\User $user
|
||||
* @property string $dateFormatted
|
||||
* @property string $spent
|
||||
* @property \Carbon\Carbon $lastActivity
|
||||
* @property string $type
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Carbon\Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property integer $user_id
|
||||
* @property boolean $encrypted
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals
|
||||
* @property-read \FireflyIII\User $user
|
||||
* @property string $dateFormatted
|
||||
* @property string $spent
|
||||
* @property \Carbon\Carbon $lastActivity
|
||||
* @property string $type
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereUpdatedAt($value)
|
||||
@ -117,6 +117,7 @@ class Category extends Model
|
||||
{
|
||||
return $this->belongsToMany('FireflyIII\Models\TransactionJournal', 'category_transaction_journal', 'category_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
|
@ -12,7 +12,6 @@ namespace FireflyIII\Models;
|
||||
|
||||
use Auth;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
@ -58,7 +57,6 @@ class ExportJob extends Model
|
||||
*/
|
||||
public function change($status)
|
||||
{
|
||||
Log::debug('Job ' . $this->key . ' to status "' . $status . '".');
|
||||
$this->status = $status;
|
||||
$this->save();
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ class Transaction extends Model
|
||||
/**
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param Carbon $date
|
||||
* @param Carbon $date
|
||||
*
|
||||
*/
|
||||
public function scopeBefore(Builder $query, Carbon $date)
|
||||
|
@ -7,7 +7,6 @@ use FireflyIII\Support\Models\TransactionJournalSupport;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Query\JoinClause;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
@ -360,7 +359,7 @@ class TransactionJournal extends TransactionJournalSupport
|
||||
$query->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id');
|
||||
}
|
||||
$query->whereIn('transaction_types.type', $types);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -4,17 +4,11 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Providers;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use FireflyIII\Models\LimitRepetition;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Models\PiggyBankRepetition;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Log;
|
||||
use Navigation;
|
||||
|
||||
/**
|
||||
* Class EventServiceProvider
|
||||
|
@ -78,6 +78,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
|
||||
$exportJob->key = Str::random(12);
|
||||
$exportJob->status = 'export_status_never_started';
|
||||
$exportJob->save();
|
||||
|
||||
// breaks the loop:
|
||||
|
||||
return $exportJob;
|
||||
|
@ -15,7 +15,6 @@ use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class SetBudget
|
||||
@ -55,12 +54,9 @@ class SetBudget implements ActionInterface
|
||||
}
|
||||
)->first();
|
||||
if (!is_null($budget)) {
|
||||
Log::debug('Will set budget "' . $search . '" (#' . $budget->id . ') on journal #' . $journal->id . '.');
|
||||
$journal->budgets()->sync([$budget->id]);
|
||||
} else {
|
||||
Log::debug('Could not find budget "' . $search . '". Failed.');
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ use Auth;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class SetCategory
|
||||
@ -47,7 +46,6 @@ class SetCategory implements ActionInterface
|
||||
{
|
||||
$name = $this->action->action_value;
|
||||
$category = Category::firstOrCreateEncrypted(['name' => $name, 'user_id' => Auth::user()->id]);
|
||||
Log::debug('Will set category "' . $name . '" (#' . $category->id . ') on journal #' . $journal->id . '.');
|
||||
$journal->categories()->sync([$category->id]);
|
||||
|
||||
return true;
|
||||
|
@ -19,7 +19,6 @@ use FireflyIII\Rules\Factory\ActionFactory;
|
||||
use FireflyIII\Rules\Factory\TriggerFactory;
|
||||
use FireflyIII\Rules\Triggers\AbstractTrigger;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class Processor
|
||||
@ -138,13 +137,11 @@ final class Processor
|
||||
$triggered = $this->triggered();
|
||||
if ($triggered) {
|
||||
if ($this->actions->count() > 0) {
|
||||
Log::debug('Journal #' . $journal->id . ' triggered, actions executed.');
|
||||
$this->actions();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Log::debug('Journal #' . $journal->id . ' not triggered, did nothing.');
|
||||
|
||||
return false;
|
||||
|
||||
@ -195,7 +192,6 @@ final class Processor
|
||||
}
|
||||
|
||||
}
|
||||
Log::debug('Total: ' . $foundTriggers . ' found triggers. ' . $hitTriggers . ' triggers were hit.');
|
||||
|
||||
return ($hitTriggers == $foundTriggers && $foundTriggers > 0);
|
||||
|
||||
|
@ -5,7 +5,6 @@ namespace FireflyIII\Support;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class Navigation
|
||||
|
@ -240,7 +240,7 @@ class Journal extends Twig_Extension
|
||||
$cache->addProperty('transaction');
|
||||
$cache->addProperty('budget-string');
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$budgets = [];
|
||||
@ -270,7 +270,7 @@ class Journal extends Twig_Extension
|
||||
$cache->addProperty('transaction');
|
||||
$cache->addProperty('category-string');
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,7 +19,6 @@ use FireflyIII\User;
|
||||
use Google2FA;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Validation\Validator;
|
||||
use Log;
|
||||
use Session;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
|
||||
@ -135,7 +134,6 @@ class FireflyValidator extends Validator
|
||||
$value = $this->data['rule-action-value'][$index] ?? false;
|
||||
switch ($name) {
|
||||
default:
|
||||
Log::debug(' (' . $attribute . ') (index:' . $index . ') Name is "' . $name . '" so no action is taken.');
|
||||
|
||||
return true;
|
||||
case 'set_budget':
|
||||
|
Loading…
Reference in New Issue
Block a user