mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Various code clean up. [skip ci]
This commit is contained in:
parent
e7a0a5937c
commit
d0c6afc3a9
@ -92,6 +92,7 @@ class Import extends Command
|
|||||||
$this->error($error);
|
$this->error($error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ namespace FireflyIII\Handlers\Events;
|
|||||||
|
|
||||||
use FireflyIII\Events\UserIsConfirmed;
|
use FireflyIII\Events\UserIsConfirmed;
|
||||||
use FireflyIII\Events\UserRegistration;
|
use FireflyIII\Events\UserRegistration;
|
||||||
use FireflyIII\User;
|
|
||||||
use Preferences;
|
use Preferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,20 +31,6 @@ class UserSaveIpAddress
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the event.
|
|
||||||
*
|
|
||||||
* @param UserRegistration $event
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function saveFromRegistration(UserRegistration $event): bool
|
|
||||||
{
|
|
||||||
Preferences::setForUser($event->user, 'registration_ip_address', $event->ipAddress);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle the event.
|
* Handle the event.
|
||||||
*
|
*
|
||||||
@ -59,4 +44,18 @@ class UserSaveIpAddress
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param UserRegistration $event
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function saveFromRegistration(UserRegistration $event): bool
|
||||||
|
{
|
||||||
|
Preferences::setForUser($event->user, 'registration_ip_address', $event->ipAddress);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,14 +32,12 @@ class BalanceLine
|
|||||||
|
|
||||||
/** @var BudgetModel */
|
/** @var BudgetModel */
|
||||||
protected $budget;
|
protected $budget;
|
||||||
|
|
||||||
/** @var Carbon */
|
|
||||||
protected $startDate;
|
|
||||||
/** @var Carbon */
|
/** @var Carbon */
|
||||||
protected $endDate;
|
protected $endDate;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
protected $role = self::ROLE_DEFAULTROLE;
|
protected $role = self::ROLE_DEFAULTROLE;
|
||||||
|
/** @var Carbon */
|
||||||
|
protected $startDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -90,6 +88,22 @@ class BalanceLine
|
|||||||
$this->budget = $budget;
|
$this->budget = $budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Carbon
|
||||||
|
*/
|
||||||
|
public function getEndDate()
|
||||||
|
{
|
||||||
|
return $this->endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Carbon $endDate
|
||||||
|
*/
|
||||||
|
public function setEndDate($endDate)
|
||||||
|
{
|
||||||
|
$this->endDate = $endDate;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -106,6 +120,22 @@ class BalanceLine
|
|||||||
$this->role = $role;
|
$this->role = $role;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Carbon
|
||||||
|
*/
|
||||||
|
public function getStartDate()
|
||||||
|
{
|
||||||
|
return $this->startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Carbon $startDate
|
||||||
|
*/
|
||||||
|
public function setStartDate($startDate)
|
||||||
|
{
|
||||||
|
$this->startDate = $startDate;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -127,39 +157,6 @@ class BalanceLine
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Carbon
|
|
||||||
*/
|
|
||||||
public function getStartDate()
|
|
||||||
{
|
|
||||||
return $this->startDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Carbon $startDate
|
|
||||||
*/
|
|
||||||
public function setStartDate($startDate)
|
|
||||||
{
|
|
||||||
$this->startDate = $startDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Carbon
|
|
||||||
*/
|
|
||||||
public function getEndDate()
|
|
||||||
{
|
|
||||||
return $this->endDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Carbon $endDate
|
|
||||||
*/
|
|
||||||
public function setEndDate($endDate)
|
|
||||||
{
|
|
||||||
$this->endDate = $endDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If a BalanceLine has a budget/repetition, each BalanceEntry in this BalanceLine
|
* If a BalanceLine has a budget/repetition, each BalanceEntry in this BalanceLine
|
||||||
* should have a "spent" value, which is the amount of money that has been spent
|
* should have a "spent" value, which is the amount of money that has been spent
|
||||||
|
@ -47,6 +47,7 @@ class Budget
|
|||||||
public function addBudgetLine(BudgetLine $budgetLine): Budget
|
public function addBudgetLine(BudgetLine $budgetLine): Budget
|
||||||
{
|
{
|
||||||
$this->budgetLines->push($budgetLine);
|
$this->budgetLines->push($budgetLine);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ class Budget
|
|||||||
{
|
{
|
||||||
$add = strval(round($add, 2));
|
$add = strval(round($add, 2));
|
||||||
$this->budgeted = bcadd($this->budgeted, $add);
|
$this->budgeted = bcadd($this->budgeted, $add);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,6 +73,7 @@ class Budget
|
|||||||
{
|
{
|
||||||
$add = strval(round($add, 2));
|
$add = strval(round($add, 2));
|
||||||
$this->left = bcadd($this->left, $add);
|
$this->left = bcadd($this->left, $add);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,6 +86,7 @@ class Budget
|
|||||||
{
|
{
|
||||||
$add = strval(round($add, 2));
|
$add = strval(round($add, 2));
|
||||||
$this->overspent = bcadd($this->overspent, $add);
|
$this->overspent = bcadd($this->overspent, $add);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,6 +99,7 @@ class Budget
|
|||||||
{
|
{
|
||||||
$add = strval(round($add, 2));
|
$add = strval(round($add, 2));
|
||||||
$this->spent = bcadd($this->spent, $add);
|
$this->spent = bcadd($this->spent, $add);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ class BudgetLine
|
|||||||
public function setBudget(BudgetModel $budget): BudgetLine
|
public function setBudget(BudgetModel $budget): BudgetLine
|
||||||
{
|
{
|
||||||
$this->budget = $budget;
|
$this->budget = $budget;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,6 +71,7 @@ class BudgetLine
|
|||||||
public function setBudgeted(string $budgeted): BudgetLine
|
public function setBudgeted(string $budgeted): BudgetLine
|
||||||
{
|
{
|
||||||
$this->budgeted = $budgeted;
|
$this->budgeted = $budgeted;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,6 +91,7 @@ class BudgetLine
|
|||||||
public function setLeft(string $left): BudgetLine
|
public function setLeft(string $left): BudgetLine
|
||||||
{
|
{
|
||||||
$this->left = $left;
|
$this->left = $left;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +111,7 @@ class BudgetLine
|
|||||||
public function setOverspent(string $overspent): BudgetLine
|
public function setOverspent(string $overspent): BudgetLine
|
||||||
{
|
{
|
||||||
$this->overspent = $overspent;
|
$this->overspent = $overspent;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,6 +131,7 @@ class BudgetLine
|
|||||||
public function setRepetition(LimitRepetition $repetition): BudgetLine
|
public function setRepetition(LimitRepetition $repetition): BudgetLine
|
||||||
{
|
{
|
||||||
$this->repetition = $repetition;
|
$this->repetition = $repetition;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,6 +151,7 @@ class BudgetLine
|
|||||||
public function setSpent(string $spent): BudgetLine
|
public function setSpent(string $spent): BudgetLine
|
||||||
{
|
{
|
||||||
$this->spent = $spent;
|
$this->spent = $spent;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,6 +262,7 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
|||||||
/**
|
/**
|
||||||
* @param Balance $balance
|
* @param Balance $balance
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly 5.
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly 5.
|
||||||
|
*
|
||||||
* @return Balance
|
* @return Balance
|
||||||
*/
|
*/
|
||||||
private function removeUnusedBudgets(Balance $balance): Balance
|
private function removeUnusedBudgets(Balance $balance): Balance
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace FireflyIII\Http\Controllers;
|
namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
@ -18,7 +17,6 @@ use ExpandedForm;
|
|||||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Export\Processor;
|
use FireflyIII\Export\Processor;
|
||||||
use FireflyIII\Http\Requests;
|
|
||||||
use FireflyIII\Http\Requests\ExportFormRequest;
|
use FireflyIII\Http\Requests\ExportFormRequest;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\ExportJob;
|
use FireflyIII\Models\ExportJob;
|
||||||
|
@ -36,6 +36,7 @@ class BillName extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (strlen($value) === 0) {
|
if (strlen($value) === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Bill;
|
return new Bill;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ class BillName extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($bill->id)) {
|
if (!is_null($bill->id)) {
|
||||||
Log::debug('Found bill by ID', ['id' => $bill->id]);
|
Log::debug('Found bill by ID', ['id' => $bill->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $bill;
|
return $bill;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -57,6 +59,7 @@ class BillName extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($bill->id)) {
|
if (!is_null($bill->id)) {
|
||||||
Log::debug('Found bill by name ', ['id' => $bill->id]);
|
Log::debug('Found bill by name ', ['id' => $bill->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $bill;
|
return $bill;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Import\Converter;
|
namespace FireflyIII\Import\Converter;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Budget;
|
use FireflyIII\Models\Budget;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
@ -36,6 +35,7 @@ class BudgetId extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if ($value === 0) {
|
if ($value === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Budget;
|
return new Budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,6 +58,7 @@ class BudgetId extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($budget->id)) {
|
if (!is_null($budget->id)) {
|
||||||
Log::debug('Found budget by ID ', ['id' => $budget->id]);
|
Log::debug('Found budget by ID ', ['id' => $budget->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $budget;
|
return $budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Import\Converter;
|
namespace FireflyIII\Import\Converter;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Budget;
|
use FireflyIII\Models\Budget;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
@ -36,6 +35,7 @@ class BudgetName extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (strlen($value) === 0) {
|
if (strlen($value) === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Budget;
|
return new Budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +48,7 @@ class BudgetName extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($budget->id)) {
|
if (!is_null($budget->id)) {
|
||||||
Log::debug('Found budget by ID', ['id' => $budget->id]);
|
Log::debug('Found budget by ID', ['id' => $budget->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $budget;
|
return $budget;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -57,6 +58,7 @@ class BudgetName extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($budget->id)) {
|
if (!is_null($budget->id)) {
|
||||||
Log::debug('Found budget by name ', ['id' => $budget->id]);
|
Log::debug('Found budget by name ', ['id' => $budget->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $budget;
|
return $budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Import\Converter;
|
namespace FireflyIII\Import\Converter;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Category;
|
use FireflyIII\Models\Category;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
@ -36,6 +35,7 @@ class CategoryId extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if ($value === 0) {
|
if ($value === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Category;
|
return new Category;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +48,7 @@ class CategoryId extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($category->id)) {
|
if (!is_null($category->id)) {
|
||||||
Log::debug('Found category by ID', ['id' => $category->id]);
|
Log::debug('Found category by ID', ['id' => $category->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $category;
|
return $category;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -57,6 +58,7 @@ class CategoryId extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($category->id)) {
|
if (!is_null($category->id)) {
|
||||||
Log::debug('Found category by ID ', ['id' => $category->id]);
|
Log::debug('Found category by ID ', ['id' => $category->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $category;
|
return $category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Import\Converter;
|
namespace FireflyIII\Import\Converter;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Category;
|
use FireflyIII\Models\Category;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
@ -36,6 +35,7 @@ class CategoryName extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (strlen($value) === 0) {
|
if (strlen($value) === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Category;
|
return new Category;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +48,7 @@ class CategoryName extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($category->id)) {
|
if (!is_null($category->id)) {
|
||||||
Log::debug('Found category by ID', ['id' => $category->id]);
|
Log::debug('Found category by ID', ['id' => $category->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $category;
|
return $category;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -57,6 +58,7 @@ class CategoryName extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($category->id)) {
|
if (!is_null($category->id)) {
|
||||||
Log::debug('Found category by name ', ['id' => $category->id]);
|
Log::debug('Found category by name ', ['id' => $category->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $category;
|
return $category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,16 +26,16 @@ interface ConverterInterface
|
|||||||
*/
|
*/
|
||||||
public function convert($value);
|
public function convert($value);
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $config
|
|
||||||
*/
|
|
||||||
public function setConfig(array $config);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getCertainty(): int;
|
public function getCertainty(): int;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $config
|
||||||
|
*/
|
||||||
|
public function setConfig(array $config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bool $doMap
|
* @param bool $doMap
|
||||||
*/
|
*/
|
||||||
|
@ -41,6 +41,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($currency->id)) {
|
if (!is_null($currency->id)) {
|
||||||
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -50,6 +51,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($currency->id)) {
|
if (!is_null($currency->id)) {
|
||||||
Log::debug('Found currency by code', ['id' => $currency->id]);
|
Log::debug('Found currency by code', ['id' => $currency->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
$currency = $repository->store(
|
$currency = $repository->store(
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Import\Converter;
|
namespace FireflyIII\Import\Converter;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use Log;
|
use Log;
|
||||||
@ -36,6 +35,7 @@ class CurrencyId extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if ($value === 0) {
|
if ($value === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new TransactionCurrency;
|
return new TransactionCurrency;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +48,7 @@ class CurrencyId extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($currency->id)) {
|
if (!is_null($currency->id)) {
|
||||||
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -57,6 +58,7 @@ class CurrencyId extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($currency->id)) {
|
if (!is_null($currency->id)) {
|
||||||
Log::debug('Found currency by ID ', ['id' => $currency->id]);
|
Log::debug('Found currency by ID ', ['id' => $currency->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
@ -35,6 +35,7 @@ class CurrencyName extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (strlen($value) === 0) {
|
if (strlen($value) === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new TransactionCurrency;
|
return new TransactionCurrency;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,6 +48,7 @@ class CurrencyName extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($currency->id)) {
|
if (!is_null($currency->id)) {
|
||||||
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,6 +58,7 @@ class CurrencyName extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($currency->id)) {
|
if (!is_null($currency->id)) {
|
||||||
Log::debug('Found currency by name ', ['id' => $currency->id]);
|
Log::debug('Found currency by name ', ['id' => $currency->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ class CurrencySymbol extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (strlen($value) === 0) {
|
if (strlen($value) === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new TransactionCurrency;
|
return new TransactionCurrency;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,6 +48,7 @@ class CurrencySymbol extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($currency->id)) {
|
if (!is_null($currency->id)) {
|
||||||
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
Log::debug('Found currency by ID', ['id' => $currency->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,6 +58,7 @@ class CurrencySymbol extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($currency->id)) {
|
if (!is_null($currency->id)) {
|
||||||
Log::debug('Found currency by symbol ', ['id' => $currency->id]);
|
Log::debug('Found currency by symbol ', ['id' => $currency->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $currency;
|
return $currency;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,10 +40,12 @@ class Date extends BasicConverter implements ConverterInterface
|
|||||||
Log::info($e->getMessage());
|
Log::info($e->getMessage());
|
||||||
Log::info('Cannot convert this string using the given format.', ['value' => $value, 'format' => $this->config['date-format']]);
|
Log::info('Cannot convert this string using the given format.', ['value' => $value, 'format' => $this->config['date-format']]);
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Carbon;
|
return new Carbon;
|
||||||
}
|
}
|
||||||
Log::debug('Converted date', ['converted' => $date->toAtomString()]);
|
Log::debug('Converted date', ['converted' => $date->toAtomString()]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $date;
|
return $date;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Import\Converter;
|
namespace FireflyIII\Import\Converter;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,11 +33,13 @@ class INGDebetCredit extends BasicConverter implements ConverterInterface
|
|||||||
if ($value === 'Af') {
|
if ($value === 'Af') {
|
||||||
Log::debug('Return -1');
|
Log::debug('Return -1');
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
Log::debug('Return 1');
|
Log::debug('Return 1');
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ class OpposingAccountIban extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (strlen($value) === 0) {
|
if (strlen($value) === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Account;
|
return new Account;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ class OpposingAccountIban extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($account->id)) {
|
if (!is_null($account->id)) {
|
||||||
Log::debug('Found account by ID', ['id' => $account->id]);
|
Log::debug('Found account by ID', ['id' => $account->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $account;
|
return $account;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ class OpposingAccountName extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (strlen($value) === 0) {
|
if (strlen($value) === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Account;
|
return new Account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Import\Converter;
|
namespace FireflyIII\Import\Converter;
|
||||||
|
|
||||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use Log;
|
use Log;
|
||||||
@ -37,6 +36,7 @@ class OpposingAccountNumber extends BasicConverter implements ConverterInterface
|
|||||||
|
|
||||||
if (strlen($value) === 0) {
|
if (strlen($value) === 0) {
|
||||||
$this->setCertainty(0);
|
$this->setCertainty(0);
|
||||||
|
|
||||||
return new Account;
|
return new Account;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,6 +50,7 @@ class OpposingAccountNumber extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($account->id)) {
|
if (!is_null($account->id)) {
|
||||||
Log::debug('Found account by ID', ['id' => $account->id]);
|
Log::debug('Found account by ID', ['id' => $account->id]);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $account;
|
return $account;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -59,6 +60,7 @@ class OpposingAccountNumber extends BasicConverter implements ConverterInterface
|
|||||||
if (!is_null($account->id)) {
|
if (!is_null($account->id)) {
|
||||||
Log::debug('Found account by number', ['id' => $account->id]);
|
Log::debug('Found account by number', ['id' => $account->id]);
|
||||||
$this->setCertainty(50);
|
$this->setCertainty(50);
|
||||||
|
|
||||||
return $account;
|
return $account;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,6 +81,7 @@ class OpposingAccountNumber extends BasicConverter implements ConverterInterface
|
|||||||
'virtualBalance' => 0, 'accountNumber' => $value, 'active' => true]
|
'virtualBalance' => 0, 'accountNumber' => $value, 'active' => true]
|
||||||
);
|
);
|
||||||
$this->setCertainty(100);
|
$this->setCertainty(100);
|
||||||
|
|
||||||
return $account;
|
return $account;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,8 @@ use Log;
|
|||||||
*/
|
*/
|
||||||
class ImportValidator
|
class ImportValidator
|
||||||
{
|
{
|
||||||
|
/** @var ImportJob */
|
||||||
|
public $job;
|
||||||
/** @var Account */
|
/** @var Account */
|
||||||
protected $defaultImportAccount;
|
protected $defaultImportAccount;
|
||||||
/** @var Collection */
|
/** @var Collection */
|
||||||
@ -36,19 +38,6 @@ class ImportValidator
|
|||||||
/** @var User */
|
/** @var User */
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
/** @var ImportJob */
|
|
||||||
public $job;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ImportJob $job
|
|
||||||
*/
|
|
||||||
public function setJob(ImportJob $job)
|
|
||||||
{
|
|
||||||
$this->job = $job;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ImportValidator constructor.
|
* ImportValidator constructor.
|
||||||
*
|
*
|
||||||
@ -100,6 +89,14 @@ class ImportValidator
|
|||||||
$this->defaultImportAccount = $defaultImportAccount;
|
$this->defaultImportAccount = $defaultImportAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ImportJob $job
|
||||||
|
*/
|
||||||
|
public function setJob(ImportJob $job)
|
||||||
|
{
|
||||||
|
$this->job = $job;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param User $user
|
* @param User $user
|
||||||
*/
|
*/
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
namespace FireflyIII\Import\Importer;
|
namespace FireflyIII\Import\Importer;
|
||||||
|
|
||||||
use FireflyIII\Models\ImportJob;
|
use FireflyIII\Models\ImportJob;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
@ -34,8 +34,9 @@ class OpposingAccountIbans implements MapperInterface
|
|||||||
[
|
[
|
||||||
AccountType::DEFAULT, AccountType::ASSET,
|
AccountType::DEFAULT, AccountType::ASSET,
|
||||||
AccountType::EXPENSE, AccountType::BENEFICIARY,
|
AccountType::EXPENSE, AccountType::BENEFICIARY,
|
||||||
AccountType::REVENUE
|
AccountType::REVENUE,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
$topList = [];
|
$topList = [];
|
||||||
$list = [];
|
$list = [];
|
||||||
|
|
||||||
|
@ -34,8 +34,9 @@ class OpposingAccounts implements MapperInterface
|
|||||||
[
|
[
|
||||||
AccountType::DEFAULT, AccountType::ASSET,
|
AccountType::DEFAULT, AccountType::ASSET,
|
||||||
AccountType::EXPENSE, AccountType::BENEFICIARY,
|
AccountType::EXPENSE, AccountType::BENEFICIARY,
|
||||||
AccountType::REVENUE
|
AccountType::REVENUE,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
$list = [];
|
$list = [];
|
||||||
|
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Import\Setup;
|
namespace FireflyIII\Import\Setup;
|
||||||
|
|
||||||
use FireflyIII\Import\Role\Map;
|
|
||||||
use FireflyIII\Models\ImportJob;
|
use FireflyIII\Models\ImportJob;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Symfony\Component\HttpFoundation\FileBag;
|
use Symfony\Component\HttpFoundation\FileBag;
|
||||||
@ -46,14 +45,6 @@ interface SetupInterface
|
|||||||
*/
|
*/
|
||||||
public function getDataForSettings(): array;
|
public function getDataForSettings(): array;
|
||||||
|
|
||||||
/**
|
|
||||||
* Store the settings filled in by the user, if applicable.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function storeSettings(Request $request);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns the name of the view that will be shown to the user to further configure
|
* This method returns the name of the view that will be shown to the user to further configure
|
||||||
* the import job.
|
* the import job.
|
||||||
@ -82,4 +73,12 @@ interface SetupInterface
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function setJob(ImportJob $job);
|
public function setJob(ImportJob $job);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store the settings filled in by the user, if applicable.
|
||||||
|
*
|
||||||
|
* @param Request $request
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function storeSettings(Request $request);
|
||||||
}
|
}
|
||||||
|
@ -21,12 +21,12 @@ interface SpecificInterface
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getName(): string;
|
public static function getDescription(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getDescription(): string;
|
public static function getName(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $row
|
* @param array $row
|
||||||
|
@ -34,6 +34,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
* @property string $hash
|
* @property string $hash
|
||||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\TransactionJournalMeta whereHash($value)
|
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\TransactionJournalMeta whereHash($value)
|
||||||
|
* @property-read \FireflyIII\Models\TransactionJournal $transactionJournal
|
||||||
*/
|
*/
|
||||||
class TransactionJournalMeta extends Model
|
class TransactionJournalMeta extends Model
|
||||||
{
|
{
|
||||||
|
@ -12,10 +12,8 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Providers;
|
namespace FireflyIII\Providers;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use Illuminate\Auth\AuthManager;
|
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CrudServiceProvider
|
* Class CrudServiceProvider
|
||||||
@ -58,6 +56,7 @@ class CrudServiceProvider extends ServiceProvider
|
|||||||
if (!isset($arguments[0]) && !$app->auth->check()) {
|
if (!isset($arguments[0]) && !$app->auth->check()) {
|
||||||
throw new FireflyException('There is no user present.');
|
throw new FireflyException('There is no user present.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return app('FireflyIII\Crud\Account\AccountCrud', $arguments);
|
return app('FireflyIII\Crud\Account\AccountCrud', $arguments);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -144,7 +144,6 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
$ids = $query->get(['transaction_journals.id'])->pluck('id')->toArray();
|
$ids = $query->get(['transaction_journals.id'])->pluck('id')->toArray();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// that should do it:
|
// that should do it:
|
||||||
$sum = $this->user->transactions()
|
$sum = $this->user->transactions()
|
||||||
->whereIn('transaction_journal_id', $ids)
|
->whereIn('transaction_journal_id', $ids)
|
||||||
|
@ -42,13 +42,6 @@ interface TagRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function destroy(Tag $tag): bool;
|
public function destroy(Tag $tag): bool;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $tag
|
|
||||||
*
|
|
||||||
* @return Tag
|
|
||||||
*/
|
|
||||||
public function findByTag(string $tag) : Tag;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $tagId
|
* @param int $tagId
|
||||||
*
|
*
|
||||||
@ -56,6 +49,13 @@ interface TagRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function find(int $tagId) : Tag;
|
public function find(int $tagId) : Tag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $tag
|
||||||
|
*
|
||||||
|
* @return Tag
|
||||||
|
*/
|
||||||
|
public function findByTag(string $tag) : Tag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns all the user's tags.
|
* This method returns all the user's tags.
|
||||||
*
|
*
|
||||||
|
@ -12,7 +12,6 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Rules\Actions;
|
namespace FireflyIII\Rules\Actions;
|
||||||
|
|
||||||
|
|
||||||
use Auth;
|
|
||||||
use FireflyIII\Models\RuleAction;
|
use FireflyIII\Models\RuleAction;
|
||||||
use FireflyIII\Models\Tag;
|
use FireflyIII\Models\Tag;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
|
@ -12,7 +12,6 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Rules\Actions;
|
namespace FireflyIII\Rules\Actions;
|
||||||
|
|
||||||
|
|
||||||
use Auth;
|
|
||||||
use FireflyIII\Models\RuleAction;
|
use FireflyIII\Models\RuleAction;
|
||||||
use FireflyIII\Models\Tag;
|
use FireflyIII\Models\Tag;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
|
@ -12,7 +12,6 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Rules\Actions;
|
namespace FireflyIII\Rules\Actions;
|
||||||
|
|
||||||
|
|
||||||
use Auth;
|
|
||||||
use FireflyIII\Models\Category;
|
use FireflyIII\Models\Category;
|
||||||
use FireflyIII\Models\RuleAction;
|
use FireflyIII\Models\RuleAction;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
|
@ -23,6 +23,26 @@ use Twig_SimpleFunction;
|
|||||||
class Rule extends Twig_Extension
|
class Rule extends Twig_Extension
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Twig_SimpleFunction
|
||||||
|
*/
|
||||||
|
public function allActionTriggers(): Twig_SimpleFunction
|
||||||
|
{
|
||||||
|
return new Twig_SimpleFunction(
|
||||||
|
'allRuleActions', function () {
|
||||||
|
// array of valid values for actions
|
||||||
|
$ruleActions = array_keys(Config::get('firefly.rule-actions'));
|
||||||
|
$possibleActions = [];
|
||||||
|
foreach ($ruleActions as $key) {
|
||||||
|
$possibleActions[$key] = trans('firefly.rule_action_' . $key . '_choice');
|
||||||
|
}
|
||||||
|
unset($key, $ruleActions);
|
||||||
|
|
||||||
|
return $possibleActions;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Twig_SimpleFunction
|
* @return Twig_SimpleFunction
|
||||||
*/
|
*/
|
||||||
@ -61,26 +81,6 @@ class Rule extends Twig_Extension
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Twig_SimpleFunction
|
|
||||||
*/
|
|
||||||
public function allActionTriggers(): Twig_SimpleFunction
|
|
||||||
{
|
|
||||||
return new Twig_SimpleFunction(
|
|
||||||
'allRuleActions', function () {
|
|
||||||
// array of valid values for actions
|
|
||||||
$ruleActions = array_keys(Config::get('firefly.rule-actions'));
|
|
||||||
$possibleActions = [];
|
|
||||||
foreach ($ruleActions as $key) {
|
|
||||||
$possibleActions[$key] = trans('firefly.rule_action_' . $key . '_choice');
|
|
||||||
}
|
|
||||||
unset($key, $ruleActions);
|
|
||||||
|
|
||||||
return $possibleActions;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
16
app/User.php
16
app/User.php
@ -148,14 +148,6 @@ class User extends Authenticatable
|
|||||||
return $this->hasMany('FireflyIII\Models\ExportJob');
|
return $this->hasMany('FireflyIII\Models\ExportJob');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return HasMany
|
|
||||||
*/
|
|
||||||
public function importjobs(): HasMany
|
|
||||||
{
|
|
||||||
return $this->hasMany('FireflyIII\Models\ImportJob');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the user has a role by its name.
|
* Checks if the user has a role by its name.
|
||||||
*
|
*
|
||||||
@ -177,6 +169,14 @@ class User extends Authenticatable
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return HasMany
|
||||||
|
*/
|
||||||
|
public function importjobs(): HasMany
|
||||||
|
{
|
||||||
|
return $this->hasMany('FireflyIII\Models\ImportJob');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return HasManyThrough
|
* @return HasManyThrough
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'allow_register' => true,
|
'allow_register' => true,
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of Entrust,
|
* This file is part of Entrust,
|
||||||
* a role & permission management solution for Laravel.
|
* a role & permission management solution for Laravel.
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'twig' => [
|
'twig' => [
|
||||||
/*
|
/*
|
||||||
@ -135,8 +134,8 @@ return [
|
|||||||
'facades' => [
|
'facades' => [
|
||||||
'Breadcrumbs' => [
|
'Breadcrumbs' => [
|
||||||
'is_safe' => [
|
'is_safe' => [
|
||||||
'renderIfExists'
|
'renderIfExists',
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
'Session',
|
'Session',
|
||||||
'Route',
|
'Route',
|
||||||
@ -149,12 +148,12 @@ return [
|
|||||||
'is_safe' => [
|
'is_safe' => [
|
||||||
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location',
|
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location',
|
||||||
'multiRadio', 'file', 'multiCheckbox', 'staticText', 'amountSmall',
|
'multiRadio', 'file', 'multiCheckbox', 'staticText', 'amountSmall',
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
'Form' => [
|
'Form' => [
|
||||||
'is_safe' => [
|
'is_safe' => [
|
||||||
'input', 'select', 'checkbox', 'model', 'open', 'radio', 'textarea', 'file'
|
'input', 'select', 'checkbox', 'model', 'open', 'radio', 'textarea', 'file',
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -190,7 +189,7 @@ return [
|
|||||||
'elixir',
|
'elixir',
|
||||||
'head',
|
'head',
|
||||||
'last',
|
'last',
|
||||||
'old'
|
'old',
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -222,5 +221,5 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'filters' => [],
|
'filters' => [],
|
||||||
]
|
],
|
||||||
];
|
];
|
||||||
|
@ -27,6 +27,6 @@ return [
|
|||||||
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
|
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
|
||||||
'3.8.0' => 'This version of Firefly III requires PHP 7.0.',
|
'3.8.0' => 'This version of Firefly III requires PHP 7.0.',
|
||||||
'3.8.1' => 'This version of Firefly III requires PHP 7.0.',
|
'3.8.1' => 'This version of Firefly III requires PHP 7.0.',
|
||||||
'3.10' => 'Please find the full upgrade instructions here: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.10'
|
'3.10' => 'Please find the full upgrade instructions here: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.10',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user