.
*
* @return bool true
*/
@@ -110,7 +107,7 @@ class IngDescription implements SpecificInterface
}
/**
- * Remove name from the description (Remove everything before the description incl the word 'Omschrijving' )
+ * Remove name from the description (Remove everything before the description incl the word 'Omschrijving' ).
*
* @return bool true
*/
@@ -121,5 +118,4 @@ class IngDescription implements SpecificInterface
return true;
}
-
}
diff --git a/app/Import/Specifics/PresidentsChoice.php b/app/Import/Specifics/PresidentsChoice.php
index 11203ba03c..1c0d5ca1ba 100644
--- a/app/Import/Specifics/PresidentsChoice.php
+++ b/app/Import/Specifics/PresidentsChoice.php
@@ -18,19 +18,15 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Import\Specifics;
/**
- * Class PresidentsChoice
- *
- * @package FireflyIII\Import\Specifics
+ * Class PresidentsChoice.
*/
class PresidentsChoice implements SpecificInterface
{
-
/**
* @return string
*/
@@ -56,7 +52,7 @@ class PresidentsChoice implements SpecificInterface
{
// first, if column 2 is empty and 3 is not, do nothing.
// if column 3 is empty and column 2 is not, move amount to column 3, *-1
- if (isset($row[3]) && strlen($row[3]) === 0) {
+ if (isset($row[3]) && 0 === strlen($row[3])) {
$row[3] = bcmul($row[2], '-1');
}
if (isset($row[1])) {
@@ -65,7 +61,5 @@ class PresidentsChoice implements SpecificInterface
}
return $row;
-
-
}
}
diff --git a/app/Import/Specifics/RabobankDescription.php b/app/Import/Specifics/RabobankDescription.php
index 420b5d8e26..94a9e1f559 100644
--- a/app/Import/Specifics/RabobankDescription.php
+++ b/app/Import/Specifics/RabobankDescription.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Import\Specifics;
@@ -26,9 +25,7 @@ namespace FireflyIII\Import\Specifics;
use Log;
/**
- * Class RabobankDescription
- *
- * @package FireflyIII\Import\Specifics
+ * Class RabobankDescription.
*/
class RabobankDescription implements SpecificInterface
{
@@ -64,7 +61,8 @@ class RabobankDescription implements SpecificInterface
Log::debug(
sprintf(
'Rabobank specific: Opposite account and opposite name are' .
- ' both empty. Will use "%s" (from description) instead', $alternateName
+ ' both empty. Will use "%s" (from description) instead',
+ $alternateName
)
);
$row[6] = $alternateName;
diff --git a/app/Import/Specifics/SnsDescription.php b/app/Import/Specifics/SnsDescription.php
index ab6c941580..3f52171846 100644
--- a/app/Import/Specifics/SnsDescription.php
+++ b/app/Import/Specifics/SnsDescription.php
@@ -21,24 +21,19 @@
/**
* snsDescription.php
- * Author 2017 hugovanduijn@gmail.com
+ * Author 2017 hugovanduijn@gmail.com.
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
namespace FireflyIII\Import\Specifics;
-use Log;
-
/**
- * Class SnsDescription
- *
- * @package FireflyIII\Import\Specifics
+ * Class SnsDescription.
*/
class SnsDescription implements SpecificInterface
{
@@ -65,8 +60,9 @@ class SnsDescription implements SpecificInterface
*/
public function run(array $row): array
{
- $row[17] = ltrim($row[17],"'");
- $row[17] = rtrim($row[17],"'");
+ $row[17] = ltrim($row[17], "'");
+ $row[17] = rtrim($row[17], "'");
+
return $row;
}
}
diff --git a/app/Import/Specifics/SpecificInterface.php b/app/Import/Specifics/SpecificInterface.php
index 148aed45aa..837966be3e 100644
--- a/app/Import/Specifics/SpecificInterface.php
+++ b/app/Import/Specifics/SpecificInterface.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Import\Specifics;
/**
- * Interface SpecificInterface
- *
- * @package FireflyIII\Import\Specifics
+ * Interface SpecificInterface.
*/
interface SpecificInterface
{
@@ -46,5 +43,4 @@ interface SpecificInterface
* @return array
*/
public function run(array $row): array;
-
}
diff --git a/app/Import/Storage/ImportStorage.php b/app/Import/Storage/ImportStorage.php
index 2761a6881f..47ba783826 100644
--- a/app/Import/Storage/ImportStorage.php
+++ b/app/Import/Storage/ImportStorage.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Import\Storage;
@@ -35,21 +34,19 @@ use Log;
/**
* Is capable of storing individual ImportJournal objects.
- * Class ImportStorage
- *
- * @package FireflyIII\Import\Storage
+ * Class ImportStorage.
*/
class ImportStorage
{
use ImportSupport;
- /** @var Collection */
+ /** @var Collection */
public $errors;
/** @var Collection */
public $journals;
- /** @var int */
+ /** @var int */
protected $defaultCurrencyId = 1; // yes, hard coded
- /** @var ImportJob */
+ /** @var ImportJob */
protected $job;
/** @var Collection */
protected $rules;
@@ -57,7 +54,7 @@ class ImportStorage
private $dateFormat = 'Ymd';
/** @var Collection */
private $objects;
- /** @var array */
+ /** @var array */
private $transfers = [];
/**
@@ -125,6 +122,7 @@ class ImportStorage
* @param ImportJournal $importJournal
*
* @return bool
+ *
* @throws FireflyException
*/
protected function storeImportJournal(int $index, ImportJournal $importJournal): bool
@@ -139,7 +137,7 @@ class ImportStorage
$transactionType = $this->getTransactionType($amount, $opposingAccount);
$description = $importJournal->getDescription();
- /*** First step done! */
+ // First step done!
$this->job->addStepsDone(1);
/**
@@ -159,7 +157,6 @@ class ImportStorage
$message = sprintf('Detected a possible duplicate, skip this one (hash: %s).', $importJournal->hash);
Log::error($message, $parameters);
throw new FireflyException($message);
-
}
unset($parameters);
@@ -174,12 +171,11 @@ class ImportStorage
'date' => $date,
'hash' => $importJournal->hash,
'amount' => $amount,
-
];
$journal = $this->storeJournal($parameters);
unset($parameters);
- /*** Another step done! */
+ // Another step done!
$this->job->addStepsDone(1);
// store meta object things:
@@ -203,12 +199,12 @@ class ImportStorage
$journal->completed = true;
$journal->save();
- /*** Another step done! */
+ // Another step done!
$this->job->addStepsDone(1);
// run rules:
$this->applyRules($journal);
- /*** Another step done! */
+ // Another step done!
$this->job->addStepsDone(1);
$this->journals->push($journal);
@@ -225,7 +221,7 @@ class ImportStorage
private function isDoubleTransfer(array $parameters): bool
{
Log::debug('Check if is a double transfer.');
- if ($parameters['type'] !== TransactionType::TRANSFER) {
+ if (TransactionType::TRANSFER !== $parameters['type']) {
Log::debug(sprintf('Is a %s, not a transfer so no.', $parameters['type']));
return false;
@@ -240,32 +236,32 @@ class ImportStorage
foreach ($this->transfers as $transfer) {
$hits = 0;
if ($parameters['description'] === $transfer['description']) {
- $hits++;
+ ++$hits;
Log::debug(sprintf('Description "%s" equals "%s", hits = %d', $parameters['description'], $transfer['description'], $hits));
}
if ($names === $transfer['names']) {
- $hits++;
+ ++$hits;
Log::debug(sprintf('Involved accounts, "%s" equals "%s", hits = %d', join(',', $names), join(',', $transfer['names']), $hits));
}
- if (bccomp($amount, $transfer['amount']) === 0) {
- $hits++;
+ if (0 === bccomp($amount, $transfer['amount'])) {
+ ++$hits;
Log::debug(sprintf('Amount %s equals %s, hits = %d', $amount, $transfer['amount'], $hits));
}
if ($parameters['date'] === $transfer['date']) {
- $hits++;
+ ++$hits;
Log::debug(sprintf('Date %s equals %s, hits = %d', $parameters['date'], $transfer['date'], $hits));
}
// number of hits is 4? Then it's a match
- if ($hits === 4) {
+ if (4 === $hits) {
Log::error(
- 'There already is a transfer imported with these properties. Compare existing with new. ', ['existing' => $transfer, 'new' => $parameters]
+ 'There already is a transfer imported with these properties. Compare existing with new. ',
+ ['existing' => $transfer, 'new' => $parameters]
);
return true;
}
}
-
return false;
}
}
diff --git a/app/Import/Storage/ImportSupport.php b/app/Import/Storage/ImportSupport.php
index 93019b3689..248fd2074f 100644
--- a/app/Import/Storage/ImportSupport.php
+++ b/app/Import/Storage/ImportSupport.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Import\Storage;
-
use Carbon\Carbon;
use Exception;
use FireflyIII\Exceptions\FireflyException;
@@ -47,17 +45,15 @@ use Illuminate\Support\Collection;
use Log;
/**
- * Trait ImportSupport
- *
- * @package FireflyIII\Import\Storage
+ * Trait ImportSupport.
*/
trait ImportSupport
{
/** @var int */
protected $defaultCurrencyId = 1;
- /** @var ImportJob */
+ /** @var ImportJob */
protected $job;
- /** @var Collection */
+ /** @var Collection */
protected $rules;
/**
@@ -89,6 +85,7 @@ trait ImportSupport
* @param array $parameters
*
* @return bool
+ *
* @throws FireflyException
*/
private function createTransaction(array $parameters): bool
@@ -101,7 +98,7 @@ trait ImportSupport
$transaction->foreign_currency_id = $parameters['foreign_currency'];
$transaction->foreign_amount = $parameters['foreign_amount'];
$transaction->save();
- if (is_null($transaction->id)) {
+ if (null === $transaction->id) {
$errorText = join(', ', $transaction->getErrors()->all());
throw new FireflyException($errorText);
}
@@ -130,7 +127,7 @@ trait ImportSupport
// use given currency
$currency = $importJournal->currency->getTransactionCurrency();
- if (!is_null($currency->id)) {
+ if (null !== $currency->id) {
return $currency->id;
}
@@ -138,7 +135,6 @@ trait ImportSupport
$currency = $this->defaultCurrencyId;
return $currency;
-
}
/**
@@ -156,7 +152,7 @@ trait ImportSupport
{
// use given currency by import journal.
$currency = $importJournal->currency->getTransactionCurrency();
- if (!is_null($currency->id) && $currency->id !== $currencyId) {
+ if (null !== $currency->id && $currency->id !== $currencyId) {
return $currency->id;
}
@@ -197,7 +193,6 @@ trait ImportSupport
$databaseAccount = $account->getAccount();
return $databaseAccount;
-
}
/**
@@ -219,7 +214,6 @@ trait ImportSupport
Log::debug(sprintf('Found %d user rules.', $set->count()));
return $set;
-
}
/**
@@ -230,7 +224,9 @@ trait ImportSupport
* @param Account $account
*
* @return string
+ *
* @throws FireflyException
+ *
* @see ImportSupport::getOpposingAccount()
*/
private function getTransactionType(string $amount, Account $account): string
@@ -241,18 +237,18 @@ trait ImportSupport
$transactionType = TransactionType::WITHDRAWAL;
}
- if (bccomp($amount, '0') === 1) {
+ if (1 === bccomp($amount, '0')) {
$transactionType = TransactionType::DEPOSIT;
}
// if opposing is an asset account, it's a transfer:
- if ($account->accountType->type === AccountType::ASSET) {
+ if (AccountType::ASSET === $account->accountType->type) {
Log::debug(sprintf('Opposing account #%d %s is an asset account, make transfer.', $account->id, $account->name));
$transactionType = TransactionType::TRANSFER;
}
// verify that opposing account is of the correct type:
- if ($account->accountType->type === AccountType::EXPENSE && $transactionType !== TransactionType::WITHDRAWAL) {
+ if (AccountType::EXPENSE === $account->accountType->type && TransactionType::WITHDRAWAL !== $transactionType) {
$message = 'This row is imported as a withdrawal but opposing is an expense account. This cannot be!';
Log::error($message);
throw new FireflyException($message);
@@ -272,16 +268,20 @@ trait ImportSupport
{
$set = TransactionJournal::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->leftJoin(
- 'transactions AS source', function (JoinClause $join) {
- $join->on('transaction_journals.id', '=', 'source.transaction_journal_id')->where('source.amount', '<', 0);
- }
+ 'transactions AS source',
+ function (JoinClause $join) {
+ $join->on('transaction_journals.id', '=', 'source.transaction_journal_id')->where('source.amount', '<', 0);
+ }
)
->leftJoin(
- 'transactions AS destination', function (JoinClause $join) {
- $join->on('transaction_journals.id', '=', 'destination.transaction_journal_id')->where(
- 'destination.amount', '>', 0
- );
- }
+ 'transactions AS destination',
+ function (JoinClause $join) {
+ $join->on('transaction_journals.id', '=', 'destination.transaction_journal_id')->where(
+ 'destination.amount',
+ '>',
+ 0
+ );
+ }
)
->leftJoin('accounts as source_accounts', 'source.account_id', '=', 'source_accounts.id')
->leftJoin('accounts as destination_accounts', 'destination.account_id', '=', 'destination_accounts.id')
@@ -289,8 +289,8 @@ trait ImportSupport
->where('transaction_types.type', TransactionType::TRANSFER)
->get(
['transaction_journals.id', 'transaction_journals.encrypted', 'transaction_journals.description',
- 'source_accounts.name as source_name', 'destination_accounts.name as destination_name', 'destination.amount'
- , 'transaction_journals.date']
+ 'source_accounts.name as source_name', 'destination_accounts.name as destination_name', 'destination.amount',
+ 'transaction_journals.date',]
);
$array = [];
/** @var TransactionJournal $entry */
@@ -323,14 +323,13 @@ trait ImportSupport
->where('data', $json)
->where('name', 'importHash')
->first();
- if (!is_null($entry)) {
+ if (null !== $entry) {
Log::error(sprintf('A journal with hash %s has already been imported (spoiler: it\'s journal #%d)', $hash, $entry->transaction_journal_id));
return true;
}
return false;
-
}
/**
@@ -339,7 +338,7 @@ trait ImportSupport
*/
private function storeBill(TransactionJournal $journal, Bill $bill)
{
- if (!is_null($bill->id)) {
+ if (null !== $bill->id) {
Log::debug(sprintf('Linked bill #%d to journal #%d', $bill->id, $journal->id));
$journal->bill()->associate($bill);
$journal->save();
@@ -352,7 +351,7 @@ trait ImportSupport
*/
private function storeBudget(TransactionJournal $journal, Budget $budget)
{
- if (!is_null($budget->id)) {
+ if (null !== $budget->id) {
Log::debug(sprintf('Linked budget #%d to journal #%d', $budget->id, $journal->id));
$journal->budgets()->save($budget);
}
@@ -364,12 +363,10 @@ trait ImportSupport
*/
private function storeCategory(TransactionJournal $journal, Category $category)
{
-
- if (!is_null($category->id)) {
+ if (null !== $category->id) {
Log::debug(sprintf('Linked category #%d to journal #%d', $category->id, $journal->id));
$journal->categories()->save($category);
}
-
}
private function storeJournal(array $parameters): TransactionJournal
@@ -406,7 +403,7 @@ trait ImportSupport
'currency' => $parameters['currency'],
'amount' => $parameters['amount'],
'foreign_currency' => $parameters['foreign_currency'],
- 'foreign_amount' => is_null($parameters['foreign_currency']) ? null : $parameters['amount'],
+ 'foreign_amount' => null === $parameters['foreign_currency'] ? null : $parameters['amount'],
];
$opposite = app('steam')->opposite($parameters['amount']);
$two = [
@@ -415,7 +412,7 @@ trait ImportSupport
'currency' => $parameters['currency'],
'amount' => $opposite,
'foreign_currency' => $parameters['foreign_currency'],
- 'foreign_amount' => is_null($parameters['foreign_currency']) ? null : $opposite,
+ 'foreign_amount' => null === $parameters['foreign_currency'] ? null : $opposite,
];
$this->createTransaction($one);
$this->createTransaction($two);
@@ -452,10 +449,10 @@ trait ImportSupport
foreach ($tags as $tag) {
$dbTag = $repository->findByTag($tag);
- if (is_null($dbTag->id)) {
+ if (null === $dbTag->id) {
$dbTag = $repository->store(
['tag' => $tag, 'date' => null, 'description' => null, 'latitude' => null, 'longitude' => null,
- 'zoomLevel' => null, 'tagMode' => 'nothing']
+ 'zoomLevel' => null, 'tagMode' => 'nothing',]
);
}
$journal->tags()->save($dbTag);
@@ -464,5 +461,4 @@ trait ImportSupport
return;
}
-
}
diff --git a/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php b/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php
index af3769eae9..77aa4174f4 100644
--- a/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php
+++ b/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Jobs;
@@ -34,9 +33,7 @@ use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Collection;
/**
- * Class ExecuteRuleGroupOnExistingTransactions
- *
- * @package FireflyIII\Jobs
+ * Class ExecuteRuleGroupOnExistingTransactions.
*/
class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
{
@@ -44,13 +41,13 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
/** @var Collection */
private $accounts;
- /** @var Carbon */
+ /** @var Carbon */
private $endDate;
/** @var RuleGroup */
private $ruleGroup;
- /** @var Carbon */
+ /** @var Carbon */
private $startDate;
- /** @var User */
+ /** @var User */
private $user;
/**
@@ -72,7 +69,6 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
}
/**
- *
* @param Collection $accounts
*/
public function setAccounts(Collection $accounts)
@@ -89,7 +85,6 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
}
/**
- *
* @param Carbon $date
*/
public function setEndDate(Carbon $date)
@@ -106,7 +101,6 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
}
/**
- *
* @param Carbon $date
*/
public function setStartDate(Carbon $date)
@@ -123,7 +117,6 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
}
/**
- *
* @param User $user
*/
public function setUser(User $user)
@@ -133,8 +126,6 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
/**
* Execute the job.
- *
- * @return void
*/
public function handle()
{
@@ -159,7 +150,7 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
}
/**
- * Collect all journals that should be processed
+ * Collect all journals that should be processed.
*
* @return Collection
*/
@@ -174,7 +165,7 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
}
/**
- * Collects a list of rule processors, one for each rule within the rule group
+ * Collects a list of rule processors, one for each rule within the rule group.
*
* @return array
*/
@@ -192,8 +183,8 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
return array_map(
function ($rule) {
return Processor::make($rule);
- }, $rules->all()
+ },
+ $rules->all()
);
}
-
}
diff --git a/app/Jobs/ExecuteRuleOnExistingTransactions.php b/app/Jobs/ExecuteRuleOnExistingTransactions.php
index 9dba6dde22..0c7fbd7fd1 100644
--- a/app/Jobs/ExecuteRuleOnExistingTransactions.php
+++ b/app/Jobs/ExecuteRuleOnExistingTransactions.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Jobs;
@@ -35,9 +34,7 @@ use Illuminate\Support\Collection;
use Log;
/**
- * Class ExecuteRuleOnExistingTransactions
- *
- * @package FireflyIII\Jobs
+ * Class ExecuteRuleOnExistingTransactions.
*/
class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
{
@@ -45,13 +42,13 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
/** @var Collection */
private $accounts;
- /** @var Carbon */
+ /** @var Carbon */
private $endDate;
/** @var Rule */
private $rule;
- /** @var Carbon */
+ /** @var Carbon */
private $startDate;
- /** @var User */
+ /** @var User */
private $user;
/**
@@ -73,7 +70,6 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
}
/**
- *
* @param Collection $accounts
*/
public function setAccounts(Collection $accounts)
@@ -90,7 +86,6 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
}
/**
- *
* @param Carbon $date
*/
public function setEndDate(Carbon $date)
@@ -107,7 +102,6 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
}
/**
- *
* @param Carbon $date
*/
public function setStartDate(Carbon $date)
@@ -124,7 +118,6 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
}
/**
- *
* @param User $user
*/
public function setUser(User $user)
@@ -134,8 +127,6 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
/**
* Execute the job.
- *
- * @return void
*/
public function handle()
{
@@ -147,13 +138,13 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
$total = 0;
// Execute the rules for each transaction
foreach ($transactions as $transaction) {
- $total++;
+ ++$total;
$result = $processor->handleTransaction($transaction);
if ($result) {
- $hits++;
+ ++$hits;
}
if (!$result) {
- $misses++;
+ ++$misses;
}
Log::info(sprintf('Current progress: %d Transactions. Hits: %d, misses: %d', $total, $hits, $misses));
// Stop processing this group if the rule specifies 'stop_processing'
@@ -162,11 +153,10 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
}
}
Log::info(sprintf('Total transactions: %d. Hits: %d, misses: %d', $total, $hits, $misses));
-
}
/**
- * Collect all journals that should be processed
+ * Collect all journals that should be processed.
*
* @return Collection
*/
@@ -179,5 +169,4 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
return $collector->getJournals();
}
-
}
diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php
index 34ec0ec156..738c8a0ff6 100644
--- a/app/Jobs/Job.php
+++ b/app/Jobs/Job.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Jobs;
@@ -26,12 +25,9 @@ namespace FireflyIII\Jobs;
use Illuminate\Bus\Queueable;
/**
- * Class Job
- *
- * @package FireflyIII\Jobs
+ * Class Job.
*/
abstract class Job
{
-
use Queueable;
}
diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php
index 5c8482d80e..58835eb59f 100644
--- a/app/Jobs/MailError.php
+++ b/app/Jobs/MailError.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Jobs;
@@ -33,21 +32,19 @@ use Mail;
use Swift_TransportException;
/**
- * Class MailError
- *
- * @package FireflyIII\Jobs
+ * Class MailError.
*/
class MailError extends Job implements ShouldQueue
{
use InteractsWithQueue, SerializesModels;
- /** @var string */
+ /** @var string */
protected $destination;
- /** @var array */
+ /** @var array */
protected $exception;
- /** @var string */
+ /** @var string */
protected $ipAddress;
- /** @var array */
+ /** @var array */
protected $userData;
/**
@@ -57,7 +54,6 @@ class MailError extends Job implements ShouldQueue
* @param string $destination
* @param string $ipAddress
* @param array $exceptionData
- *
*/
public function __construct(array $userData, string $destination, string $ipAddress, array $exceptionData)
{
@@ -72,8 +68,6 @@ class MailError extends Job implements ShouldQueue
/**
* Execute the job.
- *
- * @return void
*/
public function handle()
{
@@ -87,9 +81,10 @@ class MailError extends Job implements ShouldQueue
$args['ip'] = $this->ipAddress;
Mail::send(
- ['emails.error-html', 'emails.error-text'], $args,
+ ['emails.error-html', 'emails.error-text'],
+ $args,
function (Message $message) use ($email) {
- if ($email !== 'mail@example.com') {
+ if ('mail@example.com' !== $email) {
$message->to($email, $email)->subject('Caught an error in Firely III');
}
}
diff --git a/app/Mail/AdminTestMail.php b/app/Mail/AdminTestMail.php
index a83047fa22..9895359c3b 100644
--- a/app/Mail/AdminTestMail.php
+++ b/app/Mail/AdminTestMail.php
@@ -19,6 +19,9 @@
* along with Firefly III. If not, see .
*/
+declare(strict_types=1);
+
+
namespace FireflyIII\Mail;
use Illuminate\Bus\Queueable;
@@ -26,17 +29,17 @@ use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
/**
- * Class AdminTestMail
+ * Class AdminTestMail.
*
- * @package FireflyIII\Mail
+ * Sends a test mail to administrators.
*/
class AdminTestMail extends Mailable
{
use Queueable, SerializesModels;
- /** @var string */
+ /** @var string Email address of admin */
public $email;
- /** @var string */
+ /** @var string IP address of admin */
public $ipAddress;
/**
diff --git a/app/Mail/ConfirmEmailChangeMail.php b/app/Mail/ConfirmEmailChangeMail.php
index 344aab2822..d08b62eba5 100644
--- a/app/Mail/ConfirmEmailChangeMail.php
+++ b/app/Mail/ConfirmEmailChangeMail.php
@@ -19,23 +19,30 @@
* along with Firefly III. If not, see .
*/
+declare(strict_types=1);
+
namespace FireflyIII\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
+/**
+ * Class ConfirmEmailChangeMail
+ *
+ * Sends message to new address to confirm change.
+ */
class ConfirmEmailChangeMail extends Mailable
{
use Queueable, SerializesModels;
- /** @var string */
+ /** @var string IP address of user */
public $ipAddress;
- /** @var string */
+ /** @var string New email address */
public $newEmail;
- /** @var string */
+ /** @var string Old email address */
public $oldEmail;
- /** @var string */
+ /** @var string Confirmation link */
public $uri;
/**
@@ -48,7 +55,6 @@ class ConfirmEmailChangeMail extends Mailable
*/
public function __construct(string $newEmail, string $oldEmail, string $uri, string $ipAddress)
{
-
$this->newEmail = $newEmail;
$this->oldEmail = $oldEmail;
$this->uri = $uri;
diff --git a/app/Mail/RegisteredUser.php b/app/Mail/RegisteredUser.php
index 2b59f302f7..1e01647930 100644
--- a/app/Mail/RegisteredUser.php
+++ b/app/Mail/RegisteredUser.php
@@ -19,10 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
/**
* RegisteredUser.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
@@ -38,12 +36,17 @@ use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
+/**
+ * Sends newly registered user an email message.
+ *
+ * Class RegisteredUser
+ */
class RegisteredUser extends Mailable
{
use Queueable, SerializesModels;
- /** @var string */
+ /** @var string Email address of user */
public $address;
- /** @var string */
+ /** @var string IP address of user */
public $ipAddress;
/**
diff --git a/app/Mail/RequestedNewPassword.php b/app/Mail/RequestedNewPassword.php
index 3f28c654da..6041424d62 100644
--- a/app/Mail/RequestedNewPassword.php
+++ b/app/Mail/RequestedNewPassword.php
@@ -19,10 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
/**
* RequestedNewPassword.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
@@ -38,12 +36,16 @@ use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
+/**
+ * Sends user link for new password.
+ * Class RequestedNewPassword
+ */
class RequestedNewPassword extends Mailable
{
use Queueable, SerializesModels;
- /** @var string */
+ /** @var string IP address of user */
public $ipAddress;
- /** @var string */
+ /** @var string URI of password change link */
public $url;
/**
diff --git a/app/Mail/UndoEmailChangeMail.php b/app/Mail/UndoEmailChangeMail.php
index 16e5ef8187..6fc85d6e07 100644
--- a/app/Mail/UndoEmailChangeMail.php
+++ b/app/Mail/UndoEmailChangeMail.php
@@ -19,23 +19,30 @@
* along with Firefly III. If not, see .
*/
+declare(strict_types=1);
+
+
+
namespace FireflyIII\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
+/**
+ * Class UndoEmailChangeMail
+ */
class UndoEmailChangeMail extends Mailable
{
use Queueable, SerializesModels;
- /** @var string */
+ /** @var string IP address of user*/
public $ipAddress;
- /** @var string */
+ /** @var string New email address */
public $newEmail;
- /** @var string */
+ /** @var string Old email address */
public $oldEmail;
- /** @var string */
+ /** @var string URI to undo */
public $uri;
/**
@@ -48,7 +55,6 @@ class UndoEmailChangeMail extends Mailable
*/
public function __construct(string $newEmail, string $oldEmail, string $uri, string $ipAddress)
{
-
$this->newEmail = $newEmail;
$this->oldEmail = $oldEmail;
$this->uri = $uri;
diff --git a/app/Models/Account.php b/app/Models/Account.php
index 3848ac32f2..50c6ec7618 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -36,11 +35,8 @@ use Illuminate\Database\Query\JoinClause;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
-
/**
- * Class Account
- *
- * @package FireflyIII\Models
+ * Class Account.
*/
class Account extends Model
{
@@ -53,15 +49,13 @@ class Account extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'active' => 'boolean',
'encrypted' => 'boolean',
];
/** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
- /** @var array */
protected $fillable = ['user_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban'];
/** @var array */
protected $hidden = ['encrypted'];
@@ -73,13 +67,14 @@ class Account extends Model
'active' => 'required|boolean',
'iban' => 'between:1,50|iban',
];
- /** @var bool */
+ /** @var bool */
private $joinedAccountTypes;
/**
* @param array $fields
*
* @return Account
+ *
* @throws FireflyException
*/
public static function firstOrCreateEncrypted(array $fields)
@@ -102,7 +97,6 @@ class Account extends Model
$fields['name'] = $fields['iban'];
}
-
/** @var Account $account */
foreach ($set as $account) {
if ($account->name === $fields['name']) {
@@ -114,7 +108,6 @@ class Account extends Model
$account = self::create($fields);
return $account;
-
}
/**
@@ -124,7 +117,6 @@ class Account extends Model
*/
public static function routeBinder(Account $value)
{
-
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {
return $value;
@@ -156,7 +148,7 @@ class Account extends Model
{
$name = $this->name;
- if ($this->accountType->type === AccountType::CASH) {
+ if (AccountType::CASH === $this->accountType->type) {
return '';
}
@@ -164,16 +156,17 @@ class Account extends Model
}
/**
- * FIxxME can return null
+ * FIxxME can return null.
*
* @param $value
*
* @return string
+ *
* @throws FireflyException
*/
public function getIbanAttribute($value): string
{
- if (is_null($value) || strlen(strval($value)) === 0) {
+ if (null === $value || 0 === strlen(strval($value))) {
return '';
}
try {
@@ -181,7 +174,7 @@ class Account extends Model
} catch (DecryptException $e) {
throw new FireflyException('Cannot decrypt value "' . $value . '" for account #' . $this->id);
}
- if (is_null($result)) {
+ if (null === $result) {
return '';
}
@@ -189,7 +182,6 @@ class Account extends Model
}
/**
- *
* @param string $fieldName
*
* @return string
@@ -206,14 +198,12 @@ class Account extends Model
}
/**
- *
* @param $value
*
* @return string
*/
public function getNameAttribute($value): string
{
-
if ($this->encrypted) {
return Crypt::decrypt($value);
}
@@ -222,9 +212,10 @@ class Account extends Model
}
/**
- * Returns the opening balance
+ * Returns the opening balance.
*
* @return TransactionJournal
+ *
* @throws FireflyException
*/
public function getOpeningBalance(): TransactionJournal
@@ -234,7 +225,7 @@ class Account extends Model
->where('transactions.account_id', $this->id)
->transactionTypes([TransactionType::OPENING_BALANCE])
->first(['transaction_journals.*']);
- if (is_null($journal)) {
+ if (null === $journal) {
return new TransactionJournal;
}
@@ -245,6 +236,7 @@ class Account extends Model
* Returns the amount of the opening balance for this account.
*
* @return string
+ *
* @throws FireflyException
*/
public function getOpeningBalanceAmount(): string
@@ -254,16 +246,16 @@ class Account extends Model
->where('transactions.account_id', $this->id)
->transactionTypes([TransactionType::OPENING_BALANCE])
->first(['transaction_journals.*']);
- if (is_null($journal)) {
+ if (null === $journal) {
return '0';
}
$count = $journal->transactions()->count();
- if ($count !== 2) {
+ if (2 !== $count) {
throw new FireflyException(sprintf('Cannot use getFirstTransaction on journal #%d', $journal->id));
}
$transaction = $journal->transactions()->where('account_id', $this->id)->first();
- if (is_null($transaction)) {
+ if (null === $transaction) {
return '0';
}
@@ -271,9 +263,10 @@ class Account extends Model
}
/**
- * Returns the date of the opening balance for this account. If no date, will return 01-01-1900
+ * Returns the date of the opening balance for this account. If no date, will return 01-01-1900.
*
* @return Carbon
+ *
* @throws FireflyException
*/
public function getOpeningBalanceDate(): Carbon
@@ -284,7 +277,7 @@ class Account extends Model
->where('transactions.account_id', $this->id)
->transactionTypes([TransactionType::OPENING_BALANCE])
->first(['transaction_journals.*']);
- if (is_null($journal)) {
+ if (null === $journal) {
return $date;
}
@@ -300,13 +293,12 @@ class Account extends Model
}
/**
- *
* @param EloquentBuilder $query
* @param array $types
*/
public function scopeAccountTypeIn(EloquentBuilder $query, array $types)
{
- if (is_null($this->joinedAccountTypes)) {
+ if (null === $this->joinedAccountTypes) {
$query->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id');
$this->joinedAccountTypes = true;
}
@@ -314,7 +306,6 @@ class Account extends Model
}
/**
- *
* @param EloquentBuilder $query
* @param string $name
* @param string $value
@@ -323,15 +314,15 @@ class Account extends Model
{
$joinName = str_replace('.', '_', $name);
$query->leftJoin(
- 'account_meta as ' . $joinName, function (JoinClause $join) use ($joinName, $name) {
- $join->on($joinName . '.account_id', '=', 'accounts.id')->where($joinName . '.name', '=', $name);
- }
+ 'account_meta as ' . $joinName,
+ function (JoinClause $join) use ($joinName, $name) {
+ $join->on($joinName . '.account_id', '=', 'accounts.id')->where($joinName . '.name', '=', $name);
+ }
);
$query->where($joinName . '.data', json_encode($value));
}
/**
- *
* @param $value
*/
public function setIbanAttribute($value)
@@ -340,7 +331,6 @@ class Account extends Model
}
/**
- *
* @param $value
*/
public function setNameAttribute($value)
@@ -352,7 +342,6 @@ class Account extends Model
/**
* @param $value
- *
*/
public function setVirtualBalanceAttribute($value)
{
diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.php
index a4b454ab20..b4e6c3053f 100644
--- a/app/Models/AccountMeta.php
+++ b/app/Models/AccountMeta.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -27,13 +26,10 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
- * Class AccountMeta
- *
- * @package FireflyIII\Models
+ * Class AccountMeta.
*/
class AccountMeta extends Model
{
-
/**
* The attributes that should be casted to native types.
*
@@ -41,16 +37,14 @@ class AccountMeta extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
];
/** @var array */
- protected $dates = ['created_at', 'updated_at'];
protected $fillable = ['account_id', 'name', 'data'];
protected $table = 'account_meta';
/**
- *
* @return BelongsTo
*/
public function account(): BelongsTo
@@ -58,7 +52,6 @@ class AccountMeta extends Model
return $this->belongsTo('FireflyIII\Models\Account');
}
-
/**
* @param $value
*
@@ -76,5 +69,4 @@ class AccountMeta extends Model
{
$this->attributes['data'] = json_encode($value);
}
-
}
diff --git a/app/Models/AccountType.php b/app/Models/AccountType.php
index 5ec636bfbd..66eb903b65 100644
--- a/app/Models/AccountType.php
+++ b/app/Models/AccountType.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -27,9 +26,7 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
- * Class AccountType
- *
- * @package FireflyIII\Models
+ * Class AccountType.
*/
class AccountType extends Model
{
@@ -41,8 +38,8 @@ class AccountType extends Model
const INITIAL_BALANCE = 'Initial balance account';
const BENEFICIARY = 'Beneficiary account';
const IMPORT = 'Import account';
-
-
+ const RECONCILIATION = 'Reconciliation account';
+ const LOAN = 'Loan';
/**
* The attributes that should be casted to native types.
*
@@ -50,14 +47,11 @@ class AccountType extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
];
-
/** @var array */
- protected $dates = ['created_at', 'updated_at'];
-
- //
+ protected $fillable = ['type'];
/**
* @return HasMany
diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php
index a26d618644..00ea1c5e89 100644
--- a/app/Models/Attachment.php
+++ b/app/Models/Attachment.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -31,9 +30,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class Attachment
- *
- * @package FireflyIII\Models
+ * Class Attachment.
*/
class Attachment extends Model
{
@@ -46,14 +43,12 @@ class Attachment extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'uploaded' => 'boolean',
];
/** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
- /** @var array */
protected $fillable = ['attachable_id', 'attachable_type', 'user_id', 'md5', 'filename', 'mime', 'title', 'notes', 'description', 'size', 'uploaded'];
/**
@@ -64,7 +59,6 @@ class Attachment extends Model
public static function routeBinder(Attachment $value)
{
if (auth()->check()) {
-
if (intval($value->user_id) === auth()->user()->id) {
return $value;
}
@@ -99,7 +93,7 @@ class Attachment extends Model
*/
public function getDescriptionAttribute($value)
{
- if (is_null($value) || strlen($value) === 0) {
+ if (null === $value || 0 === strlen($value)) {
return null;
}
@@ -113,7 +107,7 @@ class Attachment extends Model
*/
public function getFilenameAttribute($value)
{
- if (is_null($value) || strlen($value) === 0) {
+ if (null === $value || 0 === strlen($value)) {
return null;
}
@@ -127,7 +121,7 @@ class Attachment extends Model
*/
public function getMimeAttribute($value)
{
- if (is_null($value) || strlen($value) === 0) {
+ if (null === $value || 0 === strlen($value)) {
return null;
}
@@ -135,14 +129,13 @@ class Attachment extends Model
}
/**
- *
* @param $value
*
* @return null|string
*/
public function getNotesAttribute($value)
{
- if (is_null($value) || strlen($value) === 0) {
+ if (null === $value || 0 === strlen($value)) {
return null;
}
@@ -150,14 +143,13 @@ class Attachment extends Model
}
/**
- *
* @param $value
*
* @return null|string
*/
public function getTitleAttribute($value)
{
- if (is_null($value) || strlen($value) === 0) {
+ if (null === $value || 0 === strlen($value)) {
return null;
}
@@ -211,5 +203,4 @@ class Attachment extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php
index 7a37df2f07..9e90b2572f 100644
--- a/app/Models/AvailableBudget.php
+++ b/app/Models/AvailableBudget.php
@@ -18,20 +18,16 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
-
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
- * Class AvailableBudget
- *
- * @package FireflyIII\Models
+ * Class AvailableBudget.
*/
class AvailableBudget extends Model
{
@@ -43,15 +39,13 @@ class AvailableBudget extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'start_date' => 'date',
'end_date' => 'date',
];
/** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
- /** @var array */
protected $fillable = ['user_id', 'transaction_currency_id', 'amount', 'start_date', 'end_date'];
/**
diff --git a/app/Models/Bill.php b/app/Models/Bill.php
index 6c52a3a86b..7b9a7fd2a7 100644
--- a/app/Models/Bill.php
+++ b/app/Models/Bill.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -32,13 +31,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
/**
- * Class Bill
- *
- * @package FireflyIII\Models
+ * Class Bill.
*/
class Bill extends Model
{
-
use SoftDeletes, ValidatingTrait;
/**
* The attributes that should be casted to native types.
@@ -46,10 +42,10 @@ class Bill extends Model
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'date' => 'date',
'skip' => 'int',
'automatch' => 'boolean',
@@ -57,13 +53,11 @@ class Bill extends Model
'name_encrypted' => 'boolean',
'match_encrypted' => 'boolean',
];
- /** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $fillable
= ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip',
'automatch', 'active',];
protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted'];
- protected $rules = ['name' => 'required|between:1,200',];
+ protected $rules = ['name' => 'required|between:1,200'];
/**
* @param Bill $value
@@ -80,6 +74,14 @@ class Bill extends Model
throw new NotFoundHttpException;
}
+ /**
+ * @return \Illuminate\Database\Eloquent\Relations\MorphMany
+ */
+ public function attachments()
+ {
+ return $this->morphMany('FireflyIII\Models\Attachment', 'attachable');
+ }
+
/**
* @param $value
*
@@ -87,8 +89,7 @@ class Bill extends Model
*/
public function getMatchAttribute($value)
{
-
- if (intval($this->match_encrypted) === 1) {
+ if (1 === intval($this->match_encrypted)) {
return Crypt::decrypt($value);
}
@@ -102,14 +103,21 @@ class Bill extends Model
*/
public function getNameAttribute($value)
{
-
- if (intval($this->name_encrypted) === 1) {
+ if (1 === intval($this->name_encrypted)) {
return Crypt::decrypt($value);
}
return $value;
}
+ /**
+ * Get all of the notes.
+ */
+ public function notes()
+ {
+ return $this->morphMany('FireflyIII\Models\Note', 'noteable');
+ }
+
/**
* @param $value
*/
@@ -161,6 +169,4 @@ class Bill extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
-
}
diff --git a/app/Models/Budget.php b/app/Models/Budget.php
index 1044d66125..d319d2aa2b 100644
--- a/app/Models/Budget.php
+++ b/app/Models/Budget.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -31,13 +30,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
/**
- * Class Budget
- *
- * @package FireflyIII\Models
+ * Class Budget.
*/
class Budget extends Model
{
-
use SoftDeletes, ValidatingTrait;
/**
@@ -47,17 +43,18 @@ class Budget extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'active' => 'boolean',
'encrypted' => 'boolean',
];
/** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $fillable = ['user_id', 'name', 'active'];
- protected $hidden = ['encrypted'];
- protected $rules = ['name' => 'required|between:1,200',];
+ /** @var array */
+ protected $hidden = ['encrypted'];
+ /** @var array */
+ protected $rules = ['name' => 'required|between:1,200'];
/**
* @param array $fields
@@ -84,7 +81,6 @@ class Budget extends Model
$budget = self::create($fields);
return $budget;
-
}
/**
@@ -103,7 +99,6 @@ class Budget extends Model
}
/**
- *
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function budgetlimits()
@@ -118,7 +113,6 @@ class Budget extends Model
*/
public function getNameAttribute($value)
{
-
if ($this->encrypted) {
return Crypt::decrypt($value);
}
@@ -159,6 +153,4 @@ class Budget extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
-
}
diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.php
index fa0384857f..00c7271711 100644
--- a/app/Models/BudgetLimit.php
+++ b/app/Models/BudgetLimit.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -27,13 +26,10 @@ use Illuminate\Database\Eloquent\Model;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class BudgetLimit
- *
- * @package FireflyIII\Models
+ * Class BudgetLimit.
*/
class BudgetLimit extends Model
{
-
/**
* The attributes that should be casted to native types.
*
@@ -41,14 +37,14 @@ class BudgetLimit extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
'start_date' => 'date',
'end_date' => 'date',
'repeats' => 'boolean',
];
/** @var array */
- protected $dates = ['created_at', 'updated_at', 'start_date', 'end_date'];
+ protected $dates = ['start_date', 'end_date'];
/**
* @param $value
@@ -85,7 +81,6 @@ class BudgetLimit extends Model
return $this->hasMany('FireflyIII\Models\LimitRepetition');
}
-
/**
* @param $value
*/
@@ -93,5 +88,4 @@ class BudgetLimit extends Model
{
$this->attributes['amount'] = strval(round($value, 12));
}
-
}
diff --git a/app/Models/Category.php b/app/Models/Category.php
index cd44b771e6..d72cd168e2 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -31,9 +30,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
/**
- * Class Category
- *
- * @package FireflyIII\Models
+ * Class Category.
*/
class Category extends Model
{
@@ -46,19 +43,17 @@ class Category extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'encrypted' => 'boolean',
];
/** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
- /** @var array */
protected $fillable = ['user_id', 'name'];
/** @var array */
protected $hidden = ['encrypted'];
/** @var array */
- protected $rules = ['name' => 'required|between:1,200',];
+ protected $rules = ['name' => 'required|between:1,200'];
/**
* @param array $fields
@@ -85,7 +80,6 @@ class Category extends Model
$category = self::create($fields);
return $category;
-
}
/**
@@ -104,14 +98,12 @@ class Category extends Model
}
/**
- *
* @param $value
*
* @return string
*/
public function getNameAttribute($value)
{
-
if ($this->encrypted) {
return Crypt::decrypt($value);
}
@@ -120,7 +112,6 @@ class Category extends Model
}
/**
- *
* @param $value
*/
public function setNameAttribute($value)
@@ -153,5 +144,4 @@ class Category extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index c9f9edbf77..028f5faf57 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -27,9 +26,7 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
- * Class Configuration
- *
- * @package FireflyIII\Models
+ * Class Configuration.
*/
class Configuration extends Model
{
@@ -41,12 +38,10 @@ class Configuration extends Model
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
];
- /** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $table = 'configuration';
/**
@@ -66,6 +61,4 @@ class Configuration extends Model
{
$this->attributes['data'] = json_encode($value);
}
-
-
}
diff --git a/app/Models/CurrencyExchangeRate.php b/app/Models/CurrencyExchangeRate.php
index c953a8cca1..acea35d9f2 100644
--- a/app/Models/CurrencyExchangeRate.php
+++ b/app/Models/CurrencyExchangeRate.php
@@ -18,25 +18,21 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
-
use FireflyIII\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
- * Class CurrencyExchange
- *
- * @package FireflyIII\Models
+ * Class CurrencyExchange.
*/
class CurrencyExchangeRate extends Model
{
-
- protected $dates = ['created_at', 'updated_at', 'date'];
+ /** @var array */
+ protected $dates = ['date'];
/**
* @return BelongsTo
@@ -61,5 +57,4 @@ class CurrencyExchangeRate extends Model
{
return $this->belongsTo(User::class);
}
-
}
diff --git a/app/Models/ExportJob.php b/app/Models/ExportJob.php
index dc14d88805..599b6bdba9 100644
--- a/app/Models/ExportJob.php
+++ b/app/Models/ExportJob.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -28,34 +27,31 @@ use Illuminate\Database\Eloquent\Model;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class ExportJob
+ * Class ExportJob.
*
* @property User $user
- *
- * @package FireflyIII\Models
*/
class ExportJob extends Model
{
/** @var array */
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
];
- /** @var array */
- protected $dates = ['created_at', 'updated_at'];
/**
* @param $value
*
* @return mixed
+ *
* @throws NotFoundHttpException
*/
public static function routeBinder($value)
{
if (auth()->check()) {
$model = self::where('key', $value)->where('user_id', auth()->user()->id)->first();
- if (!is_null($model)) {
+ if (null !== $model) {
return $model;
}
}
diff --git a/app/Models/ImportJob.php b/app/Models/ImportJob.php
index 6e866aefda..74c7e591f9 100644
--- a/app/Models/ImportJob.php
+++ b/app/Models/ImportJob.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -30,13 +29,10 @@ use Storage;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class ImportJob
- *
- * @package FireflyIII\Models
+ * Class ImportJob.
*/
class ImportJob extends Model
{
-
/**
* The attributes that should be casted to native types.
*
@@ -44,11 +40,9 @@ class ImportJob extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
];
- /** @var array */
- protected $dates = ['created_at', 'updated_at'];
protected $validStatus
= [
@@ -63,13 +57,14 @@ class ImportJob extends Model
* @param $value
*
* @return mixed
+ *
* @throws NotFoundHttpException
*/
public static function routeBinder($value)
{
if (auth()->check()) {
$model = self::where('key', $value)->where('user_id', auth()->user()->id)->first();
- if (!is_null($model)) {
+ if (null !== $model) {
return $model;
}
}
@@ -100,7 +95,6 @@ class ImportJob extends Model
$status['done'] += $count;
$this->extended_status = $status;
$this->save();
-
}
/**
@@ -112,7 +106,6 @@ class ImportJob extends Model
$status['steps'] += $count;
$this->extended_status = $status;
$this->save();
-
}
/**
@@ -131,10 +124,10 @@ class ImportJob extends Model
*/
public function getConfigurationAttribute($value)
{
- if (is_null($value)) {
+ if (null === $value) {
return [];
}
- if (strlen($value) === 0) {
+ if (0 === strlen($value)) {
return [];
}
@@ -148,7 +141,7 @@ class ImportJob extends Model
*/
public function getExtendedStatusAttribute($value)
{
- if (strlen($value) === 0) {
+ if (0 === strlen($value)) {
return [];
}
diff --git a/app/Models/LimitRepetition.php b/app/Models/LimitRepetition.php
deleted file mode 100644
index dfaaebd903..0000000000
--- a/app/Models/LimitRepetition.php
+++ /dev/null
@@ -1,92 +0,0 @@
-.
- */
-
-declare(strict_types=1);
-
-namespace FireflyIII\Models;
-
-use Carbon\Carbon;
-use Illuminate\Database\Eloquent\Builder;
-use Illuminate\Database\Eloquent\Model;
-
-/**
- * Class LimitRepetition
- *
- * @deprecated
- * @package FireflyIII\Models
- */
-class LimitRepetition extends Model
-{
-
- /**
- * The attributes that should be casted to native types.
- *
- * @var array
- */
- protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'startdate' => 'date',
- 'enddate' => 'date',
- ];
- protected $dates = ['created_at', 'updated_at', 'startdate', 'enddate'];
- protected $hidden = ['amount_encrypted'];
-
- /**
- * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
- */
- public function budgetLimit()
- {
- return $this->belongsTo('FireflyIII\Models\BudgetLimit');
- }
-
- /**
- *
- * @param Builder $query
- * @param Carbon $date
- *
- */
- public function scopeAfter(Builder $query, Carbon $date)
- {
- $query->where('limit_repetitions.startdate', '>=', $date->format('Y-m-d 00:00:00'));
- }
-
- /**
- *
- * @param Builder $query
- * @param Carbon $date
- *
- */
- public function scopeBefore(Builder $query, Carbon $date)
- {
- $query->where('limit_repetitions.enddate', '<=', $date->format('Y-m-d 00:00:00'));
- }
-
- /**
- * @param $value
- */
- public function setAmountAttribute($value)
- {
- $this->attributes['amount'] = strval(round($value, 2));
- }
-
-}
diff --git a/app/Models/LinkType.php b/app/Models/LinkType.php
index be70f06f4c..0c0e0cfac7 100644
--- a/app/Models/LinkType.php
+++ b/app/Models/LinkType.php
@@ -18,20 +18,16 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
-
use Illuminate\Database\Eloquent\Model;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* @property int $journalCount
* Class LinkType
- *
- * @package FireflyIII\Models
*/
class LinkType extends Model
{
@@ -42,9 +38,9 @@ class LinkType extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'editable' => 'boolean',
];
@@ -55,13 +51,14 @@ class LinkType extends Model
* @param $value
*
* @return mixed
+ *
* @throws NotFoundHttpException
*/
public static function routeBinder($value)
{
if (auth()->check()) {
$model = self::where('id', $value)->first();
- if (!is_null($model)) {
+ if (null !== $model) {
return $model;
}
}
@@ -72,5 +69,4 @@ class LinkType extends Model
{
return $this->hasMany(TransactionJournalLink::class);
}
-
}
diff --git a/app/Models/Note.php b/app/Models/Note.php
index aa1665c671..4d5d2bfafb 100644
--- a/app/Models/Note.php
+++ b/app/Models/Note.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -27,9 +26,7 @@ use Illuminate\Database\Eloquent\Model;
use League\CommonMark\CommonMarkConverter;
/**
- * Class Note
- *
- * @package FireflyIII\Models
+ * Class Note.
*/
class Note extends Model
{
@@ -39,12 +36,12 @@ class Note extends Model
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
];
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
+ /** @var array */
protected $fillable = ['title', 'text'];
/**
@@ -59,11 +56,10 @@ class Note extends Model
/**
* Get all of the owning noteable models. Currently piggy bank and
- * transaction journal
+ * transaction journal.
*/
public function noteable()
{
return $this->morphTo();
}
-
}
diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php
index 9a81a08118..b3a4e1fe90 100644
--- a/app/Models/PiggyBank.php
+++ b/app/Models/PiggyBank.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -32,9 +31,7 @@ use Steam;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class PiggyBank
- *
- * @package FireflyIII\Models
+ * Class PiggyBank.
*/
class PiggyBank extends Model
{
@@ -46,19 +43,22 @@ class PiggyBank extends Model
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'startdate' => 'date',
'targetdate' => 'date',
'order' => 'int',
'active' => 'boolean',
'encrypted' => 'boolean',
];
- protected $dates = ['created_at', 'updated_at', 'deleted_at', 'startdate', 'targetdate'];
+ /** @var array */
+ protected $dates = ['startdate', 'targetdate'];
+ /** @var array */
protected $fillable = ['name', 'account_id', 'order', 'targetamount', 'startdate', 'targetdate'];
- protected $hidden = ['targetamount_encrypted', 'encrypted'];
+ /** @var array */
+ protected $hidden = ['targetamount_encrypted', 'encrypted'];
/**
* @param PiggyBank $value
@@ -84,19 +84,19 @@ class PiggyBank extends Model
}
/**
- * Grabs the PiggyBankRepetition that's currently relevant / active
+ * Grabs the PiggyBankRepetition that's currently relevant / active.
*
* @returns PiggyBankRepetition
*/
public function currentRelevantRep(): PiggyBankRepetition
{
- if (!is_null($this->currentRep)) {
+ if (null !== $this->currentRep) {
return $this->currentRep;
}
// repeating piggy banks are no longer supported.
/** @var PiggyBankRepetition $rep */
$rep = $this->piggyBankRepetitions()->first(['piggy_bank_repetitions.*']);
- if (is_null($rep)) {
+ if (null === $rep) {
return new PiggyBankRepetition();
}
$this->currentRep = $rep;
@@ -105,14 +105,12 @@ class PiggyBank extends Model
}
/**
- *
* @param $value
*
* @return string
*/
public function getNameAttribute($value)
{
-
if ($this->encrypted) {
return Crypt::decrypt($value);
}
@@ -132,12 +130,12 @@ class PiggyBank extends Model
$remainingAmount = bcsub($this->targetamount, $this->currentRelevantRep()->currentamount);
// more than 1 month to go and still need money to save:
- if ($diffInMonths > 0 && bccomp($remainingAmount, '0') === 1) {
+ if ($diffInMonths > 0 && 1 === bccomp($remainingAmount, '0')) {
$savePerMonth = bcdiv($remainingAmount, strval($diffInMonths));
}
// less than 1 month to go but still need money to save:
- if ($diffInMonths === 0 && bccomp($remainingAmount, '0') === 1) {
+ if (0 === $diffInMonths && 1 === bccomp($remainingAmount, '0')) {
$savePerMonth = $remainingAmount;
}
}
@@ -146,16 +144,14 @@ class PiggyBank extends Model
}
/**
- *
* @param Carbon $date
*
* @return string
*/
public function leftOnAccount(Carbon $date): string
{
-
$balance = Steam::balanceIgnoreVirtual($this->account, $date);
- /** @var PiggyBank $p */
+ // @var PiggyBank $p
foreach ($this->account->piggyBanks as $piggyBank) {
$currentAmount = $piggyBank->currentRelevantRep()->currentamount ?? '0';
@@ -163,7 +159,6 @@ class PiggyBank extends Model
}
return $balance;
-
}
/**
@@ -191,7 +186,6 @@ class PiggyBank extends Model
}
/**
- *
* @param $value
*/
public function setNameAttribute($value)
diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php
index 41e27d4296..4ec1836c9b 100644
--- a/app/Models/PiggyBankEvent.php
+++ b/app/Models/PiggyBankEvent.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -26,25 +25,23 @@ namespace FireflyIII\Models;
use Illuminate\Database\Eloquent\Model;
/**
- * Class PiggyBankEvent
- *
- * @package FireflyIII\Models
+ * Class PiggyBankEvent.
*/
class PiggyBankEvent extends Model
{
-
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'date' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'date' => 'datetime',
];
- protected $dates = ['created_at', 'updated_at', 'date'];
+ /** @var array */
+ protected $dates = ['date'];
protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount'];
protected $hidden = ['amount_encrypted'];
@@ -71,5 +68,4 @@ class PiggyBankEvent extends Model
{
return $this->belongsTo('FireflyIII\Models\TransactionJournal');
}
-
}
diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php
index 9484e631c2..edb2f51841 100644
--- a/app/Models/PiggyBankRepetition.php
+++ b/app/Models/PiggyBankRepetition.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -28,27 +27,26 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Model;
/**
- * Class PiggyBankRepetition
- *
- * @package FireflyIII\Models
+ * Class PiggyBankRepetition.
*/
class PiggyBankRepetition extends Model
{
-
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'startdate' => 'date',
'targetdate' => 'date',
];
- protected $dates = ['created_at', 'updated_at', 'startdate', 'targetdate'];
+ /** @var array */
+ protected $dates = ['startdate', 'targetdate'];
+ /** @var array */
protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount'];
/**
@@ -87,7 +85,6 @@ class PiggyBankRepetition extends Model
)
->where(
function (EloquentBuilder $q) use ($date) {
-
$q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00'));
$q->orWhereNull('targetdate');
}
@@ -101,5 +98,4 @@ class PiggyBankRepetition extends Model
{
$this->attributes['currentamount'] = strval(round($value, 12));
}
-
}
diff --git a/app/Models/Preference.php b/app/Models/Preference.php
index 6c984085a3..a5296a2036 100644
--- a/app/Models/Preference.php
+++ b/app/Models/Preference.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -31,30 +30,29 @@ use Illuminate\Database\Eloquent\Model;
use Log;
/**
- * Class Preference
- *
- * @package FireflyIII\Models
+ * Class Preference.
*/
class Preference extends Model
{
-
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
];
- protected $dates = ['created_at', 'updated_at'];
+
+ /** @var array */
protected $fillable = ['user_id', 'data', 'name', 'data'];
/**
* @param $value
*
* @return mixed
+ *
* @throws FireflyException
*/
public function getDataAttribute($value)
@@ -73,7 +71,7 @@ class Preference extends Model
} catch (Exception $e) {
// don't care, assume is false.
}
- if (!($unserialized === false)) {
+ if (!(false === $unserialized)) {
return $unserialized;
}
@@ -95,5 +93,4 @@ class Preference extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/Role.php b/app/Models/Role.php
index 1d4da87723..27a01851d5 100644
--- a/app/Models/Role.php
+++ b/app/Models/Role.php
@@ -18,19 +18,15 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
-
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
/**
- * Class Role
- *
- * @package FireflyIII\Models
+ * Class Role.
*/
class Role extends Model
{
@@ -40,11 +36,10 @@ class Role extends Model
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
];
- protected $dates = ['created_at', 'updated_at'];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
@@ -53,5 +48,4 @@ class Role extends Model
{
return $this->belongsToMany('FireflyIII\User');
}
-
}
diff --git a/app/Models/Rule.php b/app/Models/Rule.php
index bb67df6f68..4a37c9ab3d 100644
--- a/app/Models/Rule.php
+++ b/app/Models/Rule.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -28,9 +27,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class Rule
- *
- * @package FireflyIII\Models
+ * Class Rule.
*/
class Rule extends Model
{
@@ -43,15 +40,13 @@ class Rule extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'active' => 'boolean',
'order' => 'int',
'stop_processing' => 'boolean',
];
- /** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
/**
* @param Rule $value
@@ -99,5 +94,4 @@ class Rule extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/RuleAction.php b/app/Models/RuleAction.php
index 800357db85..3bfdacc406 100644
--- a/app/Models/RuleAction.php
+++ b/app/Models/RuleAction.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -26,9 +25,7 @@ namespace FireflyIII\Models;
use Illuminate\Database\Eloquent\Model;
/**
- * Class RuleAction
- *
- * @package FireflyIII\Models
+ * Class RuleAction.
*/
class RuleAction extends Model
{
@@ -39,14 +36,12 @@ class RuleAction extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
'active' => 'boolean',
'order' => 'int',
'stop_processing' => 'boolean',
];
- /** @var array */
- protected $dates = ['created_at', 'updated_at'];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
diff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.php
index 2eabf6bb5d..33c98ed0b1 100644
--- a/app/Models/RuleGroup.php
+++ b/app/Models/RuleGroup.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -28,9 +27,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class RuleGroup
- *
- * @package FireflyIII\Models
+ * Class RuleGroup.
*/
class RuleGroup extends Model
{
@@ -42,15 +39,12 @@ class RuleGroup extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'active' => 'boolean',
'order' => 'int',
];
- /** @var array */
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
-
protected $fillable = ['user_id', 'order', 'title', 'description', 'active'];
diff --git a/app/Models/RuleTrigger.php b/app/Models/RuleTrigger.php
index d9af8d38ab..bf867571a6 100644
--- a/app/Models/RuleTrigger.php
+++ b/app/Models/RuleTrigger.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -26,9 +25,7 @@ namespace FireflyIII\Models;
use Illuminate\Database\Eloquent\Model;
/**
- * Class RuleTrigger
- *
- * @package FireflyIII\Models
+ * Class RuleTrigger.
*/
class RuleTrigger extends Model
{
@@ -39,14 +36,12 @@ class RuleTrigger extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
'active' => 'boolean',
'order' => 'int',
'stop_processing' => 'boolean',
];
- /** @var array */
- protected $dates = ['created_at', 'updated_at'];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
diff --git a/app/Models/Tag.php b/app/Models/Tag.php
index a5174e594a..555284408c 100644
--- a/app/Models/Tag.php
+++ b/app/Models/Tag.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -30,9 +29,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
/**
- * Class Tag
- *
- * @package FireflyIII\Models
+ * Class Tag.
*/
class Tag extends Model
{
@@ -44,18 +41,19 @@ class Tag extends Model
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'date' => 'date',
'zoomLevel' => 'int',
-
];
- protected $dates = ['created_at', 'updated_at', 'date', 'deleted_at'];
+ /** @var array */
+ protected $dates = ['date'];
+ /** @var array */
protected $fillable = ['user_id', 'tag', 'date', 'description', 'longitude', 'latitude', 'zoomLevel', 'tagMode'];
- protected $rules = ['tag' => 'required|between:1,200',];
-
+ /** @var array */
+ protected $rules = ['tag' => 'required|between:1,200'];
/**
* @param array $fields
@@ -86,7 +84,6 @@ class Tag extends Model
$tag = self::create($fields);
return $tag;
-
}
/**
@@ -109,7 +106,7 @@ class Tag extends Model
*
* @return string
*/
- public static function tagSum(Tag $tag): string
+ public static function tagSum(self $tag): string
{
$sum = '0';
/** @var TransactionJournal $journal */
@@ -121,14 +118,13 @@ class Tag extends Model
}
/**
- *
* @param $value
*
* @return string
*/
public function getDescriptionAttribute($value)
{
- if (is_null($value)) {
+ if (null === $value) {
return $value;
}
@@ -136,14 +132,13 @@ class Tag extends Model
}
/**
- *
* @param $value
*
* @return string
*/
public function getTagAttribute($value)
{
- if (is_null($value)) {
+ if (null === $value) {
return null;
}
@@ -153,7 +148,7 @@ class Tag extends Model
/**
* Save the model to the database.
*
- * @param array $options
+ * @param array $options
*
* @return bool
*/
@@ -169,7 +164,6 @@ class Tag extends Model
}
/**
- *
* @param $value
*/
public function setDescriptionAttribute($value)
@@ -178,7 +172,6 @@ class Tag extends Model
}
/**
- *
* @param $value
*/
public function setTagAttribute($value)
@@ -201,6 +194,4 @@ class Tag extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
-
}
diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php
index fa0c0c5a08..ca77193672 100644
--- a/app/Models/Transaction.php
+++ b/app/Models/Transaction.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -30,53 +29,43 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Watson\Validating\ValidatingTrait;
/**
- * Class Transaction
+ * Class Transaction.
*
- * @property-read int $journal_id
- * @property Carbon $date
- * @property-read string $transaction_description
- * @property string $transaction_amount
- * @property string $transaction_foreign_amount
- * @property string $transaction_type_type
- * @property string $foreign_currency_symbol
- * @property int $foreign_currency_dp
- *
- * @property int $account_id
- * @property string $account_name
- * @property string $account_iban
- * @property string $account_number
- * @property string $account_bic
- * @property string $account_currency_code
- *
- * @property int $opposing_account_id
- * @property string $opposing_account_name
- * @property string $opposing_account_iban
- * @property string $opposing_account_number
- * @property string $opposing_account_bic
- * @property string $opposing_currency_code
- *
- *
- * @property int $transaction_budget_id
- * @property string $transaction_budget_name
- * @property int $transaction_journal_budget_id
- * @property string $transaction_journal_budget_name
- *
- * @property-read int $transaction_category_id
- * @property-read string $transaction_category_name
- * @property-read int $transaction_journal_category_id
- * @property-read string $transaction_journal_category_name
- *
- * @property-read int $bill_id
- * @property string $bill_name
- *
- * @property string $notes
- * @property string $tags
- *
- * @property string $transaction_currency_symbol
- * @property int $transaction_currency_dp
- * @property string $transaction_currency_code
- *
- * @package FireflyIII\Models
+ * @property int $journal_id
+ * @property Carbon $date
+ * @property string $transaction_description
+ * @property string $transaction_amount
+ * @property string $transaction_foreign_amount
+ * @property string $transaction_type_type
+ * @property string $foreign_currency_symbol
+ * @property int $foreign_currency_dp
+ * @property int $account_id
+ * @property string $account_name
+ * @property string $account_iban
+ * @property string $account_number
+ * @property string $account_bic
+ * @property string $account_currency_code
+ * @property int $opposing_account_id
+ * @property string $opposing_account_name
+ * @property string $opposing_account_iban
+ * @property string $opposing_account_number
+ * @property string $opposing_account_bic
+ * @property string $opposing_currency_code
+ * @property int $transaction_budget_id
+ * @property string $transaction_budget_name
+ * @property int $transaction_journal_budget_id
+ * @property string $transaction_journal_budget_name
+ * @property int $transaction_category_id
+ * @property string $transaction_category_name
+ * @property int $transaction_journal_category_id
+ * @property string $transaction_journal_category_name
+ * @property int $bill_id
+ * @property string $bill_name
+ * @property string $notes
+ * @property string $tags
+ * @property string $transaction_currency_symbol
+ * @property int $transaction_currency_dp
+ * @property string $transaction_currency_code
*/
class Transaction extends Model
{
@@ -87,17 +76,17 @@ class Transaction extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'identifier' => 'int',
'encrypted' => 'boolean', // model does not have these fields though
'bill_name_encrypted' => 'boolean',
+ 'reconciled' => 'boolean',
];
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $fillable
= ['account_id', 'transaction_journal_id', 'description', 'amount', 'identifier', 'transaction_currency_id', 'foreign_currency_id',
- 'foreign_amount'];
+ 'foreign_amount',];
protected $hidden = ['encrypted'];
protected $rules
= [
@@ -117,7 +106,7 @@ class Transaction extends Model
public static function isJoined(Builder $query, string $table): bool
{
$joins = $query->getQuery()->joins;
- if (is_null($joins)) {
+ if (null === $joins) {
return false;
}
foreach ($joins as $join) {
@@ -174,7 +163,6 @@ class Transaction extends Model
}
/**
- *
* @param Builder $query
* @param Carbon $date
*/
@@ -187,10 +175,8 @@ class Transaction extends Model
}
/**
- *
* @param Builder $query
* @param Carbon $date
- *
*/
public function scopeBefore(Builder $query, Carbon $date)
{
@@ -201,7 +187,6 @@ class Transaction extends Model
}
/**
- *
* @param Builder $query
* @param array $types
*/
diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php
index 8fe217cb8d..5e8b4dfe7f 100644
--- a/app/Models/TransactionCurrency.php
+++ b/app/Models/TransactionCurrency.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -26,12 +25,9 @@ namespace FireflyIII\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
-use Watson\Validating\ValidatingTrait;
/**
- * Class TransactionCurrency
- *
- * @package FireflyIII\Models
+ * Class TransactionCurrency.
*/
class TransactionCurrency extends Model
{
@@ -43,13 +39,15 @@ class TransactionCurrency extends Model
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'decimal_places' => 'int',
];
- protected $dates = ['created_at', 'updated_at', 'deleted_at', 'date'];
+ /** @var array */
+ protected $dates = ['date'];
+ /** @var array */
protected $fillable = ['name', 'code', 'symbol', 'decimal_places'];
/**
@@ -57,7 +55,7 @@ class TransactionCurrency extends Model
*
* @return TransactionCurrency
*/
- public static function routeBinder(TransactionCurrency $currency)
+ public static function routeBinder(self $currency)
{
if (auth()->check()) {
return $currency;
diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php
index f67b25aec7..883a6ba3ab 100644
--- a/app/Models/TransactionJournal.php
+++ b/app/Models/TransactionJournal.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -38,9 +37,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
/**
- * Class TransactionJournal
- *
- * @package FireflyIII\Models
+ * Class TransactionJournal.
*/
class TransactionJournal extends Model
{
@@ -53,9 +50,9 @@ class TransactionJournal extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
'date' => 'date',
'interest_date' => 'date',
'book_date' => 'date',
@@ -66,12 +63,12 @@ class TransactionJournal extends Model
'completed' => 'boolean',
];
/** @var array */
- protected $dates = ['created_at', 'updated_at', 'date', 'deleted_at', 'interest_date', 'book_date', 'process_date'];
+ protected $dates = ['date', 'interest_date', 'book_date', 'process_date'];
/** @var array */
protected $fillable
= ['user_id', 'transaction_type_id', 'bill_id', 'interest_date', 'book_date', 'process_date',
'transaction_currency_id', 'description', 'completed',
- 'date', 'rent_date', 'encrypted', 'tag_count'];
+ 'date', 'rent_date', 'encrypted', 'tag_count',];
/** @var array */
protected $hidden = ['encrypted'];
/** @var array */
@@ -89,6 +86,7 @@ class TransactionJournal extends Model
* @param $value
*
* @return mixed
+ *
* @throws NotFoundHttpException
*/
public static function routeBinder($value)
@@ -98,7 +96,7 @@ class TransactionJournal extends Model
->with('transactionType')
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->where('user_id', auth()->user()->id)->first(['transaction_journals.*']);
- if (!is_null($object)) {
+ if (null !== $object) {
return $object;
}
}
@@ -159,7 +157,6 @@ class TransactionJournal extends Model
}
/**
- *
* @param $value
*
* @return string
@@ -174,7 +171,6 @@ class TransactionJournal extends Model
}
/**
- *
* @param string $name
*
* @return string
@@ -193,14 +189,14 @@ class TransactionJournal extends Model
Log::debug(sprintf('Looking for journal #%d meta field "%s".', $this->id, $name));
$entry = $this->transactionJournalMeta()->where('name', $name)->first();
- if (!is_null($entry)) {
+ if (null !== $entry) {
$value = $entry->data;
// cache:
$cache->store($value);
}
// convert to Carbon if name is _date
- if (!is_null($value) && substr($name, -5) === '_date') {
+ if (null !== $value && '_date' === substr($name, -5)) {
$value = new Carbon($value);
// cache:
$cache->store($value);
@@ -216,7 +212,7 @@ class TransactionJournal extends Model
*/
public function hasMeta(string $name): bool
{
- return !is_null($this->getMeta($name));
+ return null !== $this->getMeta($name);
}
/**
@@ -224,47 +220,44 @@ class TransactionJournal extends Model
*/
public function isDeposit(): bool
{
- if (!is_null($this->transaction_type_type)) {
- return $this->transaction_type_type === TransactionType::DEPOSIT;
+ if (null !== $this->transaction_type_type) {
+ return TransactionType::DEPOSIT === $this->transaction_type_type;
}
return $this->transactionType->isDeposit();
}
/**
- *
* @return bool
*/
public function isOpeningBalance(): bool
{
- if (!is_null($this->transaction_type_type)) {
- return $this->transaction_type_type === TransactionType::OPENING_BALANCE;
+ if (null !== $this->transaction_type_type) {
+ return TransactionType::OPENING_BALANCE === $this->transaction_type_type;
}
return $this->transactionType->isOpeningBalance();
}
/**
- *
* @return bool
*/
public function isTransfer(): bool
{
- if (!is_null($this->transaction_type_type)) {
- return $this->transaction_type_type === TransactionType::TRANSFER;
+ if (null !== $this->transaction_type_type) {
+ return TransactionType::TRANSFER === $this->transaction_type_type;
}
return $this->transactionType->isTransfer();
}
/**
- *
* @return bool
*/
public function isWithdrawal(): bool
{
- if (!is_null($this->transaction_type_type)) {
- return $this->transaction_type_type === TransactionType::WITHDRAWAL;
+ if (null !== $this->transaction_type_type) {
+ return TransactionType::WITHDRAWAL === $this->transaction_type_type;
}
return $this->transactionType->isWithdrawal();
@@ -289,7 +282,7 @@ class TransactionJournal extends Model
/**
* Save the model to the database.
*
- * @param array $options
+ * @param array $options
*
* @return bool
*/
@@ -302,7 +295,6 @@ class TransactionJournal extends Model
}
/**
- *
* @param EloquentBuilder $query
* @param Carbon $date
*
@@ -314,7 +306,6 @@ class TransactionJournal extends Model
}
/**
- *
* @param EloquentBuilder $query
* @param Carbon $date
*
@@ -333,17 +324,14 @@ class TransactionJournal extends Model
$query->orderBy('transaction_journals.date', 'DESC');
$query->orderBy('transaction_journals.order', 'ASC');
$query->orderBy('transaction_journals.id', 'DESC');
-
}
/**
- *
* @param EloquentBuilder $query
* @param array $types
*/
public function scopeTransactionTypes(EloquentBuilder $query, array $types)
{
-
if (!self::isJoined($query, 'transaction_types')) {
$query->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id');
}
@@ -353,7 +341,6 @@ class TransactionJournal extends Model
}
/**
- *
* @param $value
*/
public function setDescriptionAttribute($value)
@@ -371,12 +358,14 @@ class TransactionJournal extends Model
*/
public function setMeta(string $name, $value): TransactionJournalMeta
{
- if (is_null($value)) {
+ if (null === $value) {
$this->deleteMeta($name);
return new TransactionJournalMeta();
}
- if (is_string($value) && strlen($value) === 0) {
+ if (is_string($value) && 0 === strlen($value)) {
+ $this->deleteMeta($name);
+
return new TransactionJournalMeta();
}
@@ -386,7 +375,7 @@ class TransactionJournal extends Model
Log::debug(sprintf('Going to set "%s" with value "%s"', $name, json_encode($value)));
$entry = $this->transactionJournalMeta()->where('name', $name)->first();
- if (is_null($entry)) {
+ if (null === $entry) {
$entry = new TransactionJournalMeta();
$entry->transactionJournal()->associate($this);
$entry->name = $name;
@@ -453,5 +442,4 @@ class TransactionJournal extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/TransactionJournalLink.php b/app/Models/TransactionJournalLink.php
index 1289e82b3a..c3a001f556 100644
--- a/app/Models/TransactionJournalLink.php
+++ b/app/Models/TransactionJournalLink.php
@@ -18,21 +18,17 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
-
use Crypt;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class TransactionJournalLink
- *
- * @package FireflyIII\Models
+ * Class TransactionJournalLink.
*/
class TransactionJournalLink extends Model
{
@@ -42,6 +38,7 @@ class TransactionJournalLink extends Model
* @param $value
*
* @return mixed
+ *
* @throws NotFoundHttpException
*/
public static function routeBinder($value)
@@ -53,7 +50,7 @@ class TransactionJournalLink extends Model
->where('t_a.user_id', auth()->user()->id)
->where('t_b.user_id', auth()->user()->id)
->first(['journal_links.*']);
- if (!is_null($model)) {
+ if (null !== $model) {
return $model;
}
}
@@ -75,7 +72,7 @@ class TransactionJournalLink extends Model
*/
public function getCommentAttribute($value): ?string
{
- if (!is_null($value)) {
+ if (null !== $value) {
return Crypt::decrypt($value);
}
@@ -91,12 +88,11 @@ class TransactionJournalLink extends Model
}
/**
- *
* @param $value
*/
public function setCommentAttribute($value): void
{
- if (!is_null($value) && strlen($value) > 0) {
+ if (null !== $value && strlen($value) > 0) {
$this->attributes['comment'] = Crypt::encrypt($value);
return;
@@ -111,6 +107,4 @@ class TransactionJournalLink extends Model
{
return $this->belongsTo(TransactionJournal::class, 'source_id');
}
-
-
}
diff --git a/app/Models/TransactionJournalMeta.php b/app/Models/TransactionJournalMeta.php
index 11a23eff31..8a93df7870 100644
--- a/app/Models/TransactionJournalMeta.php
+++ b/app/Models/TransactionJournalMeta.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -28,13 +27,10 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
- * Class TransactionJournalMeta
- *
- * @package FireflyIII\Models
+ * Class TransactionJournalMeta.
*/
class TransactionJournalMeta extends Model
{
-
use SoftDeletes;
/**
* The attributes that should be casted to native types.
@@ -42,14 +38,15 @@ class TransactionJournalMeta extends Model
* @var array
*/
protected $casts
- = [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ = [
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
];
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
+ /** @var array */
protected $fillable = ['transaction_journal_id', 'name', 'data', 'hash'];
- protected $table = 'journal_meta';
+ /** @var string */
+ protected $table = 'journal_meta';
/**
* @param $value
@@ -72,7 +69,6 @@ class TransactionJournalMeta extends Model
}
/**
- *
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function transactionJournal(): BelongsTo
diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.php
index a7ebd80beb..f8c5274226 100644
--- a/app/Models/TransactionType.php
+++ b/app/Models/TransactionType.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Models;
@@ -28,9 +27,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class TransactionType
- *
- * @package FireflyIII\Models
+ * Class TransactionType.
*/
class TransactionType extends Model
{
@@ -40,7 +37,7 @@ class TransactionType extends Model
const DEPOSIT = 'Deposit';
const TRANSFER = 'Transfer';
const OPENING_BALANCE = 'Opening balance';
-
+ const RECONCILIATION = 'Reconciliation';
/**
* The attributes that should be casted to native types.
*
@@ -48,12 +45,12 @@ class TransactionType extends Model
*/
protected $casts
= [
- 'created_at' => 'date',
- 'updated_at' => 'date',
- 'deleted_at' => 'date',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
];
-
- protected $dates = ['created_at', 'updated_at', 'deleted_at'];
+ /** @var array */
+ protected $fillable = ['type'];
/**
* @param string $type
@@ -63,23 +60,21 @@ class TransactionType extends Model
public static function routeBinder(string $type)
{
if (!auth()->check()) {
- throw new NotFoundHttpException;
+ throw new NotFoundHttpException();
}
$transactionType = self::where('type', ucfirst($type))->first();
- if (!is_null($transactionType)) {
+ if (null !== $transactionType) {
return $transactionType;
}
- throw new NotFoundHttpException;
-
+ throw new NotFoundHttpException();
}
-
/**
* @return bool
*/
public function isDeposit()
{
- return $this->type === self::DEPOSIT;
+ return self::DEPOSIT === $this->type;
}
/**
@@ -87,7 +82,7 @@ class TransactionType extends Model
*/
public function isOpeningBalance()
{
- return $this->type === self::OPENING_BALANCE;
+ return self::OPENING_BALANCE === $this->type;
}
/**
@@ -95,7 +90,7 @@ class TransactionType extends Model
*/
public function isTransfer()
{
- return $this->type === self::TRANSFER;
+ return self::TRANSFER === $this->type;
}
/**
@@ -103,11 +98,10 @@ class TransactionType extends Model
*/
public function isWithdrawal()
{
- return $this->type === self::WITHDRAWAL;
+ return self::WITHDRAWAL === $this->type;
}
/**
- *
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function transactionJournals()
diff --git a/app/Providers/AccountServiceProvider.php b/app/Providers/AccountServiceProvider.php
index 946dc65fd3..7f041d1902 100644
--- a/app/Providers/AccountServiceProvider.php
+++ b/app/Providers/AccountServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\Account\AccountRepository;
@@ -32,26 +30,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class AccountServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class AccountServiceProvider.
*/
class AccountServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
@@ -60,7 +51,7 @@ class AccountServiceProvider extends ServiceProvider
}
/**
- *
+ * Register account repository
*/
private function registerRepository()
{
@@ -80,7 +71,7 @@ class AccountServiceProvider extends ServiceProvider
}
/**
- *
+ * Register the tasker.
*/
private function registerTasker()
{
diff --git a/app/Providers/AdminServiceProvider.php b/app/Providers/AdminServiceProvider.php
index 8bfc96491d..81a71c9765 100644
--- a/app/Providers/AdminServiceProvider.php
+++ b/app/Providers/AdminServiceProvider.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Providers;
@@ -28,24 +27,20 @@ use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-
+/**
+ * Class AdminServiceProvider
+ */
class AdminServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
-
-
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
@@ -53,7 +48,7 @@ class AdminServiceProvider extends ServiceProvider
}
/**
- *
+ * Register link type repository
*/
private function linkType()
{
@@ -70,5 +65,4 @@ class AdminServiceProvider extends ServiceProvider
}
);
}
-
}
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index 7d8752abe6..a0af9c7ee7 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Providers;
@@ -27,16 +26,12 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
/**
- * Class AppServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class AppServiceProvider.
*/
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
- *
- * @return void
*/
public function boot()
{
@@ -45,8 +40,6 @@ class AppServiceProvider extends ServiceProvider
/**
* Register any application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/AttachmentServiceProvider.php b/app/Providers/AttachmentServiceProvider.php
index a00ae75d42..4725f7cb0d 100644
--- a/app/Providers/AttachmentServiceProvider.php
+++ b/app/Providers/AttachmentServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\Attachment\AttachmentRepository;
@@ -30,26 +28,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class AttachmentServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class AttachmentServiceProvider.
*/
class AttachmentServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php
index d03e8bc6de..b70d194202 100644
--- a/app/Providers/AuthServiceProvider.php
+++ b/app/Providers/AuthServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
/**
* AuthServiceProvider.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
@@ -35,6 +33,9 @@ namespace FireflyIII\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
+/**
+ * Class AuthServiceProvider
+ */
class AuthServiceProvider extends ServiceProvider
{
/**
@@ -49,13 +50,9 @@ class AuthServiceProvider extends ServiceProvider
/**
* Register any authentication / authorization services.
- *
- * @return void
*/
public function boot()
{
$this->registerPolicies();
-
- //
}
}
diff --git a/app/Providers/BillServiceProvider.php b/app/Providers/BillServiceProvider.php
index dea438c324..f0377d8ca8 100644
--- a/app/Providers/BillServiceProvider.php
+++ b/app/Providers/BillServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\Bill\BillRepository;
@@ -30,26 +28,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class BillServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class BillServiceProvider.
*/
class BillServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php
index 64725f48ae..0d6648fe02 100644
--- a/app/Providers/BroadcastServiceProvider.php
+++ b/app/Providers/BroadcastServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
/**
* BroadcastServiceProvider.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
@@ -36,12 +34,13 @@ namespace FireflyIII\Providers;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
+/**
+ * Class BroadcastServiceProvider
+ */
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
- *
- * @return void
*/
public function boot()
{
diff --git a/app/Providers/BudgetServiceProvider.php b/app/Providers/BudgetServiceProvider.php
index 2818cc89e7..49fd527457 100644
--- a/app/Providers/BudgetServiceProvider.php
+++ b/app/Providers/BudgetServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\Budget\BudgetRepository;
@@ -30,26 +28,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class BudgetServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class BudgetServiceProvider.
*/
class BudgetServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/CategoryServiceProvider.php b/app/Providers/CategoryServiceProvider.php
index b945f3dd56..2be853ccf0 100644
--- a/app/Providers/CategoryServiceProvider.php
+++ b/app/Providers/CategoryServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\Category\CategoryRepository;
@@ -30,26 +28,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class CategoryServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class CategoryServiceProvider.
*/
class CategoryServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
@@ -65,6 +56,5 @@ class CategoryServiceProvider extends ServiceProvider
return $repository;
}
);
-
}
}
diff --git a/app/Providers/CurrencyServiceProvider.php b/app/Providers/CurrencyServiceProvider.php
index 2f63de16b5..76a41f6f98 100644
--- a/app/Providers/CurrencyServiceProvider.php
+++ b/app/Providers/CurrencyServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\Currency\CurrencyRepository;
@@ -30,26 +28,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class CurrencyServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class CurrencyServiceProvider.
*/
class CurrencyServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
@@ -66,5 +57,4 @@ class CurrencyServiceProvider extends ServiceProvider
}
);
}
-
}
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
index 110ba077af..3f415111e2 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Providers;
@@ -33,9 +32,7 @@ use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvi
use Log;
/**
- * Class EventServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class EventServiceProvider.
*/
class EventServiceProvider extends ServiceProvider
{
@@ -47,11 +44,10 @@ class EventServiceProvider extends ServiceProvider
protected $listen
= [
// is a User related event.
- 'FireflyIII\Events\RegisteredUser' =>
- [
- 'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationMail',
- 'FireflyIII\Handlers\Events\UserEventHandler@attachUserRole',
- ],
+ 'FireflyIII\Events\RegisteredUser' => [
+ 'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationMail',
+ 'FireflyIII\Handlers\Events\UserEventHandler@attachUserRole',
+ ],
// is a User related event.
'FireflyIII\Events\RequestedNewPassword' => [
'FireflyIII\Handlers\Events\UserEventHandler@sendNewPassword',
@@ -66,25 +62,20 @@ class EventServiceProvider extends ServiceProvider
'FireflyIII\Handlers\Events\AdminEventHandler@sendTestMessage',
],
// is a Transaction Journal related event.
- 'FireflyIII\Events\StoredTransactionJournal' =>
- [
- 'FireflyIII\Handlers\Events\StoredJournalEventHandler@scanBills',
- 'FireflyIII\Handlers\Events\StoredJournalEventHandler@connectToPiggyBank',
- 'FireflyIII\Handlers\Events\StoredJournalEventHandler@processRules',
- ],
+ 'FireflyIII\Events\StoredTransactionJournal' => [
+ 'FireflyIII\Handlers\Events\StoredJournalEventHandler@scanBills',
+ 'FireflyIII\Handlers\Events\StoredJournalEventHandler@connectToPiggyBank',
+ 'FireflyIII\Handlers\Events\StoredJournalEventHandler@processRules',
+ ],
// is a Transaction Journal related event.
- 'FireflyIII\Events\UpdatedTransactionJournal' =>
- [
- 'FireflyIII\Handlers\Events\UpdatedJournalEventHandler@scanBills',
- 'FireflyIII\Handlers\Events\UpdatedJournalEventHandler@processRules',
- ],
-
+ 'FireflyIII\Events\UpdatedTransactionJournal' => [
+ 'FireflyIII\Handlers\Events\UpdatedJournalEventHandler@scanBills',
+ 'FireflyIII\Handlers\Events\UpdatedJournalEventHandler@processRules',
+ ],
];
/**
* Register any events for your application.
- *
- * @return void
*/
public function boot()
{
@@ -98,15 +89,14 @@ class EventServiceProvider extends ServiceProvider
*/
protected function registerCreateEvents()
{
-
// move this routine to a filter
// in case of repeated piggy banks and/or other problems.
PiggyBank::created(
function (PiggyBank $piggyBank) {
$repetition = new PiggyBankRepetition;
$repetition->piggyBank()->associate($piggyBank);
- $repetition->startdate = is_null($piggyBank->startdate) ? null : $piggyBank->startdate;
- $repetition->targetdate = is_null($piggyBank->targetdate) ? null : $piggyBank->targetdate;
+ $repetition->startdate = null === $piggyBank->startdate ? null : $piggyBank->startdate;
+ $repetition->targetdate = null === $piggyBank->targetdate ? null : $piggyBank->targetdate;
$repetition->currentamount = 0;
$repetition->save();
}
@@ -125,7 +115,7 @@ class EventServiceProvider extends ServiceProvider
foreach ($account->transactions()->get() as $transaction) {
Log::debug('Now at transaction #' . $transaction->id);
$journal = $transaction->transactionJournal()->first();
- if (!is_null($journal)) {
+ if (null !== $journal) {
Log::debug('Call for deletion of journal #' . $journal->id);
$journal->delete();
}
@@ -152,7 +142,5 @@ class EventServiceProvider extends ServiceProvider
}
}
);
-
}
-
}
diff --git a/app/Providers/ExportJobServiceProvider.php b/app/Providers/ExportJobServiceProvider.php
index c7f6b38a6d..143d8daf07 100644
--- a/app/Providers/ExportJobServiceProvider.php
+++ b/app/Providers/ExportJobServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\ExportJob\ExportJobRepository;
@@ -31,29 +29,20 @@ use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-
/**
- * Class ExportJobServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class ExportJobServiceProvider.
*/
class ExportJobServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
-
-
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/FireflyServiceProvider.php b/app/Providers/FireflyServiceProvider.php
index d43a129fa0..398c45bd4a 100644
--- a/app/Providers/FireflyServiceProvider.php
+++ b/app/Providers/FireflyServiceProvider.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Providers;
@@ -56,6 +55,8 @@ use FireflyIII\Support\Steam;
use FireflyIII\Support\Twig\AmountFormat;
use FireflyIII\Support\Twig\General;
use FireflyIII\Support\Twig\Journal;
+use FireflyIII\Support\Twig\Loader\TransactionJournalLoader;
+use FireflyIII\Support\Twig\Loader\TransactionLoader;
use FireflyIII\Support\Twig\PiggyBank;
use FireflyIII\Support\Twig\Rule;
use FireflyIII\Support\Twig\Transaction;
@@ -68,9 +69,7 @@ use TwigBridge\Extension\Loader\Functions;
use Validator;
/**
- * Class FireflyServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class FireflyServiceProvider.
*/
class FireflyServiceProvider extends ServiceProvider
{
@@ -83,6 +82,8 @@ class FireflyServiceProvider extends ServiceProvider
);
$config = app('config');
Twig::addExtension(new Functions($config));
+ Twig::addRuntimeLoader(new TransactionLoader);
+ Twig::addRuntimeLoader(new TransactionJournalLoader);
Twig::addExtension(new PiggyBank);
Twig::addExtension(new General);
Twig::addExtension(new Journal);
@@ -98,36 +99,42 @@ class FireflyServiceProvider extends ServiceProvider
public function register()
{
$this->app->bind(
- 'preferences', function () {
- return new Preferences;
- }
+ 'preferences',
+ function () {
+ return new Preferences;
+ }
);
$this->app->bind(
- 'fireflyconfig', function () {
- return new FireflyConfig;
- }
+ 'fireflyconfig',
+ function () {
+ return new FireflyConfig;
+ }
);
$this->app->bind(
- 'navigation', function () {
- return new Navigation;
- }
+ 'navigation',
+ function () {
+ return new Navigation;
+ }
);
$this->app->bind(
- 'amount', function () {
- return new Amount;
- }
+ 'amount',
+ function () {
+ return new Amount;
+ }
);
$this->app->bind(
- 'steam', function () {
- return new Steam;
- }
+ 'steam',
+ function () {
+ return new Steam;
+ }
);
$this->app->bind(
- 'expandedform', function () {
- return new ExpandedForm;
- }
+ 'expandedform',
+ function () {
+ return new ExpandedForm;
+ }
);
// chart generator:
@@ -164,5 +171,4 @@ class FireflyServiceProvider extends ServiceProvider
// password verifier thing
$this->app->bind(Verifier::class, PwndVerifier::class);
}
-
}
diff --git a/app/Providers/FireflySessionProvider.php b/app/Providers/FireflySessionProvider.php
index 4eb91f74a5..9bae19be71 100644
--- a/app/Providers/FireflySessionProvider.php
+++ b/app/Providers/FireflySessionProvider.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Providers;
@@ -27,12 +26,13 @@ use FireflyIII\Http\Middleware\StartFireflySession;
use Illuminate\Session\SessionManager;
use Illuminate\Support\ServiceProvider;
+/**
+ * Class FireflySessionProvider
+ */
class FireflySessionProvider extends ServiceProvider
{
/**
* Register the service provider.
- *
- * @return void
*/
public function register()
{
@@ -45,32 +45,30 @@ class FireflySessionProvider extends ServiceProvider
/**
* Register the session driver instance.
- *
- * @return void
*/
protected function registerSessionDriver()
{
$this->app->singleton(
- 'session.store', function ($app) {
- // First, we will create the session manager which is responsible for the
- // creation of the various session drivers when they are needed by the
- // application instance, and will resolve them on a lazy load basis.
- return $app->make('session')->driver();
- }
+ 'session.store',
+ function ($app) {
+ // First, we will create the session manager which is responsible for the
+ // creation of the various session drivers when they are needed by the
+ // application instance, and will resolve them on a lazy load basis.
+ return $app->make('session')->driver();
+ }
);
}
/**
* Register the session manager instance.
- *
- * @return void
*/
protected function registerSessionManager()
{
$this->app->singleton(
- 'session', function ($app) {
- return new SessionManager($app);
- }
+ 'session',
+ function ($app) {
+ return new SessionManager($app);
+ }
);
}
}
diff --git a/app/Providers/JournalServiceProvider.php b/app/Providers/JournalServiceProvider.php
index 262b3b56de..069b882f16 100644
--- a/app/Providers/JournalServiceProvider.php
+++ b/app/Providers/JournalServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Helpers\Collector\JournalCollector;
@@ -34,26 +32,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class JournalServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class JournalServiceProvider.
*/
class JournalServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
@@ -63,7 +54,7 @@ class JournalServiceProvider extends ServiceProvider
}
/**
- *
+ * Register the collector.
*/
private function registerCollector()
{
@@ -76,14 +67,13 @@ class JournalServiceProvider extends ServiceProvider
$collector->setUser(auth()->user());
}
-
return $collector;
}
);
}
/**
- *
+ * Register repository.
*/
private function registerRepository()
{
@@ -93,7 +83,6 @@ class JournalServiceProvider extends ServiceProvider
/** @var JournalRepositoryInterface $repository */
$repository = app(JournalRepository::class);
if ($app->auth->check()) {
-
$repository->setUser(auth()->user());
}
@@ -103,7 +92,7 @@ class JournalServiceProvider extends ServiceProvider
}
/**
- *
+ * Register the tasker.
*/
private function registerTasker()
{
@@ -121,5 +110,4 @@ class JournalServiceProvider extends ServiceProvider
}
);
}
-
}
diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php
index 63243e409f..bdfb6cc6bb 100644
--- a/app/Providers/LogServiceProvider.php
+++ b/app/Providers/LogServiceProvider.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Providers;
@@ -27,23 +26,20 @@ use Illuminate\Log\LogServiceProvider as LaravelLogServiceProvider;
use Illuminate\Log\Writer;
/**
- * Class LogServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class LogServiceProvider.
*/
class LogServiceProvider extends LaravelLogServiceProvider
{
/**
* Configure the Monolog handlers for the application.
*
- * @param \Illuminate\Log\Writer $log
- *
- * @return void
+ * @param \Illuminate\Log\Writer $log
*/
protected function configureDailyHandler(Writer $log)
{
$log->useDailyFiles(
- $this->app->storagePath() . '/logs/firefly-iii.log', $this->maxFiles(),
+ $this->app->storagePath() . '/logs/firefly-iii.log',
+ $this->maxFiles(),
$this->logLevel()
);
}
@@ -51,9 +47,7 @@ class LogServiceProvider extends LaravelLogServiceProvider
/**
* Configure the Monolog handlers for the application.
*
- * @param \Illuminate\Log\Writer $log
- *
- * @return void
+ * @param \Illuminate\Log\Writer $log
*/
protected function configureSingleHandler(Writer $log)
{
diff --git a/app/Providers/PiggyBankServiceProvider.php b/app/Providers/PiggyBankServiceProvider.php
index 94dbe53dc8..2655f5b522 100644
--- a/app/Providers/PiggyBankServiceProvider.php
+++ b/app/Providers/PiggyBankServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\PiggyBank\PiggyBankRepository;
@@ -29,28 +27,20 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-
/**
- * Class PiggyBankServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class PiggyBankServiceProvider.
*/
class PiggyBankServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
index a12f9ef45e..1be7d7c064 100644
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
/**
* RouteServiceProvider.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
@@ -49,36 +47,26 @@ class RouteServiceProvider extends ServiceProvider
/**
* Define your route model bindings, pattern filters, etc.
- *
- * @return void
*/
public function boot()
{
- //
-
parent::boot();
}
/**
* Define the routes for the application.
- *
- * @return void
*/
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
-
- //
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
- *
- * @return void
*/
protected function mapApiRoutes()
{
@@ -92,8 +80,6 @@ class RouteServiceProvider extends ServiceProvider
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
- *
- * @return void
*/
protected function mapWebRoutes()
{
diff --git a/app/Providers/RuleGroupServiceProvider.php b/app/Providers/RuleGroupServiceProvider.php
index 6a72412a5f..07c9ee2e0a 100644
--- a/app/Providers/RuleGroupServiceProvider.php
+++ b/app/Providers/RuleGroupServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\RuleGroup\RuleGroupRepository;
@@ -29,28 +27,20 @@ use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-
/**
- * Class RuleGroupServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class RuleGroupServiceProvider.
*/
class RuleGroupServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/RuleServiceProvider.php b/app/Providers/RuleServiceProvider.php
index 1af440b191..bf49190da9 100644
--- a/app/Providers/RuleServiceProvider.php
+++ b/app/Providers/RuleServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\Rule\RuleRepository;
@@ -30,26 +28,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class RuleServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class RuleServiceProvider.
*/
class RuleServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/SearchServiceProvider.php b/app/Providers/SearchServiceProvider.php
index d7fa9c6ec6..97c5072950 100644
--- a/app/Providers/SearchServiceProvider.php
+++ b/app/Providers/SearchServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Support\Search\Search;
@@ -30,26 +28,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class SearchServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class SearchServiceProvider.
*/
class SearchServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Providers/SessionServiceProvider.php b/app/Providers/SessionServiceProvider.php
index b465661dca..7143eafff9 100644
--- a/app/Providers/SessionServiceProvider.php
+++ b/app/Providers/SessionServiceProvider.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Providers;
@@ -27,16 +26,12 @@ use FireflyIII\Http\Middleware\StartFireflySession;
use Illuminate\Session\SessionServiceProvider as BaseSessionServiceProvider;
/**
- * Class SessionServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class SessionServiceProvider.
*/
class SessionServiceProvider extends BaseSessionServiceProvider
{
/**
* Register the service provider.
- *
- * @return void
*/
public function register()
{
@@ -46,4 +41,4 @@ class SessionServiceProvider extends BaseSessionServiceProvider
$this->app->singleton(StartFireflySession::class);
}
-}
\ No newline at end of file
+}
diff --git a/app/Providers/TagServiceProvider.php b/app/Providers/TagServiceProvider.php
index aac1d9c1f8..acbf9e18cd 100644
--- a/app/Providers/TagServiceProvider.php
+++ b/app/Providers/TagServiceProvider.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Providers;
use FireflyIII\Repositories\Tag\TagRepository;
@@ -30,26 +28,19 @@ use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
/**
- * Class TagServiceProvider
- *
- * @package FireflyIII\Providers
+ * Class TagServiceProvider.
*/
class TagServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
- *
- * @return void
*/
public function boot()
{
- //
}
/**
* Register the application services.
- *
- * @return void
*/
public function register()
{
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index 7926b18778..cb4b8f87fc 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII\Repositories\Account;
use Carbon\Carbon;
@@ -30,31 +28,31 @@ use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountMeta;
use FireflyIII\Models\AccountType;
+use FireflyIII\Models\Category;
+use FireflyIII\Models\Tag;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
+use FireflyIII\Repositories\Tag\TagRepositoryInterface;
use FireflyIII\User;
use Log;
use Validator;
-
/**
- *
- * Class AccountRepository
- *
- * @package FireflyIII\Repositories\Account
+ * Class AccountRepository.
*/
class AccountRepository implements AccountRepositoryInterface
{
- use FindAccountsTrait;
/** @var User */
private $user;
+
+ use FindAccountsTrait;
/** @var array */
private $validFields = ['accountRole', 'ccMonthlyPaymentDate', 'ccType', 'accountNumber', 'currency_id', 'BIC'];
/**
- * Moved here from account CRUD
+ * Moved here from account CRUD.
*
* @param array $types
*
@@ -77,10 +75,10 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function destroy(Account $account, Account $moveTo): bool
{
- if (!is_null($moveTo->id)) {
+ if (null !== $moveTo->id) {
DB::table('transactions')->where('account_id', $account->id)->update(['account_id' => $moveTo->id]);
}
- if (!is_null($account)) {
+ if (null !== $account) {
$account->delete();
}
@@ -103,7 +101,7 @@ class AccountRepository implements AccountRepositoryInterface
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->first(['transaction_journals.date']);
- if (!is_null($date)) {
+ if (null !== $date) {
$last = new Carbon($date->date);
}
@@ -126,7 +124,7 @@ class AccountRepository implements AccountRepositoryInterface
->where('transaction_journals.user_id', $this->user->id)
->orderBy('transaction_journals.id', 'ASC')
->first(['transaction_journals.id']);
- if (!is_null($first)) {
+ if (null !== $first) {
return TransactionJournal::find(intval($first->id));
}
@@ -143,7 +141,7 @@ class AccountRepository implements AccountRepositoryInterface
public function oldestJournalDate(Account $account): Carbon
{
$journal = $this->oldestJournal($account);
- if (is_null($journal->id)) {
+ if (null === $journal->id) {
return new Carbon;
}
@@ -176,7 +174,6 @@ class AccountRepository implements AccountRepositoryInterface
$this->deleteInitialBalance($newAccount);
return $newAccount;
-
}
/**
@@ -202,16 +199,52 @@ class AccountRepository implements AccountRepositoryInterface
return $account;
}
+ /**
+ * @param TransactionJournal $journal
+ * @param array $data
+ *
+ * @return TransactionJournal
+ */
+ public function updateReconciliation(TransactionJournal $journal, array $data): TransactionJournal
+ {
+ // update journal
+ // update actual journal:
+ $data['amount'] = strval($data['amount']);
+
+ // unlink all categories, recreate them:
+ $journal->categories()->detach();
+
+ $this->storeCategoryWithJournal($journal, strval($data['category']));
+
+ // update amounts
+ /** @var Transaction $transaction */
+ foreach ($journal->transactions as $transaction) {
+ $transaction->amount = bcmul($data['amount'], '-1');
+ if ($transaction->account->accountType->type === AccountType::ASSET) {
+ $transaction->amount = $data['amount'];
+ }
+ $transaction->save();
+ }
+
+ $journal->save();
+
+ // update tags:
+ if (isset($data['tags']) && is_array($data['tags'])) {
+ $this->updateTags($journal, $data['tags']);
+ }
+
+ return $journal;
+ }
+
/**
* @param Account $account
*/
protected function deleteInitialBalance(Account $account)
{
$journal = $this->openingBalanceTransaction($account);
- if (!is_null($journal->id)) {
+ if (null !== $journal->id) {
$journal->delete();
}
-
}
/**
@@ -225,7 +258,7 @@ class AccountRepository implements AccountRepositoryInterface
->where('transactions.account_id', $account->id)
->transactionTypes([TransactionType::OPENING_BALANCE])
->first(['transaction_journals.*']);
- if (is_null($journal)) {
+ if (null === $journal) {
Log::debug('Could not find a opening balance journal, return empty one.');
return new TransactionJournal;
@@ -239,6 +272,7 @@ class AccountRepository implements AccountRepositoryInterface
* @param array $data
*
* @return Account
+ *
* @throws FireflyException
*/
protected function storeAccount(array $data): Account
@@ -248,13 +282,13 @@ class AccountRepository implements AccountRepositoryInterface
$accountType = AccountType::whereType($type)->first();
$data['iban'] = $this->filterIban($data['iban']);
// verify account type
- if (is_null($accountType)) {
+ if (null === $accountType) {
throw new FireflyException(sprintf('Account type "%s" is invalid. Cannot create account.', $data['accountType']));
}
// account may exist already:
$existingAccount = $this->findByName($data['name'], [$type]);
- if (!is_null($existingAccount->id)) {
+ if (null !== $existingAccount->id) {
Log::warning(sprintf('There already is an account named "%s" of type "%s".', $data['name'], $type));
return $existingAccount;
@@ -267,25 +301,37 @@ class AccountRepository implements AccountRepositoryInterface
'account_type_id' => $accountType->id,
'name' => $data['name'],
'virtual_balance' => $data['virtualBalance'],
- 'active' => $data['active'] === true ? true : false,
+ 'active' => true === $data['active'] ? true : false,
'iban' => $data['iban'],
];
$newAccount = new Account($databaseData);
Log::debug('Final account creation dataset', $databaseData);
$newAccount->save();
// verify its creation:
- if (is_null($newAccount->id)) {
+ if (null === $newAccount->id) {
Log::error(
- sprintf('Could not create account "%s" (%d error(s))', $data['name'], $newAccount->getErrors()->count()), $newAccount->getErrors()->toArray()
+ sprintf('Could not create account "%s" (%d error(s))', $data['name'], $newAccount->getErrors()->count()),
+ $newAccount->getErrors()->toArray()
);
throw new FireflyException(sprintf('Tried to create account named "%s" but failed. The logs have more details.', $data['name']));
-
}
Log::debug(sprintf('Created new account #%d named "%s" of type %s.', $newAccount->id, $newAccount->name, $accountType->type));
return $newAccount;
}
+ /**
+ * @param TransactionJournal $journal
+ * @param string $category
+ */
+ protected function storeCategoryWithJournal(TransactionJournal $journal, string $category)
+ {
+ if (strlen($category) > 0) {
+ $category = Category::firstOrCreateEncrypted(['name' => $category, 'user_id' => $journal->user_id]);
+ $journal->categories()->save($category);
+ }
+ }
+
/**
* At this point strlen of amount > 0.
*
@@ -297,9 +343,9 @@ class AccountRepository implements AccountRepositoryInterface
protected function storeInitialBalance(Account $account, array $data): TransactionJournal
{
$amount = strval($data['openingBalance']);
- Log::debug(sprintf('Submitted amount is %s',$amount));
+ Log::debug(sprintf('Submitted amount is %s', $amount));
- if (bccomp($amount, '0') === 0) {
+ if (0 === bccomp($amount, '0')) {
return new TransactionJournal;
}
@@ -326,7 +372,7 @@ class AccountRepository implements AccountRepositoryInterface
$secondAmount = bcmul($amount, '-1');
Log::debug(sprintf('First amount is %s, second amount is %s', $firstAmount, $secondAmount));
- if (bccomp($amount,'0') === -1) {
+ if (bccomp($amount, '0') === -1) {
Log::debug(sprintf('%s is a negative number.', $amount));
$firstAccount = $opposing;
$secondAccount = $account;
@@ -343,7 +389,7 @@ class AccountRepository implements AccountRepositoryInterface
'transaction_currency_id' => $currencyId,
]
);
- $one->save();// first transaction: from
+ $one->save(); // first transaction: from
$two = new Transaction(
[
@@ -379,7 +425,6 @@ class AccountRepository implements AccountRepositoryInterface
}
/**
- *
* @param Account $account
* @param array $data
*
@@ -391,14 +436,14 @@ class AccountRepository implements AccountRepositoryInterface
$openingBalance = $this->openingBalanceTransaction($account);
// no opening balance journal? create it:
- if (is_null($openingBalance->id)) {
+ if (null === $openingBalance->id) {
Log::debug('No opening balance journal yet, create journal.');
$this->storeInitialBalance($account, $data);
return true;
}
// opening balance data? update it!
- if (!is_null($openingBalance->id)) {
+ if (null !== $openingBalance->id) {
Log::debug('Opening balance journal found, update journal.');
$this->updateOpeningBalanceJournal($account, $openingBalance, $data);
@@ -411,7 +456,6 @@ class AccountRepository implements AccountRepositoryInterface
/**
* @param Account $account
* @param array $data
- *
*/
protected function updateMetadata(Account $account, array $data)
{
@@ -420,11 +464,14 @@ class AccountRepository implements AccountRepositoryInterface
$entry = $account->accountMeta()->where('name', $field)->first();
// if $data has field and $entry is null, create new one:
- if (isset($data[$field]) && is_null($entry)) {
+ if (isset($data[$field]) && null === $entry) {
Log::debug(
sprintf(
'Created meta-field "%s":"%s" for account #%d ("%s") ',
- $field, $data[$field], $account->id, $account->name
+ $field,
+ $data[$field],
+ $account->id,
+ $account->name
)
);
AccountMeta::create(
@@ -437,18 +484,20 @@ class AccountRepository implements AccountRepositoryInterface
}
// if $data has field and $entry is not null, update $entry:
- if (isset($data[$field]) && !is_null($entry)) {
+ if (isset($data[$field]) && null !== $entry) {
$entry->data = $data[$field];
$entry->save();
Log::debug(
sprintf(
'Updated meta-field "%s":"%s" for account #%d ("%s") ',
- $field, $data[$field], $account->id, $account->name
+ $field,
+ $data[$field],
+ $account->id,
+ $account->name
)
);
}
}
-
}
/**
@@ -466,7 +515,7 @@ class AccountRepository implements AccountRepositoryInterface
Log::debug(sprintf('Submitted amount for opening balance to update is %s', $amount));
- if (bccomp($amount, '0') === 0) {
+ if (0 === bccomp($amount, '0')) {
$journal->delete();
return true;
@@ -496,9 +545,49 @@ class AccountRepository implements AccountRepositoryInterface
Log::debug('Updated opening balance journal.');
return true;
-
}
+ /**
+ * @param TransactionJournal $journal
+ * @param array $array
+ *
+ * @return bool
+ */
+ protected function updateTags(TransactionJournal $journal, array $array): bool
+ {
+ // create tag repository
+ /** @var TagRepositoryInterface $tagRepository */
+ $tagRepository = app(TagRepositoryInterface::class);
+
+ // find or create all tags:
+ $tags = [];
+ $ids = [];
+ foreach ($array as $name) {
+ if (strlen(trim($name)) > 0) {
+ $tag = Tag::firstOrCreateEncrypted(['tag' => $name, 'user_id' => $journal->user_id]);
+ $tags[] = $tag;
+ $ids[] = $tag->id;
+ }
+ }
+
+ // delete all tags connected to journal not in this array:
+ if (count($ids) > 0) {
+ DB::table('tag_transaction_journal')->where('transaction_journal_id', $journal->id)->whereNotIn('tag_id', $ids)->delete();
+ }
+ // if count is zero, delete them all:
+ if (0 === count($ids)) {
+ DB::table('tag_transaction_journal')->where('transaction_journal_id', $journal->id)->delete();
+ }
+
+ // connect each tag to journal (if not yet connected):
+ /** @var Tag $tag */
+ foreach ($tags as $tag) {
+ Log::debug(sprintf('Will try to connect tag #%d to journal #%d.', $tag->id, $journal->id));
+ $tagRepository->connect($journal, $tag);
+ }
+
+ return true;
+ }
/**
* @param array $data
@@ -508,8 +597,8 @@ class AccountRepository implements AccountRepositoryInterface
protected function validOpeningBalanceData(array $data): bool
{
$data['openingBalance'] = strval($data['openingBalance'] ?? '');
- if (isset($data['openingBalance']) && !is_null($data['openingBalance']) && strlen($data['openingBalance']) > 0 &&
- isset($data['openingBalanceDate'])) {
+ if (isset($data['openingBalance']) && null !== $data['openingBalance'] && strlen($data['openingBalance']) > 0
+ && isset($data['openingBalanceDate'])) {
Log::debug('Array has valid opening balance data.');
return true;
@@ -526,7 +615,7 @@ class AccountRepository implements AccountRepositoryInterface
*/
private function filterIban(?string $iban)
{
- if (is_null($iban)) {
+ if (null === $iban) {
return null;
}
$data = ['iban' => $iban];
diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php
index aaaffe11d2..c05fb8243f 100644
--- a/app/Repositories/Account/AccountRepositoryInterface.php
+++ b/app/Repositories/Account/AccountRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Account;
@@ -30,9 +29,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface AccountRepositoryInterface
- *
- * @package FireflyIII\Repositories\Account
+ * Interface AccountRepositoryInterface.
*/
interface AccountRepositoryInterface
{
@@ -113,6 +110,15 @@ interface AccountRepositoryInterface
*/
public function getCashAccount(): Account;
+ /**
+ * Find or create the opposing reconciliation account.
+ *
+ * @param Account $account
+ *
+ * @return Account|null
+ */
+ public function getReconciliation(Account $account): ?Account;
+
/**
* Returns the date of the very last transaction in this account.
*
@@ -160,4 +166,11 @@ interface AccountRepositoryInterface
*/
public function update(Account $account, array $data): Account;
+ /**
+ * @param TransactionJournal $journal
+ * @param array $data
+ *
+ * @return TransactionJournal
+ */
+ public function updateReconciliation(TransactionJournal $journal, array $data): TransactionJournal;
}
diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php
index 292ed3f030..04b5c18f84 100644
--- a/app/Repositories/Account/AccountTasker.php
+++ b/app/Repositories/Account/AccountTasker.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Account;
@@ -33,9 +32,7 @@ use Log;
use Steam;
/**
- * Class AccountTasker
- *
- * @package FireflyIII\Repositories\Account
+ * Class AccountTasker.
*/
class AccountTasker implements AccountTaskerInterface
{
@@ -83,7 +80,7 @@ class AccountTasker implements AccountTaskerInterface
$entry['end_balance'] = $endSet[$account->id] ?? '0';
// first journal exists, and is on start, then this is the actual opening balance:
- if (!is_null($first->id) && $first->date->isSameDay($start)) {
+ if (null !== $first->id && $first->date->isSameDay($start)) {
Log::debug(sprintf('Date of first journal for %s is %s', $account->name, $first->date->format('Y-m-d')));
$entry['start_balance'] = $first->transactions()->where('account_id', $account->id)->first()->amount;
Log::debug(sprintf('Account %s was opened on %s, so opening balance is %f', $account->name, $start->format('Y-m-d'), $entry['start_balance']));
@@ -162,7 +159,7 @@ class AccountTasker implements AccountTaskerInterface
$transactions = $transactions->filter(
function (Transaction $transaction) {
// return positive amounts only.
- if (bccomp($transaction->transaction_amount, '0') === 1) {
+ if (1 === bccomp($transaction->transaction_amount, '0')) {
return $transaction;
}
@@ -213,7 +210,7 @@ class AccountTasker implements AccountTaskerInterface
];
}
$expenses[$opposingId]['sum'] = bcadd($expenses[$opposingId]['sum'], $transaction->transaction_amount);
- $expenses[$opposingId]['count']++;
+ ++$expenses[$opposingId]['count'];
}
// do averages:
$keys = array_keys($expenses);
@@ -223,7 +220,6 @@ class AccountTasker implements AccountTaskerInterface
}
}
-
return $expenses;
}
}
diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php
index a978f1a69e..3e3f022a68 100644
--- a/app/Repositories/Account/AccountTaskerInterface.php
+++ b/app/Repositories/Account/AccountTaskerInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Account;
@@ -28,9 +27,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface AccountTaskerInterface
- *
- * @package FireflyIII\Repositories\Account
+ * Interface AccountTaskerInterface.
*/
interface AccountTaskerInterface
{
@@ -65,5 +62,4 @@ interface AccountTaskerInterface
* @param User $user
*/
public function setUser(User $user);
-
}
diff --git a/app/Repositories/Account/FindAccountsTrait.php b/app/Repositories/Account/FindAccountsTrait.php
index a674a25a12..42ed53b3ce 100644
--- a/app/Repositories/Account/FindAccountsTrait.php
+++ b/app/Repositories/Account/FindAccountsTrait.php
@@ -18,11 +18,11 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Account;
+use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\User;
@@ -34,8 +34,6 @@ use Log;
* @property User $user
*
* Trait FindAccountsTrait
- *
- * @package FireflyIII\Repositories\Account
*/
trait FindAccountsTrait
{
@@ -47,7 +45,7 @@ trait FindAccountsTrait
public function find(int $accountId): Account
{
$account = $this->user->accounts()->find($accountId);
- if (is_null($account)) {
+ if (null === $account) {
return new Account;
}
@@ -120,7 +118,6 @@ trait FindAccountsTrait
if (count($types) > 0) {
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
$query->whereIn('account_types.type', $types);
-
}
Log::debug(sprintf('Searching for account named "%s" (of user #%d) of the following type(s)', $name, $this->user->id), ['types' => $types]);
@@ -226,4 +223,45 @@ trait FindAccountsTrait
return $account;
}
+
+ /**
+ * @param Account $account
+ *
+ * @return Account|null
+ *
+ * @throws FireflyException
+ */
+ public function getReconciliation(Account $account): ?Account
+ {
+ if (AccountType::ASSET !== $account->accountType->type) {
+ throw new FireflyException(sprintf('%s is not an asset account.', $account->name));
+ }
+ $name = $account->name . ' reconciliation';
+ $type = AccountType::where('type', AccountType::RECONCILIATION)->first();
+ $accounts = $this->user->accounts()->where('account_type_id', $type->id)->get();
+ /** @var Account $account */
+ foreach ($accounts as $account) {
+ if ($account->name === $name) {
+ return $account;
+ }
+ }
+ // assume nothing was found. create it!
+ $data = [
+ 'accountType' => 'reconcile',
+ 'name' => $name,
+ 'iban' => null,
+ 'virtualBalance' => null,
+ 'active' => true,
+ ];
+ $account = $this->storeAccount($data);
+
+ return $account;
+ }
+
+ /**
+ * @param array $data
+ *
+ * @return Account
+ */
+ abstract protected function storeAccount(array $data): Account;
}
diff --git a/app/Repositories/Attachment/AttachmentRepository.php b/app/Repositories/Attachment/AttachmentRepository.php
index ee5b8dd6c0..a0e62e508e 100644
--- a/app/Repositories/Attachment/AttachmentRepository.php
+++ b/app/Repositories/Attachment/AttachmentRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Attachment;
@@ -33,9 +32,7 @@ use Log;
use Storage;
/**
- * Class AttachmentRepository
- *
- * @package FireflyIII\Repositories\Attachment
+ * Class AttachmentRepository.
*/
class AttachmentRepository implements AttachmentRepositoryInterface
{
@@ -80,7 +77,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
public function find(int $id): Attachment
{
$attachment = $this->user->attachments()->find($id);
- if (is_null($attachment)) {
+ if (null === $attachment) {
return new Attachment;
}
@@ -95,7 +92,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
public function findWithoutUser(int $id): Attachment
{
$attachment = Attachment::find($id);
- if (is_null($attachment)) {
+ if (null === $attachment) {
return new Attachment;
}
@@ -168,13 +165,11 @@ class AttachmentRepository implements AttachmentRepositoryInterface
*/
public function update(Attachment $attachment, array $data): Attachment
{
-
$attachment->title = $data['title'];
$attachment->description = $data['description'];
$attachment->notes = $data['notes'];
$attachment->save();
return $attachment;
-
}
}
diff --git a/app/Repositories/Attachment/AttachmentRepositoryInterface.php b/app/Repositories/Attachment/AttachmentRepositoryInterface.php
index bfa0c662ad..bf15bbea35 100644
--- a/app/Repositories/Attachment/AttachmentRepositoryInterface.php
+++ b/app/Repositories/Attachment/AttachmentRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Attachment;
@@ -29,13 +28,10 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface AttachmentRepositoryInterface
- *
- * @package FireflyIII\Repositories\Attachment
+ * Interface AttachmentRepositoryInterface.
*/
interface AttachmentRepositoryInterface
{
-
/**
* @param Attachment $attachment
*
@@ -97,4 +93,3 @@ interface AttachmentRepositoryInterface
*/
public function update(Attachment $attachment, array $attachmentData): Attachment;
}
-
diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php
index 44e31d94fc..7b1491908e 100644
--- a/app/Repositories/Bill/BillRepository.php
+++ b/app/Repositories/Bill/BillRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Bill;
@@ -26,6 +25,7 @@ namespace FireflyIII\Repositories\Bill;
use Carbon\Carbon;
use DB;
use FireflyIII\Models\Bill;
+use FireflyIII\Models\Note;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
@@ -37,13 +37,10 @@ use Log;
use Navigation;
/**
- * Class BillRepository
- *
- * @package FireflyIII\Repositories\Bill
+ * Class BillRepository.
*/
class BillRepository implements BillRepositoryInterface
{
-
/** @var User */
private $user;
@@ -69,7 +66,7 @@ class BillRepository implements BillRepositoryInterface
public function find(int $billId): Bill
{
$bill = $this->user->bills()->find($billId);
- if (is_null($bill)) {
+ if (null === $bill) {
$bill = new Bill;
}
@@ -125,7 +122,6 @@ class BillRepository implements BillRepositoryInterface
$set = $set->sortBy(
function (Bill $bill) {
-
$int = $bill->active ? 0 : 1;
return $int . strtolower($bill->name);
@@ -157,18 +153,20 @@ class BillRepository implements BillRepositoryInterface
'bills.automatch',
'bills.active',
'bills.name_encrypted',
- 'bills.match_encrypted'];
+ 'bills.match_encrypted',];
$ids = $accounts->pluck('id')->toArray();
$set = $this->user->bills()
->leftJoin(
- 'transaction_journals', function (JoinClause $join) {
- $join->on('transaction_journals.bill_id', '=', 'bills.id')->whereNull('transaction_journals.deleted_at');
- }
+ 'transaction_journals',
+ function (JoinClause $join) {
+ $join->on('transaction_journals.bill_id', '=', 'bills.id')->whereNull('transaction_journals.deleted_at');
+ }
)
->leftJoin(
- 'transactions', function (JoinClause $join) {
- $join->on('transaction_journals.id', '=', 'transactions.transaction_journal_id')->where('transactions.amount', '<', 0);
- }
+ 'transactions',
+ function (JoinClause $join) {
+ $join->on('transaction_journals.id', '=', 'transactions.transaction_journal_id')->where('transactions.amount', '<', 0);
+ }
)
->whereIn('transactions.account_id', $ids)
->whereNull('transaction_journals.deleted_at')
@@ -177,8 +175,7 @@ class BillRepository implements BillRepositoryInterface
$set = $set->sortBy(
function (Bill $bill) {
-
- $int = $bill->active === 1 ? 0 : 1;
+ $int = 1 === $bill->active ? 0 : 1;
return $int . strtolower($bill->name);
}
@@ -238,7 +235,6 @@ class BillRepository implements BillRepositoryInterface
Log::debug(sprintf('Dates = %d, journalCount = %d, total = %d', $dates->count(), $count, $total));
if ($total > 0) {
-
$average = bcdiv(bcadd($bill->amount_max, $bill->amount_min), '2');
$multi = bcmul($average, strval($total));
$sum = bcadd($sum, $multi);
@@ -285,7 +281,6 @@ class BillRepository implements BillRepositoryInterface
$dates = $bill->transactionJournals()->before($end)->after($start)->get(['transaction_journals.date'])->pluck('date');
return $dates;
-
}
/**
@@ -302,9 +297,7 @@ class BillRepository implements BillRepositoryInterface
$set = new Collection;
Log::debug(sprintf('Now at bill "%s" (%s)', $bill->name, $bill->repeat_freq));
- /*
- * Start at 2016-10-01, see when we expect the bill to hit:
- */
+ // Start at 2016-10-01, see when we expect the bill to hit:
$currentStart = clone $start;
Log::debug(sprintf('First currentstart is %s', $currentStart->format('Y-m-d')));
@@ -312,9 +305,7 @@ class BillRepository implements BillRepositoryInterface
Log::debug(sprintf('Currentstart is now %s.', $currentStart->format('Y-m-d')));
$nextExpectedMatch = $this->nextDateMatch($bill, $currentStart);
Log::debug(sprintf('Next Date match after %s is %s', $currentStart->format('Y-m-d'), $nextExpectedMatch->format('Y-m-d')));
- /*
- * If nextExpectedMatch is after end, we continue:
- */
+ // If nextExpectedMatch is after end, we continue:
if ($nextExpectedMatch > $end) {
Log::debug(
sprintf('nextExpectedMatch %s is after %s, so we skip this bill now.', $nextExpectedMatch->format('Y-m-d'), $end->format('Y-m-d'))
@@ -339,7 +330,6 @@ class BillRepository implements BillRepositoryInterface
);
Log::debug(sprintf('Found dates between %s and %s:', $start->format('Y-m-d'), $end->format('Y-m-d')), $simple->toArray());
-
return $set;
}
@@ -484,9 +474,7 @@ class BillRepository implements BillRepositoryInterface
*/
public function scan(Bill $bill, TransactionJournal $journal): bool
{
- /*
- * Can only support withdrawals.
- */
+ // Can only support withdrawals.
if (false === $journal->isWithdrawal()) {
return false;
}
@@ -500,10 +488,7 @@ class BillRepository implements BillRepositoryInterface
$wordMatch = $this->doWordMatch($matches, $description);
$amountMatch = $this->doAmountMatch($journal->amountPositive(), $bill->amount_min, $bill->amount_max);
-
- /*
- * If both, update!
- */
+ // when both, update!
if ($wordMatch && $amountMatch) {
$journal->bill()->associate($bill);
$journal->save();
@@ -519,7 +504,6 @@ class BillRepository implements BillRepositoryInterface
}
return false;
-
}
/**
@@ -550,10 +534,14 @@ class BillRepository implements BillRepositoryInterface
'skip' => $data['skip'],
'automatch' => $data['automatch'],
'active' => $data['active'],
-
]
);
+ // update note:
+ if (isset($data['notes'])) {
+ $this->updateNote($bill, $data['notes']);
+ }
+
return $bill;
}
@@ -565,8 +553,6 @@ class BillRepository implements BillRepositoryInterface
*/
public function update(Bill $bill, array $data): Bill
{
-
-
$bill->name = $data['name'];
$bill->match = $data['match'];
$bill->amount_min = $data['amount_min'];
@@ -578,6 +564,11 @@ class BillRepository implements BillRepositoryInterface
$bill->active = $data['active'];
$bill->save();
+ // update note:
+ if (isset($data['notes']) && null !== $data['notes']) {
+ $this->updateNote($bill, strval($data['notes']));
+ }
+
return $bill;
}
@@ -608,8 +599,8 @@ class BillRepository implements BillRepositoryInterface
$wordMatch = false;
$count = 0;
foreach ($matches as $word) {
- if (!(strpos($description, strtolower($word)) === false)) {
- $count++;
+ if (!(false === strpos($description, strtolower($word)))) {
+ ++$count;
}
}
if ($count >= count($matches)) {
@@ -618,4 +609,32 @@ class BillRepository implements BillRepositoryInterface
return $wordMatch;
}
+
+
+ /**
+ * @param Bill $bill
+ * @param string $note
+ *
+ * @return bool
+ */
+ protected function updateNote(Bill $bill, string $note): bool
+ {
+ if (0 === strlen($note)) {
+ $dbNote = $bill->notes()->first();
+ if (null !== $dbNote) {
+ $dbNote->delete();
+ }
+
+ return true;
+ }
+ $dbNote = $bill->notes()->first();
+ if (null === $dbNote) {
+ $dbNote = new Note();
+ $dbNote->noteable()->associate($bill);
+ }
+ $dbNote->text = trim($note);
+ $dbNote->save();
+
+ return true;
+ }
}
diff --git a/app/Repositories/Bill/BillRepositoryInterface.php b/app/Repositories/Bill/BillRepositoryInterface.php
index 8097f24294..acc5b9b977 100644
--- a/app/Repositories/Bill/BillRepositoryInterface.php
+++ b/app/Repositories/Bill/BillRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Bill;
@@ -30,9 +29,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface BillRepositoryInterface
- *
- * @package FireflyIII\Repositories\Bill
+ * Interface BillRepositoryInterface.
*/
interface BillRepositoryInterface
{
@@ -188,5 +185,4 @@ interface BillRepositoryInterface
* @return Bill
*/
public function update(Bill $bill, array $data): Bill;
-
}
diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php
index 365d14ee7e..aa60bda9a8 100644
--- a/app/Repositories/Budget/BudgetRepository.php
+++ b/app/Repositories/Budget/BudgetRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Budget;
@@ -38,13 +37,12 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Collection;
+use Log;
use Navigation;
use stdClass;
/**
- * Class BudgetRepository
- *
- * @package FireflyIII\Repositories\Budget
+ * Class BudgetRepository.
*/
class BudgetRepository implements BudgetRepositoryInterface
{
@@ -72,7 +70,6 @@ class BudgetRepository implements BudgetRepositoryInterface
}
return true;
-
}
/**
@@ -90,7 +87,8 @@ class BudgetRepository implements BudgetRepositoryInterface
// get account information
/** @var AccountRepositoryInterface $accountRepository */
$accountRepository = app(AccountRepositoryInterface::class);
- $accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
+ $accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
+ $defaultCurrency = app('amount')->getDefaultCurrency();
$return = [];
/** @var Budget $budget */
foreach ($budgets as $budget) {
@@ -109,7 +107,7 @@ class BudgetRepository implements BudgetRepositoryInterface
if ($limit->start_date->isSameDay($start) && $limit->end_date->isSameDay($end)
) {
$return[$budgetId]['currentLimit'] = $limit;
- $return[$budgetId]['budgeted'] = $limit->amount;
+ $return[$budgetId]['budgeted'] = round($limit->amount, $defaultCurrency->decimal_places);
continue;
}
// otherwise it's just one of the many relevant repetitions:
@@ -134,7 +132,7 @@ class BudgetRepository implements BudgetRepositoryInterface
}
/**
- * Filters entries from the result set generated by getBudgetPeriodReport
+ * Filters entries from the result set generated by getBudgetPeriodReport.
*
* @param Collection $set
* @param int $budgetId
@@ -156,7 +154,7 @@ class BudgetRepository implements BudgetRepositoryInterface
}
);
$amount = '0';
- if (!is_null($result->first())) {
+ if (null !== $result->first()) {
$amount = $result->first()->sum_of_period;
}
@@ -176,7 +174,7 @@ class BudgetRepository implements BudgetRepositoryInterface
public function find(int $budgetId): Budget
{
$budget = $this->user->budgets()->find($budgetId);
- if (is_null($budget)) {
+ if (null === $budget) {
$budget = new Budget;
}
@@ -215,7 +213,7 @@ class BudgetRepository implements BudgetRepositoryInterface
{
$oldest = Carbon::create()->startOfYear();
$journal = $budget->transactionJournals()->orderBy('date', 'ASC')->first();
- if (!is_null($journal)) {
+ if (null !== $journal) {
$oldest = $journal->date < $oldest ? $journal->date : $oldest;
}
@@ -223,13 +221,12 @@ class BudgetRepository implements BudgetRepositoryInterface
->transactions()
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.id')
->orderBy('transaction_journals.date', 'ASC')->first(['transactions.*', 'transaction_journals.date']);
- if (!is_null($transaction)) {
+ if (null !== $transaction) {
$carbon = new Carbon($transaction->date);
$oldest = $carbon < $oldest ? $carbon : $oldest;
}
return $oldest;
-
}
/**
@@ -305,7 +302,7 @@ class BudgetRepository implements BudgetRepositoryInterface
->where('transaction_currency_id', $currency->id)
->where('start_date', $start->format('Y-m-d'))
->where('end_date', $end->format('Y-m-d'))->first();
- if (!is_null($availableBudget)) {
+ if (null !== $availableBudget) {
$amount = strval($availableBudget->amount);
}
@@ -396,7 +393,6 @@ class BudgetRepository implements BudgetRepositoryInterface
}
return $data;
-
}
/**
@@ -481,7 +477,7 @@ class BudgetRepository implements BudgetRepositoryInterface
->where('transaction_currency_id', $currency->id)
->where('start_date', $start->format('Y-m-d'))
->where('end_date', $end->format('Y-m-d'))->first();
- if (is_null($availableBudget)) {
+ if (null === $availableBudget) {
$availableBudget = new AvailableBudget;
$availableBudget->user()->associate($this->user);
$availableBudget->transactionCurrency()->associate($currency);
@@ -520,7 +516,7 @@ class BudgetRepository implements BudgetRepositoryInterface
if ($accounts->count() > 0) {
$collector->setAccounts($accounts);
}
- if ($accounts->count() === 0) {
+ if (0 === $accounts->count()) {
$collector->setAllAssetAccounts();
}
@@ -547,7 +543,7 @@ class BudgetRepository implements BudgetRepositoryInterface
if ($accounts->count() > 0) {
$collector->setAccounts($accounts);
}
- if ($accounts->count() === 0) {
+ if (0 === $accounts->count()) {
$collector->setAllAssetAccounts();
}
@@ -605,17 +601,18 @@ class BudgetRepository implements BudgetRepositoryInterface
* @param Budget $budget
* @param Carbon $start
* @param Carbon $end
- * @param int $amount
+ * @param string $amount
*
* @return BudgetLimit
*/
- public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, int $amount): BudgetLimit
+ public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $amount): BudgetLimit
{
// count the limits:
$limits = $budget->budgetlimits()
->where('budget_limits.start_date', $start->format('Y-m-d'))
->where('budget_limits.end_date', $end->format('Y-m-d'))
->get(['budget_limits.*'])->count();
+ Log::debug(sprintf('Found %d budget limits.', $limits));
// there might be a budget limit for these dates:
/** @var BudgetLimit $limit */
$limit = $budget->budgetlimits()
@@ -624,7 +621,8 @@ class BudgetRepository implements BudgetRepositoryInterface
->first(['budget_limits.*']);
// if more than 1 limit found, delete the others:
- if ($limits > 1 && !is_null($limit)) {
+ if ($limits > 1 && null !== $limit) {
+ Log::debug(sprintf('Found more than 1, delete all except #%d', $limit->id));
$budget->budgetlimits()
->where('budget_limits.start_date', $start->format('Y-m-d'))
->where('budget_limits.end_date', $end->format('Y-m-d'))
@@ -632,19 +630,23 @@ class BudgetRepository implements BudgetRepositoryInterface
}
// delete if amount is zero.
- if (!is_null($limit) && $amount <= 0.0) {
+ // Returns 0 if the two operands are equal,
+ // 1 if the left_operand is larger than the right_operand, -1 otherwise.
+ if (null !== $limit && bccomp($amount, '0') <= 0) {
+ Log::debug(sprintf('%s is zero, delete budget limit #%d', $amount, $limit->id));
$limit->delete();
return new BudgetLimit;
}
// update if exists:
- if (!is_null($limit)) {
+ if (null !== $limit) {
+ Log::debug(sprintf('Existing budget limit is #%d, update this to amount %s', $limit->id, $amount));
$limit->amount = $amount;
$limit->save();
return $limit;
}
-
+ Log::debug('No existing budget limit, create a new one');
// or create one and return it.
$limit = new BudgetLimit;
$limit->budget()->associate($budget);
@@ -652,6 +654,7 @@ class BudgetRepository implements BudgetRepositoryInterface
$limit->end_date = $end;
$limit->amount = $amount;
$limit->save();
+ Log::debug(sprintf('Created new budget limit with ID #%d and amount %s', $limit->id, $amount));
return $limit;
}
diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php
index f1d4f6bc3f..5f41cbfd23 100644
--- a/app/Repositories/Budget/BudgetRepositoryInterface.php
+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Budget;
@@ -31,9 +30,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface BudgetRepositoryInterface
- *
- * @package FireflyIII\Repositories\Budget
+ * Interface BudgetRepositoryInterface.
*/
interface BudgetRepositoryInterface
{
@@ -62,7 +59,7 @@ interface BudgetRepositoryInterface
public function destroy(Budget $budget): bool;
/**
- * Filters entries from the result set generated by getBudgetPeriodReport
+ * Filters entries from the result set generated by getBudgetPeriodReport.
*
* @param Collection $set
* @param int $budgetId
@@ -132,7 +129,6 @@ interface BudgetRepositoryInterface
public function getBudgetLimits(Budget $budget, Carbon $start, Carbon $end): Collection;
/**
- *
* @param Collection $budgets
* @param Collection $accounts
* @param Carbon $start
@@ -214,10 +210,9 @@ interface BudgetRepositoryInterface
* @param Budget $budget
* @param Carbon $start
* @param Carbon $end
- * @param int $amount
+ * @param string $amount
*
* @return BudgetLimit
*/
- public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, int $amount): BudgetLimit;
-
+ public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $amount): BudgetLimit;
}
diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php
index 86e44b213d..659e5dde38 100644
--- a/app/Repositories/Category/CategoryRepository.php
+++ b/app/Repositories/Category/CategoryRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Category;
@@ -34,9 +33,7 @@ use Log;
use Navigation;
/**
- * Class CategoryRepository
- *
- * @package FireflyIII\Repositories\Category
+ * Class CategoryRepository.
*/
class CategoryRepository implements CategoryRepositoryInterface
{
@@ -76,7 +73,7 @@ class CategoryRepository implements CategoryRepositoryInterface
}
/**
- * Find a category
+ * Find a category.
*
* @param int $categoryId
*
@@ -85,7 +82,7 @@ class CategoryRepository implements CategoryRepositoryInterface
public function find(int $categoryId): Category
{
$category = $this->user->categories()->find($categoryId);
- if (is_null($category)) {
+ if (null === $category) {
$category = new Category;
}
@@ -93,7 +90,7 @@ class CategoryRepository implements CategoryRepositoryInterface
}
/**
- * Find a category
+ * Find a category.
*
* @param string $name
*
@@ -121,13 +118,13 @@ class CategoryRepository implements CategoryRepositoryInterface
$firstJournalDate = $this->getFirstJournalDate($category);
$firstTransactionDate = $this->getFirstTransactionDate($category);
- if (is_null($firstTransactionDate) && is_null($firstJournalDate)) {
+ if (null === $firstTransactionDate && null === $firstJournalDate) {
return null;
}
- if (is_null($firstTransactionDate)) {
+ if (null === $firstTransactionDate) {
return $firstJournalDate;
}
- if (is_null($firstJournalDate)) {
+ if (null === $firstJournalDate) {
return $firstTransactionDate;
}
@@ -167,13 +164,13 @@ class CategoryRepository implements CategoryRepositoryInterface
$lastJournalDate = $this->getLastJournalDate($category, $accounts);
$lastTransactionDate = $this->getLastTransactionDate($category, $accounts);
- if (is_null($lastTransactionDate) && is_null($lastJournalDate)) {
+ if (null === $lastTransactionDate && null === $lastJournalDate) {
return null;
}
- if (is_null($lastTransactionDate)) {
+ if (null === $lastTransactionDate) {
return $lastJournalDate;
}
- if (is_null($lastJournalDate)) {
+ if (null === $lastJournalDate) {
return $lastTransactionDate;
}
@@ -218,7 +215,7 @@ class CategoryRepository implements CategoryRepositoryInterface
/** @var Transaction $transaction */
foreach ($transactions as $transaction) {
// if positive, skip:
- if (bccomp($transaction->transaction_amount, '0') === 1) {
+ if (1 === bccomp($transaction->transaction_amount, '0')) {
continue;
}
$categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id));
@@ -253,7 +250,7 @@ class CategoryRepository implements CategoryRepositoryInterface
foreach ($transactions as $transaction) {
// if positive, skip:
- if (bccomp($transaction->transaction_amount, '0') === 1) {
+ if (1 === bccomp($transaction->transaction_amount, '0')) {
continue;
}
$date = $transaction->date->format($carbonFormat);
@@ -336,7 +333,6 @@ class CategoryRepository implements CategoryRepositoryInterface
];
Log::debug('Looping transactions..');
foreach ($transactions as $transaction) {
-
// if negative, skip:
if (bccomp($transaction->transaction_amount, '0') === -1) {
continue;
@@ -377,15 +373,13 @@ class CategoryRepository implements CategoryRepositoryInterface
$collector->setUser($this->user);
$collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setCategories($categories);
-
if ($accounts->count() > 0) {
$collector->setAccounts($accounts);
}
- if ($accounts->count() === 0) {
+ if (0 === $accounts->count()) {
$collector->setAllAssetAccounts();
}
-
$set = $collector->getJournals();
$sum = strval($set->sum('transaction_amount'));
@@ -409,7 +403,7 @@ class CategoryRepository implements CategoryRepositoryInterface
if ($accounts->count() > 0) {
$collector->setAccounts($accounts);
}
- if ($accounts->count() === 0) {
+ if (0 === $accounts->count()) {
$collector->setAllAssetAccounts();
}
@@ -472,7 +466,7 @@ class CategoryRepository implements CategoryRepositoryInterface
$query = $category->transactionJournals()->orderBy('date', 'ASC');
$result = $query->first(['transaction_journals.*']);
- if (!is_null($result)) {
+ if (null !== $result) {
return $result->date;
}
@@ -492,7 +486,7 @@ class CategoryRepository implements CategoryRepositoryInterface
->orderBy('transaction_journals.date', 'DESC');
$lastTransaction = $query->first(['transaction_journals.*']);
- if (!is_null($lastTransaction)) {
+ if (null !== $lastTransaction) {
return new Carbon($lastTransaction->date);
}
@@ -516,7 +510,7 @@ class CategoryRepository implements CategoryRepositoryInterface
$result = $query->first(['transaction_journals.*']);
- if (!is_null($result)) {
+ if (null !== $result) {
return $result->date;
}
@@ -541,11 +535,10 @@ class CategoryRepository implements CategoryRepositoryInterface
}
$lastTransaction = $query->first(['transaction_journals.*']);
- if (!is_null($lastTransaction)) {
+ if (null !== $lastTransaction) {
return new Carbon($lastTransaction->date);
}
return null;
}
-
}
diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php
index 7dc423800b..2444678ca5 100644
--- a/app/Repositories/Category/CategoryRepositoryInterface.php
+++ b/app/Repositories/Category/CategoryRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Category;
@@ -29,9 +28,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface CategoryRepositoryInterface
- *
- * @package FireflyIII\Repositories\Category
+ * Interface CategoryRepositoryInterface.
*/
interface CategoryRepositoryInterface
{
@@ -53,7 +50,7 @@ interface CategoryRepositoryInterface
public function earnedInPeriod(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): string;
/**
- * Find a category
+ * Find a category.
*
* @param int $categoryId
*
@@ -62,7 +59,7 @@ interface CategoryRepositoryInterface
public function find(int $categoryId): Category;
/**
- * Find a category
+ * Find a category.
*
* @param string $name
*
diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php
index af0e383460..7862a2fdba 100644
--- a/app/Repositories/Currency/CurrencyRepository.php
+++ b/app/Repositories/Currency/CurrencyRepository.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Currency;
-
use Carbon\Carbon;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\Preference;
@@ -34,9 +32,7 @@ use Log;
use Preferences;
/**
- * Class CurrencyRepository
- *
- * @package FireflyIII\Repositories\Currency
+ * Class CurrencyRepository.
*/
class CurrencyRepository implements CurrencyRepositoryInterface
{
@@ -55,7 +51,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
}
// is the only currency left
- if ($this->get()->count() === 1) {
+ if (1 === $this->get()->count()) {
return false;
}
@@ -100,7 +96,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
}
/**
- * Find by ID
+ * Find by ID.
*
* @param int $currencyId
*
@@ -109,7 +105,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
public function find(int $currencyId): TransactionCurrency
{
$currency = TransactionCurrency::find($currencyId);
- if (is_null($currency)) {
+ if (null === $currency) {
$currency = new TransactionCurrency;
}
@@ -117,7 +113,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
}
/**
- * Find by currency code
+ * Find by currency code.
*
* @param string $currencyCode
*
@@ -126,7 +122,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
public function findByCode(string $currencyCode): TransactionCurrency
{
$currency = TransactionCurrency::where('code', $currencyCode)->first();
- if (is_null($currency)) {
+ if (null === $currency) {
$currency = new TransactionCurrency;
}
@@ -134,7 +130,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
}
/**
- * Find by currency name
+ * Find by currency name.
*
* @param string $currencyName
*
@@ -143,7 +139,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
public function findByName(string $currencyName): TransactionCurrency
{
$preferred = TransactionCurrency::whereName($currencyName)->first();
- if (is_null($preferred)) {
+ if (null === $preferred) {
$preferred = new TransactionCurrency;
}
@@ -151,7 +147,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
}
/**
- * Find by currency symbol
+ * Find by currency symbol.
*
* @param string $currencySymbol
*
@@ -160,7 +156,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
public function findBySymbol(string $currencySymbol): TransactionCurrency
{
$currency = TransactionCurrency::whereSymbol($currencySymbol)->first();
- if (is_null($currency)) {
+ if (null === $currency) {
$currency = new TransactionCurrency;
}
@@ -172,7 +168,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
*/
public function get(): Collection
{
- return TransactionCurrency::get();
+ return TransactionCurrency::orderBy('code', 'ASC')->get();
}
/**
@@ -182,7 +178,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
*/
public function getByIds(array $ids): Collection
{
- return TransactionCurrency::whereIn('id', $ids)->get();
+ return TransactionCurrency::orderBy('code', 'ASC')->whereIn('id', $ids)->get();
}
/**
@@ -193,7 +189,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
public function getCurrencyByPreference(Preference $preference): TransactionCurrency
{
$preferred = TransactionCurrency::where('code', $preference->data)->first();
- if (is_null($preferred)) {
+ if (null === $preferred) {
$preferred = TransactionCurrency::first();
}
@@ -221,15 +217,13 @@ class CurrencyRepository implements CurrencyRepositoryInterface
->where('from_currency_id', $fromCurrency->id)
->where('to_currency_id', $toCurrency->id)
->where('date', $date->format('Y-m-d'))->first();
- if (!is_null($rate)) {
+ if (null !== $rate) {
Log::debug(sprintf('Found cached exchange rate in database for %s to %s on %s', $fromCurrency->code, $toCurrency->code, $date->format('Y-m-d')));
return $rate;
}
return new CurrencyExchangeRate;
-
-
}
/**
diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php
index bea29039f8..233e59044a 100644
--- a/app/Repositories/Currency/CurrencyRepositoryInterface.php
+++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Currency;
-
use Carbon\Carbon;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\Preference;
@@ -32,9 +30,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface CurrencyRepositoryInterface
- *
- * @package FireflyIII\Repositories\Currency
+ * Interface CurrencyRepositoryInterface.
*/
interface CurrencyRepositoryInterface
{
@@ -60,7 +56,7 @@ interface CurrencyRepositoryInterface
public function destroy(TransactionCurrency $currency): bool;
/**
- * Find by ID
+ * Find by ID.
*
* @param int $currencyId
*
@@ -69,7 +65,7 @@ interface CurrencyRepositoryInterface
public function find(int $currencyId): TransactionCurrency;
/**
- * Find by currency code
+ * Find by currency code.
*
* @param string $currencyCode
*
@@ -78,7 +74,7 @@ interface CurrencyRepositoryInterface
public function findByCode(string $currencyCode): TransactionCurrency;
/**
- * Find by currency name
+ * Find by currency name.
*
* @param string $currencyName
*
@@ -87,7 +83,7 @@ interface CurrencyRepositoryInterface
public function findByName(string $currencyName): TransactionCurrency;
/**
- * Find by currency symbol
+ * Find by currency symbol.
*
* @param string $currencySymbol
*
@@ -142,5 +138,4 @@ interface CurrencyRepositoryInterface
* @return TransactionCurrency
*/
public function update(TransactionCurrency $currency, array $data): TransactionCurrency;
-
}
diff --git a/app/Repositories/ExportJob/ExportJobRepository.php b/app/Repositories/ExportJob/ExportJobRepository.php
index c2a39deb9d..85fc0cb189 100644
--- a/app/Repositories/ExportJob/ExportJobRepository.php
+++ b/app/Repositories/ExportJob/ExportJobRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\ExportJob;
@@ -31,9 +30,7 @@ use Log;
use Storage;
/**
- * Class ExportJobRepository
- *
- * @package FireflyIII\Repositories\ExportJob
+ * Class ExportJobRepository.
*/
class ExportJobRepository implements ExportJobRepositoryInterface
{
@@ -91,7 +88,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
while ($count < 30) {
$key = Str::random(12);
$existing = $this->findByKey($key);
- if (is_null($existing->id)) {
+ if (null === $existing->id) {
$exportJob = new ExportJob;
$exportJob->user()->associate($this->user);
$exportJob->key = Str::random(12);
@@ -102,12 +99,10 @@ class ExportJobRepository implements ExportJobRepositoryInterface
return $exportJob;
}
- $count++;
-
+ ++$count;
}
return new ExportJob;
-
}
/**
@@ -131,7 +126,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
public function findByKey(string $key): ExportJob
{
$result = $this->user->exportJobs()->where('key', $key)->first(['export_jobs.*']);
- if (is_null($result)) {
+ if (null === $result) {
return new ExportJob;
}
diff --git a/app/Repositories/ExportJob/ExportJobRepositoryInterface.php b/app/Repositories/ExportJob/ExportJobRepositoryInterface.php
index cd1a1d6337..34c1eb3b29 100644
--- a/app/Repositories/ExportJob/ExportJobRepositoryInterface.php
+++ b/app/Repositories/ExportJob/ExportJobRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\ExportJob;
@@ -27,9 +26,7 @@ use FireflyIII\Models\ExportJob;
use FireflyIII\User;
/**
- * Interface ExportJobRepositoryInterface
- *
- * @package FireflyIII\Repositories\ExportJob
+ * Interface ExportJobRepositoryInterface.
*/
interface ExportJobRepositoryInterface
{
@@ -76,5 +73,4 @@ interface ExportJobRepositoryInterface
* @param User $user
*/
public function setUser(User $user);
-
}
diff --git a/app/Repositories/ImportJob/ImportJobRepository.php b/app/Repositories/ImportJob/ImportJobRepository.php
index cb1d005e43..c3bef54aee 100644
--- a/app/Repositories/ImportJob/ImportJobRepository.php
+++ b/app/Repositories/ImportJob/ImportJobRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\ImportJob;
@@ -35,9 +34,7 @@ use Storage;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
- * Class ImportJobRepository
- *
- * @package FireflyIII\Repositories\ImportJob
+ * Class ImportJobRepository.
*/
class ImportJobRepository implements ImportJobRepositoryInterface
{
@@ -48,6 +45,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
* @param string $fileType
*
* @return ImportJob
+ *
* @throws FireflyException
*/
public function create(string $fileType): ImportJob
@@ -62,7 +60,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
while ($count < 30) {
$key = Str::random(12);
$existing = $this->findByKey($key);
- if (is_null($existing->id)) {
+ if (null === $existing->id) {
$importJob = new ImportJob;
$importJob->user()->associate($this->user);
$importJob->file_type = $fileType;
@@ -80,8 +78,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
// breaks the loop:
return $importJob;
}
- $count++;
-
+ ++$count;
}
return new ImportJob;
@@ -95,7 +92,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
public function findByKey(string $key): ImportJob
{
$result = $this->user->importJobs()->where('key', $key)->first(['import_jobs.*']);
- if (is_null($result)) {
+ if (null === $result) {
return new ImportJob;
}
@@ -115,14 +112,15 @@ class ImportJobRepository implements ImportJobRepositoryInterface
// demo user's configuration upload is ignored completely.
if (!$repository->hasRole($this->user, 'demo')) {
Log::debug(
- 'Uploaded configuration file', ['name' => $file->getClientOriginalName(), 'size' => $file->getSize(), 'mime' => $file->getClientMimeType()]
+ 'Uploaded configuration file',
+ ['name' => $file->getClientOriginalName(), 'size' => $file->getSize(), 'mime' => $file->getClientMimeType()]
);
$configFileObject = new SplFileObject($file->getRealPath());
$configRaw = $configFileObject->fread($configFileObject->getSize());
$configuration = json_decode($configRaw, true);
- if (!is_null($configuration) && is_array($configuration)) {
+ if (null !== $configuration && is_array($configuration)) {
Log::debug('Found configuration', $configuration);
$this->setConfiguration($job, $configuration);
}
@@ -147,7 +145,6 @@ class ImportJobRepository implements ImportJobRepositoryInterface
$contentEncrypted = Crypt::encrypt($content);
$disk = Storage::disk('upload');
-
// user is demo user, replace upload with prepared file.
if ($repository->hasRole($this->user, 'demo')) {
$stubsDisk = Storage::disk('stubs');
diff --git a/app/Repositories/ImportJob/ImportJobRepositoryInterface.php b/app/Repositories/ImportJob/ImportJobRepositoryInterface.php
index 91d2d5449a..ad74c4e021 100644
--- a/app/Repositories/ImportJob/ImportJobRepositoryInterface.php
+++ b/app/Repositories/ImportJob/ImportJobRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\ImportJob;
@@ -28,9 +27,7 @@ use FireflyIII\User;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
- * Interface ImportJobRepositoryInterface
- *
- * @package FireflyIII\Repositories\ImportJob
+ * Interface ImportJobRepositoryInterface.
*/
interface ImportJobRepositoryInterface
{
diff --git a/app/Repositories/Journal/CreateJournalsTrait.php b/app/Repositories/Journal/CreateJournalsTrait.php
index 088ac15663..e9b9e1be87 100644
--- a/app/Repositories/Journal/CreateJournalsTrait.php
+++ b/app/Repositories/Journal/CreateJournalsTrait.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
-
use FireflyIII\Models\Budget;
use FireflyIII\Models\Category;
use FireflyIII\Models\Note;
@@ -40,8 +38,6 @@ use Log;
* @property User $user
*
* Trait CreateJournalsTrait
- *
- * @package FireflyIII\Repositories\Journal
*/
trait CreateJournalsTrait
{
@@ -55,7 +51,6 @@ trait CreateJournalsTrait
abstract public function storeAccounts(User $user, TransactionType $type, array $data): array;
/**
- *
* * Remember: a balancingAct takes at most one expense and one transfer.
* an advancePayment takes at most one expense, infinite deposits and NO transfers.
*
@@ -72,7 +67,7 @@ trait CreateJournalsTrait
foreach ($array as $name) {
if (strlen(trim($name)) > 0) {
$tag = Tag::firstOrCreateEncrypted(['tag' => $name, 'user_id' => $journal->user_id]);
- if (!is_null($tag)) {
+ if (null !== $tag) {
Log::debug(sprintf('Will try to connect tag #%d to journal #%d.', $tag->id, $journal->id));
$tagRepository->connect($journal, $tag);
}
@@ -88,7 +83,7 @@ trait CreateJournalsTrait
*/
protected function storeBudgetWithTransaction(Transaction $transaction, int $budgetId)
{
- if (intval($budgetId) > 0 && $transaction->transactionJournal->transactionType->type !== TransactionType::TRANSFER) {
+ if (intval($budgetId) > 0 && TransactionType::TRANSFER !== $transaction->transactionJournal->transactionType->type) {
/** @var \FireflyIII\Models\Budget $budget */
$budget = Budget::find($budgetId);
$transaction->budgets()->save($budget);
@@ -124,7 +119,7 @@ trait CreateJournalsTrait
// store transaction one way:
$amount = bcmul(strval($transaction['amount']), '-1');
- $foreignAmount = is_null($transaction['foreign_amount']) ? null : bcmul(strval($transaction['foreign_amount']), '-1');
+ $foreignAmount = null === $transaction['foreign_amount'] ? null : bcmul(strval($transaction['foreign_amount']), '-1');
$one = $this->storeTransaction(
[
'journal' => $journal,
@@ -144,7 +139,7 @@ trait CreateJournalsTrait
// and the other way:
$amount = strval($transaction['amount']);
- $foreignAmount = is_null($transaction['foreign_amount']) ? null : strval($transaction['foreign_amount']);
+ $foreignAmount = null === $transaction['foreign_amount'] ? null : strval($transaction['foreign_amount']);
$two = $this->storeTransaction(
[
'journal' => $journal,
@@ -183,11 +178,10 @@ trait CreateJournalsTrait
'identifier' => $data['identifier'],
];
-
- if (is_null($data['foreign_currency_id'])) {
+ if (null === $data['foreign_currency_id']) {
unset($fields['foreign_currency_id']);
}
- if (is_null($data['foreign_amount'])) {
+ if (null === $data['foreign_amount']) {
unset($fields['foreign_amount']);
}
@@ -196,19 +190,17 @@ trait CreateJournalsTrait
Log::debug(sprintf('Transaction stored with ID: %s', $transaction->id));
- if (!is_null($data['category'])) {
+ if (null !== $data['category']) {
$transaction->categories()->save($data['category']);
}
- if (!is_null($data['budget'])) {
+ if (null !== $data['budget']) {
$transaction->categories()->save($data['budget']);
}
return $transaction;
-
}
-
/**
* @param TransactionJournal $journal
* @param string $note
@@ -217,16 +209,16 @@ trait CreateJournalsTrait
*/
protected function updateNote(TransactionJournal $journal, string $note): bool
{
- if (strlen($note) === 0) {
+ if (0 === strlen($note)) {
$dbNote = $journal->notes()->first();
- if (!is_null($dbNote)) {
+ if (null !== $dbNote) {
$dbNote->delete();
}
return true;
}
$dbNote = $journal->notes()->first();
- if (is_null($dbNote)) {
+ if (null === $dbNote) {
$dbNote = new Note();
$dbNote->noteable()->associate($journal);
}
diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php
index f2688a5b68..e43bf02459 100644
--- a/app/Repositories/Journal/JournalRepository.php
+++ b/app/Repositories/Journal/JournalRepository.php
@@ -18,12 +18,13 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
use FireflyIII\Models\Account;
+use FireflyIII\Models\AccountType;
+use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\User;
@@ -33,9 +34,7 @@ use Log;
use Preferences;
/**
- * Class JournalRepository
- *
- * @package FireflyIII\Repositories\Journal
+ * Class JournalRepository.
*/
class JournalRepository implements JournalRepositoryInterface
{
@@ -63,7 +62,7 @@ class JournalRepository implements JournalRepositoryInterface
$messages->add('destination_account_expense', trans('firefly.invalid_convert_selection'));
$messages->add('source_account_asset', trans('firefly.invalid_convert_selection'));
- if ($source->id === $destination->id || is_null($source->id) || is_null($destination->id)) {
+ if ($source->id === $destination->id || null === $source->id || null === $destination->id) {
return $messages;
}
@@ -77,7 +76,7 @@ class JournalRepository implements JournalRepositoryInterface
$journal->save();
// if journal is a transfer now, remove budget:
- if ($type->type === TransactionType::TRANSFER) {
+ if (TransactionType::TRANSFER === $type->type) {
$journal->budgets()->detach();
}
@@ -116,7 +115,7 @@ class JournalRepository implements JournalRepositoryInterface
public function find(int $journalId): TransactionJournal
{
$journal = $this->user->transactionJournals()->where('id', $journalId)->first();
- if (is_null($journal)) {
+ if (null === $journal) {
return new TransactionJournal;
}
@@ -124,7 +123,39 @@ class JournalRepository implements JournalRepositoryInterface
}
/**
- * Get users first transaction journal
+ * @param Transaction $transaction
+ *
+ * @return Transaction|null
+ */
+ public function findOpposingTransaction(Transaction $transaction): ?Transaction
+ {
+ $opposing = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
+ ->where('transaction_journals.user_id', $this->user->id)
+ ->where('transactions.transaction_journal_id', $transaction->transaction_journal_id)
+ ->where('transactions.identifier', $transaction->identifier)
+ ->where('amount', bcmul($transaction->amount, '-1'))
+ ->first(['transactions.*']);
+
+ return $opposing;
+ }
+
+ /**
+ * @param int $transactionid
+ *
+ * @return Transaction|null
+ */
+ public function findTransaction(int $transactionid): ?Transaction
+ {
+ $transaction = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
+ ->where('transaction_journals.user_id', $this->user->id)
+ ->where('transactions.id', $transactionid)
+ ->first(['transactions.*']);
+
+ return $transaction;
+ }
+
+ /**
+ * Get users first transaction journal.
*
* @return TransactionJournal
*/
@@ -132,14 +163,30 @@ class JournalRepository implements JournalRepositoryInterface
{
$entry = $this->user->transactionJournals()->orderBy('date', 'ASC')->first(['transaction_journals.*']);
- if (is_null($entry)) {
-
+ if (null === $entry) {
return new TransactionJournal;
}
return $entry;
}
+ /**
+ * @param TransactionJournal $journal
+ *
+ * @return Transaction|null
+ */
+ public function getAssetTransaction(TransactionJournal $journal): ?Transaction
+ {
+ /** @var Transaction $transaction */
+ foreach ($journal->transactions as $transaction) {
+ if ($transaction->account->accountType->type === AccountType::ASSET) {
+ return $transaction;
+ }
+ }
+
+ return null;
+ }
+
/**
* @return Collection
*/
@@ -148,6 +195,23 @@ class JournalRepository implements JournalRepositoryInterface
return TransactionType::orderBy('type', 'ASC')->get();
}
+ /**
+ * @param array $transactionIds
+ *
+ * @return Collection
+ */
+ public function getTransactionsById(array $transactionIds): Collection
+ {
+ $set = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
+ ->whereIn('transactions.id', $transactionIds)
+ ->where('transaction_journals.user_id', $this->user->id)
+ ->whereNull('transaction_journals.deleted_at')
+ ->whereNull('transactions.deleted_at')
+ ->get(['transactions.*']);
+
+ return $set;
+ }
+
/**
* @param TransactionJournal $journal
*
@@ -155,7 +219,32 @@ class JournalRepository implements JournalRepositoryInterface
*/
public function isTransfer(TransactionJournal $journal): bool
{
- return $journal->transactionType->type === TransactionType::TRANSFER;
+ return TransactionType::TRANSFER === $journal->transactionType->type;
+ }
+
+ /**
+ * @param Transaction $transaction
+ *
+ * @return bool
+ */
+ public function reconcile(Transaction $transaction): bool
+ {
+ Log::debug(sprintf('Going to reconcile transaction #%d', $transaction->id));
+ $opposing = $this->findOpposingTransaction($transaction);
+
+ if (null === $opposing) {
+ Log::debug('Opposing transaction is NULL. Cannot reconcile.');
+
+ return false;
+ }
+ Log::debug(sprintf('Opposing transaction ID is #%d', $opposing->id));
+
+ $transaction->reconciled = true;
+ $opposing->reconciled = true;
+ $transaction->save();
+ $opposing->save();
+
+ return true;
}
/**
@@ -210,12 +299,13 @@ class JournalRepository implements JournalRepositoryInterface
$this->storeBudgetWithJournal($journal, $data['budget_id']);
// store two transactions:
+
$one = [
'journal' => $journal,
'account' => $accounts['source'],
'amount' => bcmul($amount, '-1'),
'transaction_currency_id' => $data['currency_id'],
- 'foreign_amount' => is_null($data['foreign_amount']) ? null : bcmul(strval($data['foreign_amount']), '-1'),
+ 'foreign_amount' => null === $data['foreign_amount'] ? null : bcmul(strval($data['foreign_amount']), '-1'),
'foreign_currency_id' => $data['foreign_currency_id'],
'description' => null,
'category' => null,
@@ -239,7 +329,6 @@ class JournalRepository implements JournalRepositoryInterface
$this->storeTransaction($two);
-
// store tags
if (isset($data['tags']) && is_array($data['tags'])) {
$this->saveTags($journal, $data['tags']);
@@ -262,7 +351,6 @@ class JournalRepository implements JournalRepositoryInterface
$journal->save();
return $journal;
-
}
/**
@@ -273,14 +361,13 @@ class JournalRepository implements JournalRepositoryInterface
*/
public function update(TransactionJournal $journal, array $data): TransactionJournal
{
-
// update actual journal:
$journal->description = $data['description'];
$journal->date = $data['date'];
$accounts = $this->storeAccounts($this->user, $journal->transactionType, $data);
$data = $this->verifyNativeAmount($data, $accounts);
$data['amount'] = strval($data['amount']);
- $data['foreign_amount'] = is_null($data['foreign_amount']) ? null : strval($data['foreign_amount']);
+ $data['foreign_amount'] = null === $data['foreign_amount'] ? null : strval($data['foreign_amount']);
// unlink all categories, recreate them:
$journal->categories()->detach();
@@ -303,7 +390,7 @@ class JournalRepository implements JournalRepositoryInterface
}
// update note:
- if (isset($data['notes']) && !is_null($data['notes']) ) {
+ if (isset($data['notes']) && null !== $data['notes']) {
$this->updateNote($journal, strval($data['notes']));
}
@@ -324,6 +411,7 @@ class JournalRepository implements JournalRepositoryInterface
return $journal;
}
+
/**
* Same as above but for transaction journal with multiple transactions.
*
@@ -345,11 +433,10 @@ class JournalRepository implements JournalRepositoryInterface
$journal->budgets()->detach();
// update note:
- if (isset($data['notes']) && !is_null($data['notes']) ) {
+ if (isset($data['notes']) && null !== $data['notes']) {
$this->updateNote($journal, strval($data['notes']));
}
-
// update meta fields:
$result = $journal->save();
if ($result) {
@@ -378,7 +465,7 @@ class JournalRepository implements JournalRepositoryInterface
Log::debug(sprintf('Split journal update split transaction %d', $identifier));
$transaction = $this->appendTransactionData($transaction, $data);
$this->storeSplitTransaction($journal, $transaction, $identifier);
- $identifier++;
+ ++$identifier;
}
$journal->save();
diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php
index 41d2b3aed2..af54952808 100644
--- a/app/Repositories/Journal/JournalRepositoryInterface.php
+++ b/app/Repositories/Journal/JournalRepositoryInterface.php
@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
use FireflyIII\Models\Account;
+use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\User;
@@ -31,13 +32,10 @@ use Illuminate\Support\Collection;
use Illuminate\Support\MessageBag;
/**
- * Interface JournalRepositoryInterface
- *
- * @package FireflyIII\Repositories\Journal
+ * Interface JournalRepositoryInterface.
*/
interface JournalRepositoryInterface
{
-
/**
* @param TransactionJournal $journal
* @param TransactionType $type
@@ -65,7 +63,7 @@ interface JournalRepositoryInterface
public function delete(TransactionJournal $journal): bool;
/**
- * Find a specific journal
+ * Find a specific journal.
*
* @param int $journalId
*
@@ -74,17 +72,45 @@ interface JournalRepositoryInterface
public function find(int $journalId): TransactionJournal;
/**
- * Get users very first transaction journal
+ * @param Transaction $transaction
+ *
+ * @return Transaction|null
+ */
+ public function findOpposingTransaction(Transaction $transaction): ?Transaction;
+
+ /**
+ * @param int $transactionid
+ *
+ * @return Transaction|null
+ */
+ public function findTransaction(int $transactionid): ?Transaction;
+
+ /**
+ * Get users very first transaction journal.
*
* @return TransactionJournal
*/
public function first(): TransactionJournal;
+ /**
+ * @param TransactionJournal $journal
+ *
+ * @return Transaction|null
+ */
+ public function getAssetTransaction(TransactionJournal $journal): ?Transaction;
+
/**
* @return Collection
*/
public function getTransactionTypes(): Collection;
+ /**
+ * @param array $transactionIds
+ *
+ * @return Collection
+ */
+ public function getTransactionsById(array $transactionIds): Collection;
+
/**
* @param TransactionJournal $journal
*
@@ -92,6 +118,13 @@ interface JournalRepositoryInterface
*/
public function isTransfer(TransactionJournal $journal): bool;
+ /**
+ * @param Transaction $transaction
+ *
+ * @return bool
+ */
+ public function reconcile(Transaction $transaction): bool;
+
/**
* @param TransactionJournal $journal
* @param int $order
@@ -127,5 +160,4 @@ interface JournalRepositoryInterface
* @return TransactionJournal
*/
public function updateSplitJournal(TransactionJournal $journal, array $data): TransactionJournal;
-
}
diff --git a/app/Repositories/Journal/JournalTasker.php b/app/Repositories/Journal/JournalTasker.php
index 0d150e8912..ae7f22e7be 100644
--- a/app/Repositories/Journal/JournalTasker.php
+++ b/app/Repositories/Journal/JournalTasker.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
@@ -28,6 +27,7 @@ use FireflyIII\Models\AccountType;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
+use FireflyIII\Support\SingleCacheProperties;
use FireflyIII\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Query\JoinClause;
@@ -35,17 +35,13 @@ use Illuminate\Support\Collection;
use Steam;
/**
- * Class JournalTasker
- *
- * @package FireflyIII\Repositories\Journal
+ * Class JournalTasker.
*/
class JournalTasker implements JournalTaskerInterface
{
-
/** @var User */
private $user;
-
/**
* @param TransactionJournal $journal
*
@@ -74,17 +70,25 @@ class JournalTasker implements JournalTaskerInterface
*/
public function getTransactionsOverview(TransactionJournal $journal): array
{
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('transaction-overview');
+ $cache->addProperty($journal->id);
+ $cache->addProperty($journal->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
// get all transaction data + the opposite site in one list.
$set = $journal
->transactions()// "source"
->leftJoin(
- 'transactions as destination', function (JoinClause $join) {
- $join
- ->on('transactions.transaction_journal_id', '=', 'destination.transaction_journal_id')
- ->where('transactions.amount', '=', DB::raw('destination.amount * -1'))
- ->where('transactions.identifier', '=', DB::raw('destination.identifier'))
- ->whereNull('destination.deleted_at');
- }
+ 'transactions as destination',
+ function (JoinClause $join) {
+ $join
+ ->on('transactions.transaction_journal_id', '=', 'destination.transaction_journal_id')
+ ->where('transactions.amount', '=', DB::raw('destination.amount * -1'))
+ ->where('transactions.identifier', '=', DB::raw('destination.identifier'))
+ ->whereNull('destination.deleted_at');
+ }
)
->with(['budgets', 'categories'])
->leftJoin('accounts as source_accounts', 'transactions.account_id', '=', 'source_accounts.id')
@@ -119,11 +123,11 @@ class JournalTasker implements JournalTaskerInterface
'foreign_currencies.decimal_places as foreign_currency_dp',
'foreign_currencies.code as foreign_currency_code',
'foreign_currencies.symbol as foreign_currency_symbol',
-
]
);
- $transactions = [];
+ $transactions = [];
+ $transactionType = $journal->transactionType->type;
/** @var Transaction $entry */
foreach ($set as $entry) {
@@ -132,7 +136,10 @@ class JournalTasker implements JournalTaskerInterface
$budget = $entry->budgets->first();
$category = $entry->categories->first();
$transaction = [
+ 'journal_type' => $transactionType,
+ 'updated_at' => $journal->updated_at,
'source_id' => $entry->id,
+ 'source' => $journal->transactions()->find($entry->id),
'source_amount' => $entry->amount,
'foreign_source_amount' => $entry->foreign_amount,
'description' => $entry->description,
@@ -143,14 +150,14 @@ class JournalTasker implements JournalTaskerInterface
'source_account_after' => bcadd($sourceBalance, $entry->amount),
'destination_id' => $entry->destination_id,
'destination_amount' => bcmul($entry->amount, '-1'),
- 'foreign_destination_amount' => is_null($entry->foreign_amount) ? null : bcmul($entry->foreign_amount, '-1'),
+ 'foreign_destination_amount' => null === $entry->foreign_amount ? null : bcmul($entry->foreign_amount, '-1'),
'destination_account_id' => $entry->destination_account_id,
'destination_account_type' => $entry->destination_account_type,
'destination_account_name' => Steam::decrypt(intval($entry->destination_account_encrypted), $entry->destination_account_name),
'destination_account_before' => $destinationBalance,
'destination_account_after' => bcadd($destinationBalance, bcmul($entry->amount, '-1')),
- 'budget_id' => is_null($budget) ? 0 : $budget->id,
- 'category' => is_null($category) ? '' : $category->name,
+ 'budget_id' => null === $budget ? 0 : $budget->id,
+ 'category' => null === $category ? '' : $category->name,
'transaction_currency_id' => $entry->transaction_currency_id,
'transaction_currency_code' => $entry->transaction_currency_code,
'transaction_currency_symbol' => $entry->transaction_currency_symbol,
@@ -160,17 +167,17 @@ class JournalTasker implements JournalTaskerInterface
'foreign_currency_symbol' => $entry->foreign_currency_symbol,
'foreign_currency_dp' => $entry->foreign_currency_dp,
];
- if ($entry->destination_account_type === AccountType::CASH) {
+ if (AccountType::CASH === $entry->destination_account_type) {
$transaction['destination_account_name'] = '';
}
- if ($entry->account_type === AccountType::CASH) {
+ if (AccountType::CASH === $entry->account_type) {
$transaction['source_account_name'] = '';
}
-
$transactions[] = $transaction;
}
+ $cache->store($transactions);
return $transactions;
}
@@ -186,7 +193,7 @@ class JournalTasker implements JournalTaskerInterface
/**
* Collect the balance of an account before the given transaction has hit. This is tricky, because
* the balance does not depend on the transaction itself but the journal it's part of. And of course
- * the order of transactions within the journal. So the query is pretty complex:
+ * the order of transactions within the journal. So the query is pretty complex:.
*
* @param int $transactionId
*
diff --git a/app/Repositories/Journal/JournalTaskerInterface.php b/app/Repositories/Journal/JournalTaskerInterface.php
index 81ca557fae..37899de92f 100644
--- a/app/Repositories/Journal/JournalTaskerInterface.php
+++ b/app/Repositories/Journal/JournalTaskerInterface.php
@@ -18,20 +18,16 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
-
use FireflyIII\Models\TransactionJournal;
use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface JournalTaskerInterface
- *
- * @package FireflyIII\Repositories\Journal
+ * Interface JournalTaskerInterface.
*/
interface JournalTaskerInterface
{
diff --git a/app/Repositories/Journal/SupportJournalsTrait.php b/app/Repositories/Journal/SupportJournalsTrait.php
index 322102d060..25a8a02d69 100644
--- a/app/Repositories/Journal/SupportJournalsTrait.php
+++ b/app/Repositories/Journal/SupportJournalsTrait.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
@@ -34,9 +33,7 @@ use FireflyIII\User;
use Log;
/**
- * Trait SupportJournalsTrait
- *
- * @package FireflyIII\Repositories\Journal
+ * Trait SupportJournalsTrait.
*/
trait SupportJournalsTrait
{
@@ -46,6 +43,7 @@ trait SupportJournalsTrait
* @param array $data
*
* @return array
+ *
* @throws FireflyException
*/
protected function storeAccounts(User $user, TransactionType $type, array $data): array
@@ -69,22 +67,25 @@ trait SupportJournalsTrait
$accounts['source'] = Account::where('user_id', $user->id)->where('id', $data['source_account_id'])->first();
$accounts['destination'] = Account::where('user_id', $user->id)->where('id', $data['destination_account_id'])->first();
break;
+ case TransactionType::RECONCILIATION:
+ $accounts['source'] = $data['source'];
+ $accounts['destination'] = $data['destination'];
+ unset($data['source'], $data['destination']);
+ break;
default:
throw new FireflyException(sprintf('Did not recognise transaction type "%s".', $type->type));
}
- if (is_null($accounts['source'])) {
+ if (null === $accounts['source']) {
Log::error('"source"-account is null, so we cannot continue!', ['data' => $data]);
throw new FireflyException('"source"-account is null, so we cannot continue!');
}
- if (is_null($accounts['destination'])) {
+ if (null === $accounts['destination']) {
Log::error('"destination"-account is null, so we cannot continue!', ['data' => $data]);
throw new FireflyException('"destination"-account is null, so we cannot continue!');
-
}
-
return $accounts;
}
@@ -94,7 +95,7 @@ trait SupportJournalsTrait
*/
protected function storeBudgetWithJournal(TransactionJournal $journal, int $budgetId)
{
- if (intval($budgetId) > 0 && $journal->transactionType->type === TransactionType::WITHDRAWAL) {
+ if (intval($budgetId) > 0 && TransactionType::WITHDRAWAL === $journal->transactionType->type) {
/** @var \FireflyIII\Models\Budget $budget */
$budget = Budget::find($budgetId);
$journal->budgets()->save($budget);
@@ -216,6 +217,7 @@ trait SupportJournalsTrait
* @param array $accounts
*
* @return array
+ *
* @throws FireflyException
*/
protected function verifyNativeAmount(array $data, array $accounts): array
@@ -228,10 +230,13 @@ trait SupportJournalsTrait
// which account to check for what the native currency is?
$check = 'source';
- if ($transactionType->type === TransactionType::DEPOSIT) {
+ if (TransactionType::DEPOSIT === $transactionType->type) {
$check = 'destination';
}
switch ($transactionType->type) {
+ case TransactionType::RECONCILIATION:
+ // do nothing.
+ break;
case TransactionType::DEPOSIT:
case TransactionType::WITHDRAWAL:
// continue:
diff --git a/app/Repositories/Journal/UpdateJournalsTrait.php b/app/Repositories/Journal/UpdateJournalsTrait.php
index d077096010..0095d8bf83 100644
--- a/app/Repositories/Journal/UpdateJournalsTrait.php
+++ b/app/Repositories/Journal/UpdateJournalsTrait.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
-
use DB;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account;
@@ -35,15 +33,12 @@ use FireflyIII\Repositories\Tag\TagRepositoryInterface;
use Log;
/**
- * Trait UpdateJournalsTrait
- *
- * @package FireflyIII\Repositories\Journal
+ * Trait UpdateJournalsTrait.
*/
trait UpdateJournalsTrait
{
-
/**
- * When the user edits a split journal, each line is missing crucial data:
+ * When the user edits a split journal, each line is missing crucial data:.
*
* - Withdrawal lines are missing the source account ID
* - Deposit lines are missing the destination account ID
@@ -85,18 +80,17 @@ trait UpdateJournalsTrait
protected function updateDestinationTransaction(TransactionJournal $journal, Account $account, array $data)
{
$set = $journal->transactions()->where('amount', '>', 0)->get();
- if ($set->count() !== 1) {
+ if (1 !== $set->count()) {
throw new FireflyException(sprintf('Journal #%d has %d transactions with an amount more than zero.', $journal->id, $set->count()));
}
/** @var Transaction $transaction */
$transaction = $set->first();
$transaction->amount = app('steam')->positive($data['amount']);
$transaction->transaction_currency_id = $data['currency_id'];
- $transaction->foreign_amount = is_null($data['foreign_amount']) ? null : app('steam')->positive($data['foreign_amount']);
+ $transaction->foreign_amount = null === $data['foreign_amount'] ? null : app('steam')->positive($data['foreign_amount']);
$transaction->foreign_currency_id = $data['foreign_currency_id'];
$transaction->account_id = $account->id;
$transaction->save();
-
}
/**
@@ -110,14 +104,14 @@ trait UpdateJournalsTrait
{
// should be one:
$set = $journal->transactions()->where('amount', '<', 0)->get();
- if ($set->count() !== 1) {
+ if (1 !== $set->count()) {
throw new FireflyException(sprintf('Journal #%d has %d transactions with an amount more than zero.', $journal->id, $set->count()));
}
/** @var Transaction $transaction */
$transaction = $set->first();
$transaction->amount = bcmul(app('steam')->positive($data['amount']), '-1');
$transaction->transaction_currency_id = $data['currency_id'];
- $transaction->foreign_amount = is_null($data['foreign_amount']) ? null : bcmul(app('steam')->positive($data['foreign_amount']), '-1');
+ $transaction->foreign_amount = null === $data['foreign_amount'] ? null : bcmul(app('steam')->positive($data['foreign_amount']), '-1');
$transaction->foreign_currency_id = $data['foreign_currency_id'];
$transaction->account_id = $account->id;
$transaction->save();
@@ -135,7 +129,6 @@ trait UpdateJournalsTrait
/** @var TagRepositoryInterface $tagRepository */
$tagRepository = app(TagRepositoryInterface::class);
-
// find or create all tags:
$tags = [];
$ids = [];
@@ -152,7 +145,7 @@ trait UpdateJournalsTrait
DB::table('tag_transaction_journal')->where('transaction_journal_id', $journal->id)->whereNotIn('tag_id', $ids)->delete();
}
// if count is zero, delete them all:
- if (count($ids) === 0) {
+ if (0 === count($ids)) {
DB::table('tag_transaction_journal')->where('transaction_journal_id', $journal->id)->delete();
}
diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php
index c46fb2d2bd..c600cc0f54 100644
--- a/app/Repositories/LinkType/LinkTypeRepository.php
+++ b/app/Repositories/LinkType/LinkTypeRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\LinkType;
@@ -30,9 +29,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Class LinkTypeRepository
- *
- * @package FireflyIII\Repositories\LinkType
+ * Class LinkTypeRepository.
*/
class LinkTypeRepository implements LinkTypeRepositoryInterface
{
@@ -57,7 +54,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
*/
public function destroy(LinkType $linkType, LinkType $moveTo): bool
{
- if (!is_null($moveTo->id)) {
+ if (null !== $moveTo->id) {
TransactionJournalLink::where('link_type_id', $linkType->id)->update(['link_type_id' => $moveTo->id]);
}
$linkType->delete();
@@ -85,7 +82,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
public function find(int $id): LinkType
{
$linkType = LinkType::find($id);
- if (is_null($linkType)) {
+ if (null === $linkType) {
return new LinkType;
}
@@ -105,9 +102,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
$count = TransactionJournalLink::whereDestinationId($one->id)->whereSourceId($two->id)->count();
$opposingCount = TransactionJournalLink::whereDestinationId($two->id)->whereSourceId($one->id)->count();
- return ($count + $opposingCount > 0);
-
-
+ return $count + $opposingCount > 0;
}
/**
@@ -187,6 +182,5 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
$linkType->save();
return $linkType;
-
}
}
diff --git a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
index cfc44b4f14..b917cec351 100644
--- a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
+++ b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\LinkType;
@@ -29,9 +28,7 @@ use FireflyIII\Models\TransactionJournalLink;
use Illuminate\Support\Collection;
/**
- * Interface LinkTypeRepositoryInterface
- *
- * @package FireflyIII\Repositories\LinkType
+ * Interface LinkTypeRepositoryInterface.
*/
interface LinkTypeRepositoryInterface
{
@@ -109,5 +106,4 @@ interface LinkTypeRepositoryInterface
* @return LinkType
*/
public function update(LinkType $linkType, array $data): LinkType;
-
}
diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php
index 8af13cbd28..49f2852217 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepository.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\PiggyBank;
@@ -34,13 +33,10 @@ use Illuminate\Support\Collection;
use Log;
/**
- * Class PiggyBankRepository
- *
- * @package FireflyIII\Repositories\PiggyBank
+ * Class PiggyBankRepository.
*/
class PiggyBankRepository implements PiggyBankRepositoryInterface
{
-
/** @var User */
private $user;
@@ -142,6 +138,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
* @param PiggyBank $piggyBank
*
* @return bool
+ *
* @throws \Exception
*/
public function destroy(PiggyBank $piggyBank): bool
@@ -159,7 +156,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
public function find(int $piggyBankid): PiggyBank
{
$piggyBank = $this->user->piggyBanks()->where('piggy_banks.id', $piggyBankid)->first(['piggy_banks.*']);
- if (!is_null($piggyBank)) {
+ if (null !== $piggyBank) {
return $piggyBank;
}
@@ -200,9 +197,8 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
Log::debug(sprintf('Account #%d is the source, so will remove amount from piggy bank.', $piggyBank->account_id));
}
-
// if the amount is positive, make sure it fits in piggy bank:
- if (bccomp($amount, '0') === 1 && bccomp($room, $amount) === -1) {
+ if (1 === bccomp($amount, '0') && bccomp($room, $amount) === -1) {
// amount is positive and $room is smaller than $amount
Log::debug(sprintf('Room in piggy bank for extra money is %f', $room));
Log::debug(sprintf('There is NO room to add %f to piggy bank #%d ("%s")', $amount, $piggyBank->id, $piggyBank->name));
@@ -212,7 +208,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
}
// amount is negative and $currentamount is smaller than $amount
- if (bccomp($amount, '0') === -1 && bccomp($compare, $amount) === 1) {
+ if (bccomp($amount, '0') === -1 && 1 === bccomp($compare, $amount)) {
Log::debug(sprintf('Max amount to remove is %f', $repetition->currentamount));
Log::debug(sprintf('Cannot remove %f from piggy bank #%d ("%s")', $amount, $piggyBank->id, $piggyBank->name));
Log::debug(sprintf('New amount is %f', $compare));
@@ -269,7 +265,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
public function getRepetition(PiggyBank $piggyBank, Carbon $date): PiggyBankRepetition
{
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($date)->first();
- if (is_null($repetition)) {
+ if (null === $repetition) {
return new PiggyBankRepetition;
}
@@ -313,7 +309,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
}
/**
- *
* set id of piggy bank.
*
* @param int $piggyBankId
@@ -365,7 +360,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
*/
public function update(PiggyBank $piggyBank, array $data): PiggyBank
{
-
$piggyBank->name = $data['name'];
$piggyBank->account_id = intval($data['account_id']);
$piggyBank->targetamount = round($data['targetamount'], 2);
@@ -380,7 +374,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
// remove money from the rep.
$repetition = $piggyBank->currentRelevantRep();
if ($repetition->currentamount > $piggyBank->targetamount) {
-
$diff = bcsub($piggyBank->targetamount, $repetition->currentamount);
$this->createEvent($piggyBank, $diff);
@@ -399,16 +392,16 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
*/
private function updateNote(PiggyBank $piggyBank, string $note): bool
{
- if (strlen($note) === 0) {
+ if (0 === strlen($note)) {
$dbNote = $piggyBank->notes()->first();
- if (!is_null($dbNote)) {
+ if (null !== $dbNote) {
$dbNote->delete();
}
return true;
}
$dbNote = $piggyBank->notes()->first();
- if (is_null($dbNote)) {
+ if (null === $dbNote) {
$dbNote = new Note();
$dbNote->noteable()->associate($piggyBank);
}
diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
index 2c6b335908..1219552227 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\PiggyBank;
@@ -32,9 +31,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface PiggyBankRepositoryInterface
- *
- * @package FireflyIII\Repositories\PiggyBank
+ * Interface PiggyBankRepositoryInterface.
*/
interface PiggyBankRepositoryInterface
{
diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php
index 5c5ccb4ab7..8f58c366ce 100644
--- a/app/Repositories/Rule/RuleRepository.php
+++ b/app/Repositories/Rule/RuleRepository.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Rule;
@@ -31,9 +30,7 @@ use FireflyIII\Models\RuleTrigger;
use FireflyIII\User;
/**
- * Class RuleRepository
- *
- * @package FireflyIII\Repositories\Rule
+ * Class RuleRepository.
*/
class RuleRepository implements RuleRepositoryInterface
{
@@ -74,7 +71,7 @@ class RuleRepository implements RuleRepositoryInterface
public function find(int $ruleId): Rule
{
$rule = $this->user->rules()->find($ruleId);
- if (is_null($rule)) {
+ if (null === $rule) {
return new Rule;
}
@@ -82,7 +79,7 @@ class RuleRepository implements RuleRepositoryInterface
}
/**
- * FIxXME can return null
+ * FIxXME can return null.
*
* @return RuleGroup
*/
@@ -105,12 +102,13 @@ class RuleRepository implements RuleRepositoryInterface
* @param Rule $rule
*
* @return string
+ *
* @throws FireflyException
*/
public function getPrimaryTrigger(Rule $rule): string
{
$count = $rule->ruleTriggers()->count();
- if ($count === 0) {
+ if (0 === $count) {
throw new FireflyException('Rules should have more than zero triggers, rule #' . $rule->id . ' has none!');
}
@@ -133,7 +131,6 @@ class RuleRepository implements RuleRepositoryInterface
$other->save();
}
-
$rule->order = ($rule->order + 1);
$rule->save();
$this->resetRulesInGroupOrder($rule->ruleGroup);
@@ -176,10 +173,10 @@ class RuleRepository implements RuleRepositoryInterface
foreach ($ids as $actionId) {
/** @var RuleTrigger $trigger */
$action = $rule->ruleActions()->find($actionId);
- if (!is_null($action)) {
+ if (null !== $action) {
$action->order = $order;
$action->save();
- $order++;
+ ++$order;
}
}
@@ -198,10 +195,10 @@ class RuleRepository implements RuleRepositoryInterface
foreach ($ids as $triggerId) {
/** @var RuleTrigger $trigger */
$trigger = $rule->ruleTriggers()->find($triggerId);
- if (!is_null($trigger)) {
+ if (null !== $trigger) {
$trigger->order = $order;
$trigger->save();
- $order++;
+ ++$order;
}
}
@@ -226,11 +223,10 @@ class RuleRepository implements RuleRepositoryInterface
foreach ($set as $entry) {
$entry->order = $count;
$entry->save();
- $count++;
+ ++$count;
}
return true;
-
}
/**
@@ -261,7 +257,7 @@ class RuleRepository implements RuleRepositoryInterface
$rule->rule_group_id = $data['rule_group_id'];
$rule->order = ($order + 1);
$rule->active = 1;
- $rule->stop_processing = intval($data['stop_processing']) === 1;
+ $rule->stop_processing = 1 === intval($data['stop_processing']);
$rule->title = $data['title'];
$rule->description = strlen($data['description']) > 0 ? $data['description'] : null;
@@ -290,10 +286,9 @@ class RuleRepository implements RuleRepositoryInterface
$ruleAction->active = 1;
$ruleAction->stop_processing = $values['stopProcessing'];
$ruleAction->action_type = $values['action'];
- $ruleAction->action_value = is_null($values['value']) ? '' : $values['value'];
+ $ruleAction->action_value = null === $values['value'] ? '' : $values['value'];
$ruleAction->save();
-
return $ruleAction;
}
@@ -311,7 +306,7 @@ class RuleRepository implements RuleRepositoryInterface
$ruleTrigger->active = 1;
$ruleTrigger->stop_processing = $values['stopProcessing'];
$ruleTrigger->trigger_type = $values['action'];
- $ruleTrigger->trigger_value = is_null($values['value']) ? '' : $values['value'];
+ $ruleTrigger->trigger_value = null === $values['value'] ? '' : $values['value'];
$ruleTrigger->save();
return $ruleTrigger;
@@ -345,7 +340,6 @@ class RuleRepository implements RuleRepositoryInterface
// recreate actions:
$this->storeActions($rule, $data);
-
return $rule;
}
@@ -373,7 +367,6 @@ class RuleRepository implements RuleRepositoryInterface
}
return true;
-
}
/**
@@ -407,7 +400,7 @@ class RuleRepository implements RuleRepositoryInterface
];
$this->storeTrigger($rule, $triggerValues);
- $order++;
+ ++$order;
}
return true;
diff --git a/app/Repositories/Rule/RuleRepositoryInterface.php b/app/Repositories/Rule/RuleRepositoryInterface.php
index e2e1bc2d15..57612767d5 100644
--- a/app/Repositories/Rule/RuleRepositoryInterface.php
+++ b/app/Repositories/Rule/RuleRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Rule;
@@ -30,9 +29,7 @@ use FireflyIII\Models\RuleTrigger;
use FireflyIII\User;
/**
- * Interface RuleRepositoryInterface
- *
- * @package FireflyIII\Repositories\Rule
+ * Interface RuleRepositoryInterface.
*/
interface RuleRepositoryInterface
{
@@ -55,7 +52,6 @@ interface RuleRepositoryInterface
*/
public function find(int $ruleId): Rule;
-
/**
* @return RuleGroup
*/
@@ -147,5 +143,4 @@ interface RuleRepositoryInterface
* @return Rule
*/
public function update(Rule $rule, array $data): Rule;
-
}
diff --git a/app/Repositories/RuleGroup/RuleGroupRepository.php b/app/Repositories/RuleGroup/RuleGroupRepository.php
index 77cb222201..4c45395466 100644
--- a/app/Repositories/RuleGroup/RuleGroupRepository.php
+++ b/app/Repositories/RuleGroup/RuleGroupRepository.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\RuleGroup;
-
use FireflyIII\Models\Rule;
use FireflyIII\Models\RuleGroup;
use FireflyIII\User;
@@ -31,9 +29,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Collection;
/**
- * Class RuleGroupRepository
- *
- * @package FireflyIII\Repositories\RuleGroup
+ * Class RuleGroupRepository.
*/
class RuleGroupRepository implements RuleGroupRepositoryInterface
{
@@ -58,9 +54,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
{
/** @var Rule $rule */
foreach ($ruleGroup->rules as $rule) {
-
- if (is_null($moveTo)) {
-
+ if (null === $moveTo) {
$rule->delete();
continue;
}
@@ -72,7 +66,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
$ruleGroup->delete();
$this->resetRuleGroupOrder();
- if (!is_null($moveTo)) {
+ if (null !== $moveTo) {
$this->resetRulesInGroupOrder($moveTo);
}
@@ -87,7 +81,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
public function find(int $ruleGroupId): RuleGroup
{
$group = $this->user->ruleGroups()->find($ruleGroupId);
- if (is_null($group)) {
+ if (null === $group) {
return new RuleGroup;
}
@@ -167,7 +161,6 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
'rules' => function (HasMany $query) {
$query->orderBy('active', 'DESC');
$query->orderBy('order', 'ASC');
-
},
'rules.ruleTriggers' => function (HasMany $query) {
$query->orderBy('order', 'ASC');
@@ -238,10 +231,9 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
foreach ($set as $entry) {
$entry->order = $count;
$entry->save();
- $count++;
+ ++$count;
}
-
return true;
}
@@ -263,11 +255,10 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
foreach ($set as $entry) {
$entry->order = $count;
$entry->save();
- $count++;
+ ++$count;
}
return true;
-
}
/**
@@ -294,8 +285,6 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
'description' => $data['description'],
'order' => ($order + 1),
'active' => 1,
-
-
]
);
$newRuleGroup->save();
diff --git a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php
index 583f5e7508..ca9a142bc1 100644
--- a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php
+++ b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php
@@ -18,27 +18,20 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\RuleGroup;
-
use FireflyIII\Models\RuleGroup;
use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface RuleGroupRepositoryInterface
- *
- * @package FireflyIII\Repositories\RuleGroup
+ * Interface RuleGroupRepositoryInterface.
*/
interface RuleGroupRepositoryInterface
{
-
/**
- *
- *
* @return int
*/
public function count(): int;
@@ -141,6 +134,4 @@ interface RuleGroupRepositoryInterface
* @return RuleGroup
*/
public function update(RuleGroup $ruleGroup, array $data): RuleGroup;
-
-
}
diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php
index 8fa5f3cf4f..05f4807096 100644
--- a/app/Repositories/Tag/TagRepository.php
+++ b/app/Repositories/Tag/TagRepository.php
@@ -18,13 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Tag;
-
use Carbon\Carbon;
+use DB;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
use FireflyIII\Helpers\Filter\InternalTransferFilter;
use FireflyIII\Models\Tag;
@@ -35,18 +34,14 @@ use Illuminate\Support\Collection;
use Log;
/**
- * Class TagRepository
- *
- * @package FireflyIII\Repositories\Tag
+ * Class TagRepository.
*/
class TagRepository implements TagRepositoryInterface
{
-
/** @var User */
private $user;
/**
- *
* @param TransactionJournal $journal
* @param Tag $tag
*
@@ -54,9 +49,7 @@ class TagRepository implements TagRepositoryInterface
*/
public function connect(TransactionJournal $journal, Tag $tag): bool
{
- /*
- * Already connected:
- */
+ // Already connected:
if ($journal->tags()->find($tag->id)) {
Log::info(sprintf('Tag #%d is already connected to journal #%d.', $tag->id, $journal->id));
@@ -116,7 +109,7 @@ class TagRepository implements TagRepositoryInterface
public function find(int $tagId): Tag
{
$tag = $this->user->tags()->find($tagId);
- if (is_null($tag)) {
+ if (null === $tag) {
$tag = new Tag;
}
@@ -131,7 +124,7 @@ class TagRepository implements TagRepositoryInterface
public function findByTag(string $tag): Tag
{
$tags = $this->user->tags()->get();
- /** @var Tag $tag */
+ // @var Tag $tag
foreach ($tags as $databaseTag) {
if ($databaseTag->tag === $tag) {
return $databaseTag;
@@ -149,7 +142,7 @@ class TagRepository implements TagRepositoryInterface
public function firstUseDate(Tag $tag): Carbon
{
$journal = $tag->transactionJournals()->orderBy('date', 'ASC')->first();
- if (!is_null($journal)) {
+ if (null !== $journal) {
return $journal->date;
}
@@ -190,7 +183,7 @@ class TagRepository implements TagRepositoryInterface
public function lastUseDate(Tag $tag): Carbon
{
$journal = $tag->transactionJournals()->orderBy('date', 'DESC')->first();
- if (!is_null($journal)) {
+ if (null !== $journal) {
return $journal->date;
}
@@ -251,8 +244,6 @@ class TagRepository implements TagRepositoryInterface
$tag->save();
return $tag;
-
-
}
/**
@@ -267,7 +258,7 @@ class TagRepository implements TagRepositoryInterface
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
- if (!is_null($start) && !is_null($end)) {
+ if (null !== $start && null !== $end) {
$collector->setRange($start, $end);
}
@@ -293,7 +284,7 @@ class TagRepository implements TagRepositoryInterface
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
- if (!is_null($start) && !is_null($end)) {
+ if (null !== $start && null !== $end) {
$collector->setRange($start, $end);
}
@@ -310,7 +301,7 @@ class TagRepository implements TagRepositoryInterface
foreach ($journals as $journal) {
$amount = app('steam')->positive(strval($journal->transaction_amount));
$type = $journal->transaction_type_type;
- if ($type === TransactionType::WITHDRAWAL) {
+ if (TransactionType::WITHDRAWAL === $type) {
$amount = bcmul($amount, '-1');
}
$sums[$type] = bcadd($sums[$type], $amount);
@@ -328,48 +319,68 @@ class TagRepository implements TagRepositoryInterface
*/
public function tagCloud(?int $year): array
{
+ // Some vars
$min = null;
- $max = 0;
- $query = $this->user->tags();
+ $max = '0';
$return = [];
- Log::debug('Going to build tag-cloud');
- if (!is_null($year)) {
- Log::debug(sprintf('Year is not null: %d', $year));
+ // get all tags
+ $allTags = $this->user->tags();
+ // get tags with a certain amount (in this range):
+ $query = $this->user->tags()
+ ->leftJoin('tag_transaction_journal', 'tag_transaction_journal.tag_id', '=', 'tags.id')
+ ->leftJoin('transaction_journals', 'tag_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
+ ->leftJoin('transactions', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
+ ->where('transactions.amount', '>', 0)
+ ->groupBy(['tags.id', 'tags.tag']);
+
+ // add date range (or not):
+ if (null === $year) {
+ $query->whereNull('tags.date');
+ $allTags->whereNull('tags.date');
+ }
+ if (null !== $year) {
$start = $year . '-01-01';
$end = $year . '-12-31';
- $query->where('date', '>=', $start)->where('date', '<=', $end);
+ $query->where('tags.date', '>=', $start)->where('tags.date', '<=', $end);
+ $allTags->where('tags.date', '>=', $start)->where('tags.date', '<=', $end);
}
- if (is_null($year)) {
- $query->whereNull('date');
- Log::debug('Year is NULL');
+ $set = $query->get(['tags.id', DB::raw('SUM(transactions.amount) as amount_sum')]);
+ $tagsWithAmounts = [];
+ /** @var Tag $tag */
+ foreach ($set as $tag) {
+ $tagsWithAmounts[$tag->id] = strval($tag->amount_sum);
}
- $tags = $query->orderBy('id', 'desc')->get();
+
+ $tags = $allTags->orderBy('tags.id', 'desc')->get(['tags.id', 'tags.tag']);
$temporary = [];
- Log::debug(sprintf('Found %d tags', $tags->count()));
/** @var Tag $tag */
foreach ($tags as $tag) {
- $amount = floatval($this->sumOfTag($tag, null, null));
- $min = $amount < $min || is_null($min) ? $amount : $min;
- $max = $amount > $max ? $amount : $max;
+ $amount = $tagsWithAmounts[$tag->id] ?? '0';
+ if (null === $min) {
+ $min = $amount;
+ }
+ $max = 1 === bccomp($amount, $max) ? $amount : $max;
+ $min = bccomp($amount, $min) === -1 ? $amount : $min;
+
$temporary[] = [
'amount' => $amount,
- 'tag' => $tag,
+ 'tag' => [
+ 'id' => $tag->id,
+ 'tag' => $tag->tag,
+ ],
];
- Log::debug(sprintf('Now working on tag %s with total amount %s', $tag->tag, $amount));
- Log::debug(sprintf('Minimum is now %f, maximum is %f', $min, $max));
}
+
/** @var array $entry */
foreach ($temporary as $entry) {
- $scale = $this->cloudScale([12, 20], $entry['amount'], $min, $max);
- $tagId = $entry['tag']->id;
+ $scale = $this->cloudScale([12, 20], floatval($entry['amount']), floatval($min), floatval($max));
+ $tagId = $entry['tag']['id'];
$return[$tagId] = [
'scale' => $scale,
'tag' => $entry['tag'],
];
}
- Log::debug('DONE with tagcloud');
-
return $return;
}
@@ -402,28 +413,23 @@ class TagRepository implements TagRepositoryInterface
*/
private function cloudScale(array $range, float $amount, float $min, float $max): int
{
- Log::debug(sprintf('Now in cloudScale with %s as amount and %f min, %f max', $amount, $min, $max));
$amountDiff = $max - $min;
- Log::debug(sprintf('AmountDiff is %f', $amountDiff));
// no difference? Every tag same range:
- if ($amountDiff === 0.0) {
- Log::debug(sprintf('AmountDiff is zero, return %d', $range[0]));
-
+ if (0.0 === $amountDiff) {
return $range[0];
}
$diff = $range[1] - $range[0];
$step = 1;
- if ($diff != 0) {
+ if (0 != $diff) {
$step = $amountDiff / $diff;
}
- if ($step == 0) {
+ if (0 == $step) {
$step = 1;
}
$extra = round($amount / $step);
-
return intval($range[0] + $extra);
}
}
diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php
index 610700f3be..814fb87036 100644
--- a/app/Repositories/Tag/TagRepositoryInterface.php
+++ b/app/Repositories/Tag/TagRepositoryInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\Tag;
@@ -29,15 +28,11 @@ use FireflyIII\Models\TransactionJournal;
use FireflyIII\User;
use Illuminate\Support\Collection;
-
/**
- * Interface TagRepositoryInterface
- *
- * @package FireflyIII\Repositories\Tag
+ * Interface TagRepositoryInterface.
*/
interface TagRepositoryInterface
{
-
/**
* This method will connect a journal with a tag.
*
diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php
index ce8591e899..45c567ca2d 100644
--- a/app/Repositories/User/UserRepository.php
+++ b/app/Repositories/User/UserRepository.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\User;
-
use FireflyIII\Models\BudgetLimit;
use FireflyIII\Models\Role;
use FireflyIII\User;
@@ -32,13 +30,10 @@ use Log;
use Preferences;
/**
- * Class UserRepository
- *
- * @package FireflyIII\Repositories\User
+ * Class UserRepository.
*/
class UserRepository implements UserRepositoryInterface
{
-
/**
* @return Collection
*/
@@ -154,7 +149,7 @@ class UserRepository implements UserRepositoryInterface
public function find(int $userId): User
{
$user = User::find($userId);
- if (!is_null($user)) {
+ if (null !== $user) {
return $user;
}
@@ -184,14 +179,14 @@ class UserRepository implements UserRepositoryInterface
// two factor:
$is2faEnabled = Preferences::getForUser($user, 'twoFactorAuthEnabled', false)->data;
- $has2faSecret = !is_null(Preferences::getForUser($user, 'twoFactorAuthSecret'));
+ $has2faSecret = null !== Preferences::getForUser($user, 'twoFactorAuthSecret');
$return['has_2fa'] = false;
if ($is2faEnabled && $has2faSecret) {
$return['has_2fa'] = true;
}
$return['is_admin'] = $user->hasRole('owner');
- $return['blocked'] = intval($user->blocked) === 1;
+ $return['blocked'] = 1 === intval($user->blocked);
$return['blocked_code'] = $user->blocked_code;
$return['accounts'] = $user->accounts()->count();
$return['journals'] = $user->transactionJournals()->count();
diff --git a/app/Repositories/User/UserRepositoryInterface.php b/app/Repositories/User/UserRepositoryInterface.php
index ac5be916af..8436eee569 100644
--- a/app/Repositories/User/UserRepositoryInterface.php
+++ b/app/Repositories/User/UserRepositoryInterface.php
@@ -18,23 +18,18 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Repositories\User;
-
use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface UserRepositoryInterface
- *
- * @package FireflyIII\Repositories\User
+ * Interface UserRepositoryInterface.
*/
interface UserRepositoryInterface
{
-
/**
* Returns a collection of all users.
*
diff --git a/app/Services/Bunq/Id/BunqId.php b/app/Services/Bunq/Id/BunqId.php
index ffbb7bd591..3ba845c54e 100644
--- a/app/Services/Bunq/Id/BunqId.php
+++ b/app/Services/Bunq/Id/BunqId.php
@@ -19,15 +19,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Id;
/**
- * Class BunqId
- *
- * @package FireflyIII\Services\Bunq\Id
+ * Class BunqId.
*/
class BunqId
{
@@ -49,6 +46,4 @@ class BunqId
{
$this->id = $id;
}
-
-
}
diff --git a/app/Services/Bunq/Id/DeviceServerId.php b/app/Services/Bunq/Id/DeviceServerId.php
index d0b65cbd07..a074753b55 100644
--- a/app/Services/Bunq/Id/DeviceServerId.php
+++ b/app/Services/Bunq/Id/DeviceServerId.php
@@ -19,18 +19,13 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Id;
-
/**
- * Class DeviceServerId
- *
- * @package Bunq\Id
+ * Class DeviceServerId.
*/
class DeviceServerId extends BunqId
{
-
}
diff --git a/app/Services/Bunq/Id/DeviceSessionId.php b/app/Services/Bunq/Id/DeviceSessionId.php
index db4e7fd37c..71ce07ebcc 100644
--- a/app/Services/Bunq/Id/DeviceSessionId.php
+++ b/app/Services/Bunq/Id/DeviceSessionId.php
@@ -18,18 +18,13 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Id;
-
/**
- * Class DeviceSessionId
- *
- * @package Bunq\Id
+ * Class DeviceSessionId.
*/
class DeviceSessionId extends BunqId
{
-
}
diff --git a/app/Services/Bunq/Id/InstallationId.php b/app/Services/Bunq/Id/InstallationId.php
index 45704df8a1..48a9d73170 100644
--- a/app/Services/Bunq/Id/InstallationId.php
+++ b/app/Services/Bunq/Id/InstallationId.php
@@ -18,18 +18,13 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Id;
-
/**
- * Class InstallationId
- *
- * @package Bunq\Id
+ * Class InstallationId.
*/
class InstallationId extends BunqId
{
-
}
diff --git a/app/Services/Bunq/Object/Alias.php b/app/Services/Bunq/Object/Alias.php
index 61fead70b3..7819c6bd48 100644
--- a/app/Services/Bunq/Object/Alias.php
+++ b/app/Services/Bunq/Object/Alias.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
/**
- * Class Alias
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class Alias.
*/
class Alias extends BunqObject
{
@@ -74,6 +71,4 @@ class Alias extends BunqObject
{
return $this->value;
}
-
-
}
diff --git a/app/Services/Bunq/Object/Amount.php b/app/Services/Bunq/Object/Amount.php
index cc28b97e2e..2504bffb26 100644
--- a/app/Services/Bunq/Object/Amount.php
+++ b/app/Services/Bunq/Object/Amount.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
/**
- * Class Amount
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class Amount.
*/
class Amount extends BunqObject
{
@@ -63,6 +60,4 @@ class Amount extends BunqObject
{
return $this->value;
}
-
-
}
diff --git a/app/Services/Bunq/Object/Avatar.php b/app/Services/Bunq/Object/Avatar.php
index 9f294302cf..0ac804bacd 100644
--- a/app/Services/Bunq/Object/Avatar.php
+++ b/app/Services/Bunq/Object/Avatar.php
@@ -18,17 +18,13 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
/**
- * Class Avatar
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class Avatar.
*/
class Avatar extends BunqObject
{
-
}
diff --git a/app/Services/Bunq/Object/BunqObject.php b/app/Services/Bunq/Object/BunqObject.php
index 04dd2eed22..a14df09963 100644
--- a/app/Services/Bunq/Object/BunqObject.php
+++ b/app/Services/Bunq/Object/BunqObject.php
@@ -18,17 +18,13 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
/**
- * Class BunqObject
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class BunqObject.
*/
class BunqObject
{
-
}
diff --git a/app/Services/Bunq/Object/DeviceServer.php b/app/Services/Bunq/Object/DeviceServer.php
index 176532e91c..f884631c0a 100644
--- a/app/Services/Bunq/Object/DeviceServer.php
+++ b/app/Services/Bunq/Object/DeviceServer.php
@@ -18,28 +18,26 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
-
use Carbon\Carbon;
use FireflyIII\Services\Bunq\Id\DeviceServerId;
class DeviceServer extends BunqObject
{
- /** @var Carbon */
+ /** @var Carbon */
private $created;
- /** @var string */
+ /** @var string */
private $description;
- /** @var DeviceServerId */
+ /** @var DeviceServerId */
private $id;
- /** @var string */
+ /** @var string */
private $ip;
- /** @var string */
+ /** @var string */
private $status;
- /** @var Carbon */
+ /** @var Carbon */
private $updated;
public function __construct(array $data)
@@ -69,6 +67,4 @@ class DeviceServer extends BunqObject
{
return $this->ip;
}
-
-
}
diff --git a/app/Services/Bunq/Object/MonetaryAccountBank.php b/app/Services/Bunq/Object/MonetaryAccountBank.php
index 56e05debf8..d5b60d6652 100644
--- a/app/Services/Bunq/Object/MonetaryAccountBank.php
+++ b/app/Services/Bunq/Object/MonetaryAccountBank.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
@@ -26,35 +25,33 @@ namespace FireflyIII\Services\Bunq\Object;
use Carbon\Carbon;
/**
- * Class MonetaryAccountBank
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class MonetaryAccountBank.
*/
class MonetaryAccountBank extends BunqObject
{
/** @var array */
private $aliases = [];
- /** @var Avatar */
+ /** @var Avatar */
private $avatar;
- /** @var Amount */
+ /** @var Amount */
private $balance;
/** @var Carbon */
private $created;
/** @var string */
private $currency = '';
- /** @var Amount */
+ /** @var Amount */
private $dailyLimit;
- /** @var Amount */
+ /** @var Amount */
private $dailySpent;
/** @var string */
private $description = '';
/** @var int */
private $id = 0;
- /** @var MonetaryAccountProfile */
+ /** @var MonetaryAccountProfile */
private $monetaryAccountProfile;
/** @var array */
private $notificationFilters = [];
- /** @var Amount */
+ /** @var Amount */
private $overdraftLimit;
/** @var string */
private $publicUuid = '';
@@ -62,7 +59,7 @@ class MonetaryAccountBank extends BunqObject
private $reason = '';
/** @var string */
private $reasonDescription = '';
- /** @var MonetaryAccountSetting */
+ /** @var MonetaryAccountSetting */
private $setting;
/** @var string */
private $status = '';
@@ -159,5 +156,4 @@ class MonetaryAccountBank extends BunqObject
{
return $this->setting;
}
-
}
diff --git a/app/Services/Bunq/Object/MonetaryAccountProfile.php b/app/Services/Bunq/Object/MonetaryAccountProfile.php
index 83cfffc668..8a4f436f43 100644
--- a/app/Services/Bunq/Object/MonetaryAccountProfile.php
+++ b/app/Services/Bunq/Object/MonetaryAccountProfile.php
@@ -18,21 +18,18 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
/**
- * Class MonetaryAccountProfile
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class MonetaryAccountProfile.
*/
class MonetaryAccountProfile extends BunqObject
{
/** @var string */
private $profileActionRequired = '';
- /** @var Amount */
+ /** @var Amount */
private $profileAmountRequired;
private $profileDrain;
private $profileFill;
@@ -51,5 +48,4 @@ class MonetaryAccountProfile extends BunqObject
return;
}
-
}
diff --git a/app/Services/Bunq/Object/MonetaryAccountSetting.php b/app/Services/Bunq/Object/MonetaryAccountSetting.php
index ebf48e9970..58f44f80b0 100644
--- a/app/Services/Bunq/Object/MonetaryAccountSetting.php
+++ b/app/Services/Bunq/Object/MonetaryAccountSetting.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
/**
- * Class MonetaryAccountSetting
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class MonetaryAccountSetting.
*/
class MonetaryAccountSetting extends BunqObject
{
@@ -74,6 +71,4 @@ class MonetaryAccountSetting extends BunqObject
{
return $this->restrictionChat;
}
-
-
}
diff --git a/app/Services/Bunq/Object/NotificationFilter.php b/app/Services/Bunq/Object/NotificationFilter.php
index be411c7544..ffcf92362c 100644
--- a/app/Services/Bunq/Object/NotificationFilter.php
+++ b/app/Services/Bunq/Object/NotificationFilter.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
/**
- * Class NotificationFilter
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class NotificationFilter.
*/
class NotificationFilter extends BunqObject
{
@@ -37,6 +34,6 @@ class NotificationFilter extends BunqObject
*/
public function __construct(array $data)
{
+ unset($data);
}
-
}
diff --git a/app/Services/Bunq/Object/ServerPublicKey.php b/app/Services/Bunq/Object/ServerPublicKey.php
index dc72bc6440..b70a6ac01e 100644
--- a/app/Services/Bunq/Object/ServerPublicKey.php
+++ b/app/Services/Bunq/Object/ServerPublicKey.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
/**
- * Class ServerPublicKey
- *
- * @package Bunq\Object
+ * Class ServerPublicKey.
*/
class ServerPublicKey extends BunqObject
{
@@ -58,6 +55,4 @@ class ServerPublicKey extends BunqObject
{
$this->publicKey = $publicKey;
}
-
-
}
diff --git a/app/Services/Bunq/Object/UserCompany.php b/app/Services/Bunq/Object/UserCompany.php
index fab73dc3ca..36f37ce4a4 100644
--- a/app/Services/Bunq/Object/UserCompany.php
+++ b/app/Services/Bunq/Object/UserCompany.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
@@ -26,9 +25,7 @@ namespace FireflyIII\Services\Bunq\Object;
use Carbon\Carbon;
/**
- * Class UserCompany
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class UserCompany.
*/
class UserCompany extends BunqObject
{
@@ -69,7 +66,7 @@ class UserCompany extends BunqObject
private $status = '';
/** @var string */
private $subStatus = '';
- /** @var string */
+ /** @var string */
private $typeOfBusinessEntity = '';
/** @var array */
private $ubos = [];
@@ -102,7 +99,6 @@ class UserCompany extends BunqObject
$this->sectorOfIndustry = $data['sector_of_industry'] ?? '';
$this->counterBankIban = $data['counter_bank_iban'];
$this->name = $data['name'];
-
}
/**
@@ -112,6 +108,4 @@ class UserCompany extends BunqObject
{
return $this->id;
}
-
-
}
diff --git a/app/Services/Bunq/Object/UserLight.php b/app/Services/Bunq/Object/UserLight.php
index 0f64cd8737..060a257282 100644
--- a/app/Services/Bunq/Object/UserLight.php
+++ b/app/Services/Bunq/Object/UserLight.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
@@ -26,9 +25,7 @@ namespace FireflyIII\Services\Bunq\Object;
use Carbon\Carbon;
/**
- * Class UserLight
- *
- * @package FireflyIII\Services\Bunq\Object
+ * Class UserLight.
*/
class UserLight extends BunqObject
{
@@ -62,7 +59,7 @@ class UserLight extends BunqObject
*/
public function __construct(array $data)
{
- if (count($data) === 0) {
+ if (0 === count($data)) {
return;
}
$this->id = intval($data['id']);
@@ -77,5 +74,4 @@ class UserLight extends BunqObject
$this->legalName = $data['legal_name'];
// aliases
}
-
}
diff --git a/app/Services/Bunq/Object/UserPerson.php b/app/Services/Bunq/Object/UserPerson.php
index 73482d2f6b..223dfef779 100644
--- a/app/Services/Bunq/Object/UserPerson.php
+++ b/app/Services/Bunq/Object/UserPerson.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
@@ -26,9 +25,7 @@ namespace FireflyIII\Services\Bunq\Object;
use Carbon\Carbon;
/**
- * Class UserPerson
- *
- * @package Bunq\Object
+ * Class UserPerson.
*/
class UserPerson extends BunqObject
{
@@ -101,7 +98,7 @@ class UserPerson extends BunqObject
*/
public function __construct(array $data)
{
- if (count($data) === 0) {
+ if (0 === count($data)) {
return;
}
$this->id = intval($data['id']);
@@ -147,6 +144,4 @@ class UserPerson extends BunqObject
{
return $this->id;
}
-
-
}
diff --git a/app/Services/Bunq/Request/BunqRequest.php b/app/Services/Bunq/Request/BunqRequest.php
index 9ff87c3567..dcc4a23729 100644
--- a/app/Services/Bunq/Request/BunqRequest.php
+++ b/app/Services/Bunq/Request/BunqRequest.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
@@ -31,15 +30,13 @@ use Requests;
use Requests_Exception;
/**
- * Class BunqRequest
- *
- * @package Bunq\Request
+ * Class BunqRequest.
*/
abstract class BunqRequest
{
/** @var string */
protected $secret = '';
- /** @var ServerPublicKey */
+ /** @var ServerPublicKey */
protected $serverPublicKey;
/** @var string */
private $privateKey = '';
@@ -111,14 +108,15 @@ abstract class BunqRequest
* @param string $data
*
* @return string
+ *
* @throws FireflyException
*/
protected function generateSignature(string $method, string $uri, array $headers, string $data): string
{
- if (strlen($this->privateKey) === 0) {
+ if (0 === strlen($this->privateKey)) {
throw new FireflyException('No private key present.');
}
- if (strtolower($method) === 'get' || strtolower($method) === 'delete') {
+ if ('get' === strtolower($method) || 'delete' === strtolower($method)) {
$data = '';
}
@@ -127,7 +125,7 @@ abstract class BunqRequest
$headersToSign = ['Cache-Control', 'User-Agent'];
ksort($headers);
foreach ($headers as $name => $value) {
- if (in_array($name, $headersToSign) || substr($name, 0, 7) === 'X-Bunq-') {
+ if (in_array($name, $headersToSign) || 'X-Bunq-' === substr($name, 0, 7)) {
$toSign .= sprintf("%s: %s\n", $name, $value);
}
}
@@ -202,11 +200,12 @@ abstract class BunqRequest
* @param array $headers
*
* @return array
+ *
* @throws Exception
*/
protected function sendSignedBunqDelete(string $uri, array $headers): array
{
- if (strlen($this->server) === 0) {
+ if (0 === strlen($this->server)) {
throw new FireflyException('No bunq server defined');
}
@@ -216,7 +215,7 @@ abstract class BunqRequest
try {
$response = Requests::delete($fullUri, $headers);
} catch (Requests_Exception $e) {
- return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()],]];
+ return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()]]];
}
$body = $response->body;
@@ -235,7 +234,6 @@ abstract class BunqRequest
throw new FireflyException(sprintf('Could not verify signature for request to "%s"', $uri));
}
-
return $array;
}
@@ -245,11 +243,12 @@ abstract class BunqRequest
* @param array $headers
*
* @return array
+ *
* @throws Exception
*/
protected function sendSignedBunqGet(string $uri, array $data, array $headers): array
{
- if (strlen($this->server) === 0) {
+ if (0 === strlen($this->server)) {
throw new FireflyException('No bunq server defined');
}
@@ -260,7 +259,7 @@ abstract class BunqRequest
try {
$response = Requests::get($fullUri, $headers);
} catch (Requests_Exception $e) {
- return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()],]];
+ return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()]]];
}
$body = $response->body;
@@ -287,6 +286,7 @@ abstract class BunqRequest
* @param array $headers
*
* @return array
+ *
* @throws Exception
*/
protected function sendSignedBunqPost(string $uri, array $data, array $headers): array
@@ -298,7 +298,7 @@ abstract class BunqRequest
try {
$response = Requests::post($fullUri, $headers, $body);
} catch (Requests_Exception $e) {
- return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()],]];
+ return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()]]];
}
$body = $response->body;
@@ -316,7 +316,6 @@ abstract class BunqRequest
throw new FireflyException(sprintf('Could not verify signature for request to "%s"', $uri));
}
-
return $array;
}
@@ -332,7 +331,7 @@ abstract class BunqRequest
try {
$response = Requests::delete($fullUri, $headers);
} catch (Requests_Exception $e) {
- return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()],]];
+ return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()]]];
}
$body = $response->body;
$array = json_decode($body, true);
@@ -362,7 +361,7 @@ abstract class BunqRequest
try {
$response = Requests::post($fullUri, $headers, $body);
} catch (Requests_Exception $e) {
- return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()],]];
+ return ['Error' => [0 => ['error_description' => $e->getMessage(), 'error_description_translated' => $e->getMessage()]]];
}
$body = $response->body;
$array = json_decode($body, true);
@@ -375,7 +374,6 @@ abstract class BunqRequest
$this->throwResponseError($array);
}
-
return $array;
}
@@ -387,7 +385,7 @@ abstract class BunqRequest
private function isErrorResponse(array $response): bool
{
$key = key($response);
- if ($key === 'Error') {
+ if ('Error' === $key) {
return true;
}
@@ -431,6 +429,7 @@ abstract class BunqRequest
* @param int $statusCode
*
* @return bool
+ *
* @throws Exception
*/
private function verifyServerSignature(string $body, array $headers, int $statusCode): bool
@@ -440,15 +439,14 @@ abstract class BunqRequest
$verifyHeaders = [];
// false when no public key is present
- if (is_null($this->serverPublicKey)) {
+ if (null === $this->serverPublicKey) {
Log::error('No public key present in class, so return FALSE.');
return false;
}
foreach ($headers as $header => $value) {
-
// skip non-bunq headers or signature
- if (substr($header, 0, 7) !== 'x-bunq-' || $header === 'x-bunq-server-signature') {
+ if ('x-bunq-' !== substr($header, 0, 7) || 'x-bunq-server-signature' === $header) {
continue;
}
// need to have upper case variant of header:
diff --git a/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php b/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php
index fb23e334c5..750baef294 100644
--- a/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php
+++ b/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
@@ -27,13 +26,11 @@ use FireflyIII\Services\Bunq\Token\SessionToken;
use Log;
/**
- * Class DeleteDeviceSessionRequest
- *
- * @package FireflyIII\Services\Bunq\Request
+ * Class DeleteDeviceSessionRequest.
*/
class DeleteDeviceSessionRequest extends BunqRequest
{
- /** @var SessionToken */
+ /** @var SessionToken */
private $sessionToken;
/**
diff --git a/app/Services/Bunq/Request/DeviceServerRequest.php b/app/Services/Bunq/Request/DeviceServerRequest.php
index a2aa6f9d7d..a6d817bf7b 100644
--- a/app/Services/Bunq/Request/DeviceServerRequest.php
+++ b/app/Services/Bunq/Request/DeviceServerRequest.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
@@ -27,17 +26,15 @@ use FireflyIII\Services\Bunq\Id\DeviceServerId;
use FireflyIII\Services\Bunq\Token\InstallationToken;
/**
- * Class DeviceServerRequest
- *
- * @package Bunq\Request
+ * Class DeviceServerRequest.
*/
class DeviceServerRequest extends BunqRequest
{
/** @var string */
private $description = '';
- /** @var DeviceServerId */
+ /** @var DeviceServerId */
private $deviceServerId;
- /** @var InstallationToken */
+ /** @var InstallationToken */
private $installationToken;
/** @var array */
private $permittedIps = [];
diff --git a/app/Services/Bunq/Request/DeviceSessionRequest.php b/app/Services/Bunq/Request/DeviceSessionRequest.php
index 88910c26af..603b795ac6 100644
--- a/app/Services/Bunq/Request/DeviceSessionRequest.php
+++ b/app/Services/Bunq/Request/DeviceSessionRequest.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
-
use FireflyIII\Services\Bunq\Id\DeviceSessionId;
use FireflyIII\Services\Bunq\Object\UserCompany;
use FireflyIII\Services\Bunq\Object\UserPerson;
@@ -32,21 +30,19 @@ use FireflyIII\Services\Bunq\Token\SessionToken;
use Log;
/**
- * Class DeviceSessionRequest
- *
- * @package FireflyIII\Services\Bunq\Request
+ * Class DeviceSessionRequest.
*/
class DeviceSessionRequest extends BunqRequest
{
- /** @var DeviceSessionId */
+ /** @var DeviceSessionId */
private $deviceSessionId;
- /** @var InstallationToken */
+ /** @var InstallationToken */
private $installationToken;
- /** @var SessionToken */
+ /** @var SessionToken */
private $sessionToken;
- /** @var UserCompany */
+ /** @var UserCompany */
private $userCompany;
- /** @var UserPerson */
+ /** @var UserPerson */
private $userPerson;
/**
@@ -60,7 +56,6 @@ class DeviceSessionRequest extends BunqRequest
$headers['X-Bunq-Client-Authentication'] = $this->installationToken->getToken();
$response = $this->sendSignedBunqPost($uri, $data, $headers);
-
$this->deviceSessionId = $this->extractDeviceSessionId($response);
$this->sessionToken = $this->extractSessionToken($response);
$this->userPerson = $this->extractUserPerson($response);
@@ -138,7 +133,6 @@ class DeviceSessionRequest extends BunqRequest
$data = $this->getKeyFromResponse('UserCompany', $response);
$userCompany = new UserCompany($data);
-
return $userCompany;
}
@@ -152,9 +146,6 @@ class DeviceSessionRequest extends BunqRequest
$data = $this->getKeyFromResponse('UserPerson', $response);
$userPerson = new UserPerson($data);
-
return $userPerson;
}
-
-
}
diff --git a/app/Services/Bunq/Request/InstallationTokenRequest.php b/app/Services/Bunq/Request/InstallationTokenRequest.php
index 604df78d4c..8678ebb0c3 100644
--- a/app/Services/Bunq/Request/InstallationTokenRequest.php
+++ b/app/Services/Bunq/Request/InstallationTokenRequest.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
@@ -29,15 +28,13 @@ use FireflyIII\Services\Bunq\Token\InstallationToken;
use Log;
/**
- * Class InstallationTokenRequest
- *
- * @package FireflyIII\Services\Bunq\Request
+ * Class InstallationTokenRequest.
*/
class InstallationTokenRequest extends BunqRequest
{
/** @var InstallationId */
private $installationId;
- /** @var InstallationToken */
+ /** @var InstallationToken */
private $installationToken;
/** @var string */
private $publicKey = '';
@@ -48,7 +45,7 @@ class InstallationTokenRequest extends BunqRequest
public function call(): void
{
$uri = '/v1/installation';
- $data = ['client_public_key' => $this->publicKey,];
+ $data = ['client_public_key' => $this->publicKey];
$headers = $this->getDefaultHeaders();
$response = $this->sendUnsignedBunqPost($uri, $data, $headers);
Log::debug('Installation request response', $response);
@@ -108,7 +105,6 @@ class InstallationTokenRequest extends BunqRequest
$installationId->setId(intval($data['id']));
return $installationId;
-
}
/**
@@ -118,7 +114,6 @@ class InstallationTokenRequest extends BunqRequest
*/
private function extractInstallationToken(array $response): InstallationToken
{
-
$data = $this->getKeyFromResponse('Token', $response);
$installationToken = new InstallationToken($data);
diff --git a/app/Services/Bunq/Request/ListDeviceServerRequest.php b/app/Services/Bunq/Request/ListDeviceServerRequest.php
index 40957ea306..4c82e91c8e 100644
--- a/app/Services/Bunq/Request/ListDeviceServerRequest.php
+++ b/app/Services/Bunq/Request/ListDeviceServerRequest.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
@@ -28,15 +27,13 @@ use FireflyIII\Services\Bunq\Token\InstallationToken;
use Illuminate\Support\Collection;
/**
- * Class ListDeviceServerRequest
- *
- * @package FireflyIII\Services\Bunq\Request
+ * Class ListDeviceServerRequest.
*/
class ListDeviceServerRequest extends BunqRequest
{
/** @var Collection */
private $devices;
- /** @var InstallationToken */
+ /** @var InstallationToken */
private $installationToken;
public function __construct()
diff --git a/app/Services/Bunq/Request/ListMonetaryAccountRequest.php b/app/Services/Bunq/Request/ListMonetaryAccountRequest.php
index f62b3bb4b0..bfdf871f32 100644
--- a/app/Services/Bunq/Request/ListMonetaryAccountRequest.php
+++ b/app/Services/Bunq/Request/ListMonetaryAccountRequest.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
@@ -28,15 +27,13 @@ use FireflyIII\Services\Bunq\Token\SessionToken;
use Illuminate\Support\Collection;
/**
- * Class ListMonetaryAccountRequest
- *
- * @package FireflyIII\Services\Bunq\Request
+ * Class ListMonetaryAccountRequest.
*/
class ListMonetaryAccountRequest extends BunqRequest
{
- /** @var Collection */
+ /** @var Collection */
private $monetaryAccounts;
- /** @var SessionToken */
+ /** @var SessionToken */
private $sessionToken;
/** @var int */
private $userId = 0;
@@ -86,5 +83,4 @@ class ListMonetaryAccountRequest extends BunqRequest
{
$this->userId = $userId;
}
-
}
diff --git a/app/Services/Bunq/Request/ListUserRequest.php b/app/Services/Bunq/Request/ListUserRequest.php
index 066f6ee785..8aa9bf2407 100644
--- a/app/Services/Bunq/Request/ListUserRequest.php
+++ b/app/Services/Bunq/Request/ListUserRequest.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
@@ -29,19 +28,17 @@ use FireflyIII\Services\Bunq\Object\UserPerson;
use FireflyIII\Services\Bunq\Token\SessionToken;
/**
- * Class ListUserRequest
- *
- * @package FireflyIII\Services\Bunq\Request
+ * Class ListUserRequest.
*/
class ListUserRequest extends BunqRequest
{
- /** @var SessionToken */
+ /** @var SessionToken */
private $sessionToken;
- /** @var UserCompany */
+ /** @var UserCompany */
private $userCompany;
- /** @var UserLight */
+ /** @var UserLight */
private $userLight;
- /** @var UserPerson */
+ /** @var UserPerson */
private $userPerson;
/**
@@ -90,7 +87,6 @@ class ListUserRequest extends BunqRequest
return $this->userPerson;
}
-
/**
* @param SessionToken $sessionToken
*/
diff --git a/app/Services/Bunq/Token/BunqToken.php b/app/Services/Bunq/Token/BunqToken.php
index 5dfc0615cf..e83537fc7a 100644
--- a/app/Services/Bunq/Token/BunqToken.php
+++ b/app/Services/Bunq/Token/BunqToken.php
@@ -18,28 +18,24 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Token;
-
use Carbon\Carbon;
/**
- * Class BunqToken
- *
- * @package Bunq\Token
+ * Class BunqToken.
*/
class BunqToken
{
- /** @var Carbon */
+ /** @var Carbon */
private $created;
/** @var int */
private $id = 0;
/** @var string */
private $token = '';
- /** @var Carbon */
+ /** @var Carbon */
private $updated;
/**
@@ -96,5 +92,4 @@ class BunqToken
return;
}
-
}
diff --git a/app/Services/Bunq/Token/InstallationToken.php b/app/Services/Bunq/Token/InstallationToken.php
index de3d1b59bc..4bf38c4d3c 100644
--- a/app/Services/Bunq/Token/InstallationToken.php
+++ b/app/Services/Bunq/Token/InstallationToken.php
@@ -18,18 +18,13 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Token;
/**
- * Class InstallationToken
- *
- * @package FireflyIII\Services\Bunq\Token
+ * Class InstallationToken.
*/
class InstallationToken extends BunqToken
{
-
-
}
diff --git a/app/Services/Bunq/Token/SessionToken.php b/app/Services/Bunq/Token/SessionToken.php
index 6113949fd9..129216906c 100644
--- a/app/Services/Bunq/Token/SessionToken.php
+++ b/app/Services/Bunq/Token/SessionToken.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace Bunq\Token;
@@ -26,11 +25,8 @@ namespace Bunq\Token;
namespace FireflyIII\Services\Bunq\Token;
/**
- * Class SessionToken
- *
- * @package FireflyIII\Services\Bunq\Token
+ * Class SessionToken.
*/
class SessionToken extends BunqToken
{
-
}
diff --git a/app/Services/Currency/ExchangeRateInterface.php b/app/Services/Currency/ExchangeRateInterface.php
index 1d674059e3..5e9bdfd080 100644
--- a/app/Services/Currency/ExchangeRateInterface.php
+++ b/app/Services/Currency/ExchangeRateInterface.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Currency;
-
use Carbon\Carbon;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\TransactionCurrency;
@@ -46,5 +44,4 @@ interface ExchangeRateInterface
* @return mixed
*/
public function setUser(User $user);
-
}
diff --git a/app/Services/Currency/FixerIO.php b/app/Services/Currency/FixerIO.php
index 09f626ad9b..20f0e4bbfe 100644
--- a/app/Services/Currency/FixerIO.php
+++ b/app/Services/Currency/FixerIO.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Currency;
-
use Carbon\Carbon;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\TransactionCurrency;
@@ -33,20 +31,17 @@ use Requests;
use Requests_Exception;
/**
- * Class FixerIO
- *
- * @package FireflyIII\Services\Currency
+ * Class FixerIO.
*/
class FixerIO implements ExchangeRateInterface
{
- /** @var User */
+ /** @var User */
protected $user;
public function getRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date): CurrencyExchangeRate
{
$uri = sprintf('https://api.fixer.io/%s?base=%s&symbols=%s', $date->format('Y-m-d'), $fromCurrency->code, $toCurrency->code);
$statusCode = -1;
- $body = '';
try {
$result = Requests::get($uri);
$statusCode = $result->status_code;
@@ -58,14 +53,14 @@ class FixerIO implements ExchangeRateInterface
// Requests_Exception
$rate = 1.0;
$content = null;
- if ($statusCode !== 200) {
+ if (200 !== $statusCode) {
Log::error(sprintf('Something went wrong. Received error code %d and body "%s" from FixerIO.', $statusCode, $body));
}
// get rate from body:
- if ($statusCode === 200) {
+ if (200 === $statusCode) {
$content = json_decode($body, true);
}
- if (!is_null($content)) {
+ if (null !== $content) {
$code = $toCurrency->code;
$rate = isset($content['rates'][$code]) ? $content['rates'][$code] : '1';
}
diff --git a/app/Services/Password/PwndVerifier.php b/app/Services/Password/PwndVerifier.php
index bf4734b0e3..61cf6947b9 100644
--- a/app/Services/Password/PwndVerifier.php
+++ b/app/Services/Password/PwndVerifier.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Password;
@@ -28,13 +27,10 @@ use Requests;
use Requests_Exception;
/**
- * Class PwndVerifier
- *
- * @package FireflyIII\Services\Password
+ * Class PwndVerifier.
*/
class PwndVerifier implements Verifier
{
-
/**
* Verify the given password against (some) service.
*
@@ -54,7 +50,7 @@ class PwndVerifier implements Verifier
return true;
}
Log::debug(sprintf('Status code returned is %d', $result->status_code));
- if ($result->status_code === 404) {
+ if (404 === $result->status_code) {
return true;
}
diff --git a/app/Services/Password/Verifier.php b/app/Services/Password/Verifier.php
index a8636dbc14..54b5f63eb7 100644
--- a/app/Services/Password/Verifier.php
+++ b/app/Services/Password/Verifier.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Services\Password;
/**
- * Interface Verifier
- *
- * @package FireflyIII\Services\Password
+ * Interface Verifier.
*/
interface Verifier
{
@@ -38,5 +35,4 @@ interface Verifier
* @return bool
*/
public function validPassword(string $password): bool;
-
}
diff --git a/app/Support/Amount.php b/app/Support/Amount.php
index bd60a13666..16b251fdec 100644
--- a/app/Support/Amount.php
+++ b/app/Support/Amount.php
@@ -18,33 +18,26 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
use FireflyIII\Exceptions\FireflyException;
-use FireflyIII\Models\Transaction as TransactionModel;
use FireflyIII\Models\TransactionCurrency;
-use FireflyIII\Models\TransactionJournal;
-use FireflyIII\Models\TransactionType;
use FireflyIII\User;
use Illuminate\Support\Collection;
use Preferences as Prefs;
/**
- * Class Amount
- *
- * @package FireflyIII\Support
+ * Class Amount.
*/
class Amount
{
-
/**
* bool $sepBySpace is $localeconv['n_sep_by_space']
* int $signPosn = $localeconv['n_sign_posn']
* string $sign = $localeconv['negative_sign']
- * bool $csPrecedes = $localeconv['n_cs_precedes']
+ * bool $csPrecedes = $localeconv['n_cs_precedes'].
*
* @param bool $sepBySpace
* @param int $signPosn
@@ -77,7 +70,6 @@ class Amount
// AD%v_B%sCE (amount before currency)
// the _ is the optional space
-
// switch on how to display amount:
switch ($signPosn) {
default:
@@ -143,8 +135,7 @@ class Amount
$result = $formatted . $space . $format->symbol;
}
- if ($coloured === true) {
-
+ if (true === $coloured) {
if ($amount > 0) {
return sprintf('%s ', $result);
}
@@ -153,8 +144,6 @@ class Amount
}
return sprintf('%s ', $result);
-
-
}
return $result;
@@ -173,7 +162,6 @@ class Amount
*/
public function getCurrencyCode(): string
{
-
$cache = new CacheProperties;
$cache->addProperty('getCurrencyCode');
if ($cache->has()) {
@@ -183,7 +171,6 @@ class Amount
$currency = TransactionCurrency::where('code', $currencyPreference->data)->first();
if ($currency) {
-
$cache->store($currency->code);
return $currency->code;
@@ -214,6 +201,7 @@ class Amount
/**
* @return \FireflyIII\Models\TransactionCurrency
+ *
* @throws FireflyException
*/
public function getDefaultCurrency(): TransactionCurrency
@@ -227,6 +215,7 @@ class Amount
* @param User $user
*
* @return \FireflyIII\Models\TransactionCurrency
+ *
* @throws FireflyException
*/
public function getDefaultCurrencyByUser(User $user): TransactionCurrency
@@ -239,7 +228,7 @@ class Amount
}
$currencyPreference = Prefs::getForUser($user, 'currencyPreference', config('firefly.default_currency', 'EUR'));
$currency = TransactionCurrency::where('code', $currencyPreference->data)->first();
- if (is_null($currency)) {
+ if (null === $currency) {
throw new FireflyException(sprintf('No currency found with code "%s"', $currencyPreference->data));
}
$cache->store($currency);
@@ -257,8 +246,8 @@ class Amount
*/
public function getJsConfig(array $config): array
{
- $negative = self::getAmountJsConfig($config['n_sep_by_space'] === 1, $config['n_sign_posn'], $config['negative_sign'], $config['n_cs_precedes'] === 1);
- $positive = self::getAmountJsConfig($config['p_sep_by_space'] === 1, $config['p_sign_posn'], $config['positive_sign'], $config['p_cs_precedes'] === 1);
+ $negative = self::getAmountJsConfig(1 === $config['n_sep_by_space'], $config['n_sign_posn'], $config['negative_sign'], 1 === $config['n_cs_precedes']);
+ $positive = self::getAmountJsConfig(1 === $config['p_sep_by_space'], $config['p_sign_posn'], $config['positive_sign'], 1 === $config['p_cs_precedes']);
return [
'pos' => $positive,
@@ -266,141 +255,4 @@ class Amount
'zero' => $positive,
];
}
-
- /**
- * @param TransactionJournal $journal
- * @param bool $coloured
- *
- * @return string
- */
- public function journalAmount(TransactionJournal $journal, bool $coloured = true): string
- {
- $amounts = [];
- $transactions = $journal->transactions()->where('amount', '>', 0)->get();
- /** @var TransactionModel $transaction */
- foreach ($transactions as $transaction) {
- // model some fields to fit "transactionAmount()":
- $transaction->transaction_amount = $transaction->amount;
- $transaction->transaction_foreign_amount = $transaction->foreign_amount;
- $transaction->transaction_type_type = $journal->transactionType->type;
- $transaction->transaction_currency_symbol = $transaction->transactionCurrency->symbol;
- $transaction->transaction_currency_dp = $transaction->transactionCurrency->decimal_places;
- if (!is_null($transaction->foreign_currency_id)) {
- $transaction->foreign_currency_symbol = $transaction->foreignCurrency->symbol;
- $transaction->foreign_currency_dp = $transaction->foreignCurrency->decimal_places;
- }
-
- $amounts[] = $this->transactionAmount($transaction, $coloured);
- }
-
- return join(' / ', $amounts);
-
- }
-
- /**
- * @param TransactionJournal $journal
- * @param bool $coloured
- *
- * @return string
- */
- public function journalTotalAmount(TransactionJournal $journal, bool $coloured = true): string
- {
- $transactions = $journal->transactions()->where('amount', '>', 0)->get();
- $totals = [];
- $type = $journal->transactionType->type;
- /** @var TransactionModel $transaction */
- foreach ($transactions as $transaction) {
- // model some fields to fit "transactionAmount()":
- $currencyId = $transaction->transaction_currency_id;
-
- if (!isset($totals[$currencyId])) {
- $totals[$currencyId] = [
- 'amount' => '0',
- 'symbol' => $transaction->transactionCurrency->symbol,
- 'dp' => $transaction->transactionCurrency->decimal_places,
- ];
- }
- $totals[$currencyId]['amount'] = bcadd($transaction->amount, $totals[$currencyId]['amount']);
-
- if (!is_null($transaction->foreign_currency_id)) {
- $foreignId = $transaction->foreign_currency_id;
- if (!isset($totals[$foreignId])) {
- $totals[$foreignId] = [
- 'amount' => '0',
- 'symbol' => $transaction->foreignCurrency->symbol,
- 'dp' => $transaction->foreignCurrency->decimal_places,
- ];
- }
- $totals[$foreignId]['amount'] = bcadd($transaction->foreign_amount, $totals[$foreignId]['amount']);
- }
- }
- $array = [];
- foreach ($totals as $total) {
- $currency = new TransactionCurrency;
- $currency->symbol = $total['symbol'];
- $currency->decimal_places = $total['dp'];
- if ($type === TransactionType::WITHDRAWAL) {
- $total['amount'] = bcmul($total['amount'], '-1');
- }
- $array[] = $this->formatAnything($currency, $total['amount']);
- }
-
- return join(' / ', $array);
-
- }
-
- /**
- * This formats a transaction, IF that transaction has been "collected" using the JournalCollector.
- *
- * @param TransactionModel $transaction
- * @param bool $coloured
- *
- * @return string
- */
- public function transactionAmount(TransactionModel $transaction, bool $coloured = true): string
- {
- $amount = bcmul(app('steam')->positive(strval($transaction->transaction_amount)), '-1');
-
- $format = '%s';
-
- if ($transaction->transaction_type_type === TransactionType::DEPOSIT) {
- $amount = bcmul($amount, '-1');
- }
-
- if ($transaction->transaction_type_type === TransactionType::TRANSFER) {
- $amount = app('steam')->positive($amount);
- $coloured = false;
- $format = '%s ';
- }
- if ($transaction->transaction_type_type === TransactionType::OPENING_BALANCE) {
- $amount = strval($transaction->transaction_amount);
- }
-
- $currency = new TransactionCurrency;
- $currency->symbol = $transaction->transaction_currency_symbol;
- $currency->decimal_places = $transaction->transaction_currency_dp;
- $str = sprintf($format, $this->formatAnything($currency, $amount, $coloured));
-
-
- if (!is_null($transaction->transaction_foreign_amount)) {
- $amount = bcmul(app('steam')->positive(strval($transaction->transaction_foreign_amount)), '-1');
- if ($transaction->transaction_type_type === TransactionType::DEPOSIT) {
- $amount = bcmul($amount, '-1');
- }
-
-
- if ($transaction->transaction_type_type === TransactionType::TRANSFER) {
- $amount = app('steam')->positive($amount);
- $coloured = false;
- $format = '%s ';
- }
-
- $currency = new TransactionCurrency;
- $currency->symbol = $transaction->foreign_currency_symbol;
- $currency->decimal_places = $transaction->foreign_currency_dp;
- $str .= ' (' . sprintf($format, $this->formatAnything($currency, $amount, $coloured)) . ')';
- }
-
- return $str;
- }
}
diff --git a/app/Support/Binder/AccountList.php b/app/Support/Binder/AccountList.php
index 9a5e786baf..d048a0f666 100644
--- a/app/Support/Binder/AccountList.php
+++ b/app/Support/Binder/AccountList.php
@@ -18,24 +18,19 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
-
use FireflyIII\Models\Account;
use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class AccountList
- *
- * @package FireflyIII\Support\Binder
+ * Class AccountList.
*/
class AccountList implements BinderInterface
{
-
/**
* @param $value
* @param $route
@@ -44,9 +39,7 @@ class AccountList implements BinderInterface
*/
public static function routeBinder($value, $route): Collection
{
-
if (auth()->check()) {
-
$ids = explode(',', $value);
// filter ids:
$ids = self::filterIds($ids);
diff --git a/app/Support/Binder/BinderInterface.php b/app/Support/Binder/BinderInterface.php
index 2eadbef6bd..e5887a69da 100644
--- a/app/Support/Binder/BinderInterface.php
+++ b/app/Support/Binder/BinderInterface.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
/**
- * Interface BinderInterface
- *
- * @package FireflyIII\Support\Binder
+ * Interface BinderInterface.
*/
interface BinderInterface
{
@@ -37,5 +34,4 @@ interface BinderInterface
* @return mixed
*/
public static function routeBinder($value, $route);
-
}
diff --git a/app/Support/Binder/BudgetList.php b/app/Support/Binder/BudgetList.php
index 835bb13448..279c0982d7 100644
--- a/app/Support/Binder/BudgetList.php
+++ b/app/Support/Binder/BudgetList.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
@@ -27,15 +26,11 @@ use FireflyIII\Models\Budget;
use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
-
/**
- * Class BudgetList
- *
- * @package FireflyIII\Support\Binder
+ * Class BudgetList.
*/
class BudgetList implements BinderInterface
{
-
/**
* @param $value
* @param $route
diff --git a/app/Support/Binder/CategoryList.php b/app/Support/Binder/CategoryList.php
index 3688972bd8..2469a5c524 100644
--- a/app/Support/Binder/CategoryList.php
+++ b/app/Support/Binder/CategoryList.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
@@ -28,13 +27,10 @@ use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class CategoryList
- *
- * @package FireflyIII\Support\Binder
+ * Class CategoryList.
*/
class CategoryList implements BinderInterface
{
-
/**
* @param $value
* @param $route
diff --git a/app/Support/Binder/CurrencyCode.php b/app/Support/Binder/CurrencyCode.php
index 641ec4fd72..e2f810d432 100644
--- a/app/Support/Binder/CurrencyCode.php
+++ b/app/Support/Binder/CurrencyCode.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
@@ -27,13 +26,10 @@ use FireflyIII\Models\TransactionCurrency;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class CurrencyCode
- *
- * @package FireflyIII\Support\Binder
+ * Class CurrencyCode.
*/
class CurrencyCode implements BinderInterface
{
-
/**
* @param $value
* @param $route
@@ -43,7 +39,7 @@ class CurrencyCode implements BinderInterface
public static function routeBinder($value, $route)
{
$currency = TransactionCurrency::where('code', $value)->first();
- if (!is_null($currency)) {
+ if (null !== $currency) {
return $currency;
}
throw new NotFoundHttpException;
diff --git a/app/Support/Binder/Date.php b/app/Support/Binder/Date.php
index 0499b1c5e1..d517fd1957 100644
--- a/app/Support/Binder/Date.php
+++ b/app/Support/Binder/Date.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
@@ -30,14 +29,10 @@ use Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class Date
- *
- * @package FireflyIII\Support\Binder
+ * Class Date.
*/
class Date implements BinderInterface
{
-
-
/**
* @param $value
* @param $route
@@ -70,7 +65,6 @@ class Date implements BinderInterface
return $fiscalHelper->startOfFiscalYear(Carbon::now());
case 'currentFiscalYearEnd':
return $fiscalHelper->endOfFiscalYear(Carbon::now());
-
}
}
}
diff --git a/app/Support/Binder/JournalList.php b/app/Support/Binder/JournalList.php
index a5a605423f..cb8171b9cb 100644
--- a/app/Support/Binder/JournalList.php
+++ b/app/Support/Binder/JournalList.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
@@ -28,13 +27,10 @@ use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class JournalList
- *
- * @package FireflyIII\Support\Binder
+ * Class JournalList.
*/
class JournalList implements BinderInterface
{
-
/**
* @param $value
* @param $route
@@ -48,7 +44,7 @@ class JournalList implements BinderInterface
/** @var \Illuminate\Support\Collection $object */
$object = TransactionJournal::whereIn('transaction_journals.id', $ids)
->where('transaction_journals.user_id', auth()->user()->id)
- ->get(['transaction_journals.*',]);
+ ->get(['transaction_journals.*']);
if ($object->count() > 0) {
return $object;
diff --git a/app/Support/Binder/TagList.php b/app/Support/Binder/TagList.php
index 1bd98fe722..de088a0ddf 100644
--- a/app/Support/Binder/TagList.php
+++ b/app/Support/Binder/TagList.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
@@ -29,13 +28,10 @@ use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class TagList
- *
- * @package FireflyIII\Support\Binder
+ * Class TagList.
*/
class TagList implements BinderInterface
{
-
/**
* @param $value
* @param $route
diff --git a/app/Support/Binder/UnfinishedJournal.php b/app/Support/Binder/UnfinishedJournal.php
index 2bb983cb45..56b9c42cf5 100644
--- a/app/Support/Binder/UnfinishedJournal.php
+++ b/app/Support/Binder/UnfinishedJournal.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Binder;
@@ -27,14 +26,10 @@ use FireflyIII\Models\TransactionJournal;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * Class Date
- *
- * @package FireflyIII\Support\Binder
+ * Class Date.
*/
class UnfinishedJournal implements BinderInterface
{
-
-
/**
* @param $value
* @param $route
@@ -54,6 +49,5 @@ class UnfinishedJournal implements BinderInterface
}
throw new NotFoundHttpException;
-
}
}
diff --git a/app/Support/CacheProperties.php b/app/Support/CacheProperties.php
index c6f08cac21..2cfd0e720c 100644
--- a/app/Support/CacheProperties.php
+++ b/app/Support/CacheProperties.php
@@ -18,26 +18,21 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
-
use Cache;
use Illuminate\Support\Collection;
use Preferences as Prefs;
/**
- * Class CacheProperties
- *
- * @package FireflyIII\Support
+ * Class CacheProperties.
*/
class CacheProperties
{
-
- /** @var string */
- protected $md5 = '';
+ /** @var string */
+ protected $hash = '';
/** @var Collection */
protected $properties;
@@ -66,15 +61,15 @@ class CacheProperties
*/
public function get()
{
- return Cache::get($this->md5);
+ return Cache::get($this->hash);
}
/**
* @return string
*/
- public function getMd5(): string
+ public function getHash(): string
{
- return $this->md5;
+ return $this->hash;
}
/**
@@ -82,12 +77,12 @@ class CacheProperties
*/
public function has(): bool
{
- if (getenv('APP_ENV') === 'testing') {
+ if ('testing' === getenv('APP_ENV')) {
return false;
}
- $this->md5();
+ $this->hash();
- return Cache::has($this->md5);
+ return Cache::has($this->hash);
}
/**
@@ -95,18 +90,17 @@ class CacheProperties
*/
public function store($data)
{
- Cache::forever($this->md5, $data);
+ Cache::forever($this->hash, $data);
}
/**
- * @return void
*/
- private function md5()
+ private function hash()
{
- $this->md5 = '';
+ $content = '';
foreach ($this->properties as $property) {
- $this->md5 .= json_encode($property);
+ $content .= json_encode($property);
}
- $this->md5 = md5($this->md5);
+ $this->hash = substr(sha1($content), 0, 16);
}
}
diff --git a/app/Support/ChartColour.php b/app/Support/ChartColour.php
index f53e5c412b..3f2eb21488 100644
--- a/app/Support/ChartColour.php
+++ b/app/Support/ChartColour.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
/**
- * Class ChartColour
- *
- * @package FireflyIII\Support
+ * Class ChartColour.
*/
class ChartColour
{
diff --git a/app/Support/Domain.php b/app/Support/Domain.php
index 97f0a882e6..c94e1e80b5 100644
--- a/app/Support/Domain.php
+++ b/app/Support/Domain.php
@@ -18,15 +18,12 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
/**
- * Class Domain
- *
- * @package FireflyIII\Support
+ * Class Domain.
*/
class Domain
{
@@ -36,7 +33,6 @@ class Domain
public static function getBindables(): array
{
return config('firefly.bindables');
-
}
/**
diff --git a/app/Support/Events/BillScanner.php b/app/Support/Events/BillScanner.php
index 23341b0f09..21315f668a 100644
--- a/app/Support/Events/BillScanner.php
+++ b/app/Support/Events/BillScanner.php
@@ -18,19 +18,15 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Events;
-
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
/**
- * Class BillScanner
- *
- * @package FireflyIII\Support\Events
+ * Class BillScanner.
*/
class BillScanner
{
@@ -48,5 +44,4 @@ class BillScanner
$repository->scan($bill, $journal);
}
}
-
}
diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php
index 9b5f04986f..0c3b5b5e1f 100644
--- a/app/Support/ExpandedForm.php
+++ b/app/Support/ExpandedForm.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
@@ -28,19 +27,14 @@ use Carbon\Carbon;
use Eloquent;
use Illuminate\Support\Collection;
use Illuminate\Support\MessageBag;
-use Input;
use RuntimeException;
use Session;
/**
- * Class ExpandedForm
- *
- * @package FireflyIII\Support
- *
+ * Class ExpandedForm.
*/
class ExpandedForm
{
-
/**
* @param $name
* @param null $value
@@ -87,7 +81,7 @@ class ExpandedForm
*/
public function checkbox(string $name, $value = 1, $checked = null, $options = []): string
{
- $options['checked'] = $checked === true ? true : null;
+ $options['checked'] = true === $checked ? true : null;
$label = $this->label($name, $options);
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);
@@ -133,7 +127,6 @@ class ExpandedForm
$html = view('form.file', compact('classes', 'name', 'label', 'options'))->render();
return $html;
-
}
/**
@@ -153,7 +146,6 @@ class ExpandedForm
$html = view('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -172,11 +164,9 @@ class ExpandedForm
$html = view('form.location', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
- *
* Takes any collection and tries to make a sensible select list compatible array of it.
*
* @param \Illuminate\Support\Collection $set
@@ -193,7 +183,7 @@ class ExpandedForm
$title = null;
foreach ($fields as $field) {
- if (isset($entry->$field) && is_null($title)) {
+ if (isset($entry->$field) && null === $title) {
$title = $entry->$field;
}
}
@@ -219,7 +209,7 @@ class ExpandedForm
$title = null;
foreach ($fields as $field) {
- if (isset($entry->$field) && is_null($title)) {
+ if (isset($entry->$field) && null === $title) {
$title = $entry->$field;
}
}
@@ -290,11 +280,10 @@ class ExpandedForm
unset($options['placeholder']);
// make sure value is formatted nicely:
- if (!is_null($value) && $value !== '') {
+ if (null !== $value && '' !== $value) {
$value = round($value, $selectedCurrency->decimal_places);
}
-
$html = view('form.non-selectable-amount', compact('selectedCurrency', 'classes', 'name', 'label', 'value', 'options'))->render();
return $html;
@@ -319,12 +308,11 @@ class ExpandedForm
unset($options['placeholder']);
// make sure value is formatted nicely:
- if (!is_null($value) && $value !== '') {
+ if (null !== $value && '' !== $value) {
$decimals = $selectedCurrency->decimal_places ?? 2;
$value = round($value, $decimals);
}
-
$html = view('form.non-selectable-amount', compact('selectedCurrency', 'classes', 'name', 'label', 'value', 'options'))->render();
return $html;
@@ -346,7 +334,7 @@ class ExpandedForm
$options['step'] = 'any';
unset($options['placeholder']);
- $html = view('form.number', compact( 'classes', 'name', 'label', 'value', 'options'))->render();
+ $html = view('form.number', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
}
@@ -367,7 +355,7 @@ class ExpandedForm
// don't care
}
- $previousValue = is_null($previousValue) ? 'store' : $previousValue;
+ $previousValue = null === $previousValue ? 'store' : $previousValue;
$html = view('form.options', compact('type', 'name', 'previousValue'))->render();
return $html;
@@ -387,7 +375,6 @@ class ExpandedForm
$html = view('form.password', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -426,7 +413,6 @@ class ExpandedForm
$html = view('form.static', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -464,7 +450,6 @@ class ExpandedForm
$html = view('form.text', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -484,7 +469,6 @@ class ExpandedForm
$html = view('form.textarea', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -515,10 +499,10 @@ class ExpandedForm
{
if (Session::has('preFilled')) {
$preFilled = session('preFilled');
- $value = isset($preFilled[$name]) && is_null($value) ? $preFilled[$name] : $value;
+ $value = isset($preFilled[$name]) && null === $value ? $preFilled[$name] : $value;
}
try {
- if (!is_null(request()->old($name))) {
+ if (null !== request()->old($name)) {
$value = request()->old($name);
}
} catch (RuntimeException $e) {
@@ -528,7 +512,6 @@ class ExpandedForm
$value = $value->format('Y-m-d');
}
-
return $value;
}
@@ -539,14 +522,12 @@ class ExpandedForm
*/
protected function getHolderClasses(string $name): string
{
- /*
- * Get errors from session:
- */
+ // Get errors from session:
/** @var MessageBag $errors */
$errors = session('errors');
$classes = 'form-group';
- if (!is_null($errors) && $errors->has($name)) {
+ if (null !== $errors && $errors->has($name)) {
$classes = 'form-group has-error has-feedback';
}
@@ -567,7 +548,6 @@ class ExpandedForm
$name = str_replace('[]', '', $name);
return strval(trans('form.' . $name));
-
}
/**
@@ -586,7 +566,7 @@ class ExpandedForm
$value = $this->fillFieldValue($name, $value);
$options['step'] = 'any';
$defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency();
- $currencies = Amt::getAllCurrencies();
+ $currencies = app('amount')->getAllCurrencies();
unset($options['currency']);
unset($options['placeholder']);
@@ -604,11 +584,10 @@ class ExpandedForm
}
// make sure value is formatted nicely:
- if (!is_null($value) && $value !== '') {
+ if (null !== $value && '' !== $value) {
$value = round($value, $defaultCurrency->decimal_places);
}
-
$html = view('form.' . $view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
return $html;
diff --git a/app/Support/Facades/Amount.php b/app/Support/Facades/Amount.php
index 561a01375a..d60471705d 100644
--- a/app/Support/Facades/Amount.php
+++ b/app/Support/Facades/Amount.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Facades;
@@ -26,9 +25,7 @@ namespace FireflyIII\Support\Facades;
use Illuminate\Support\Facades\Facade;
/**
- * Class Amount
- *
- * @package FireflyIII\Support\Facades
+ * Class Amount.
*/
class Amount extends Facade
{
@@ -41,5 +38,4 @@ class Amount extends Facade
{
return 'amount';
}
-
}
diff --git a/app/Support/Facades/ExpandedForm.php b/app/Support/Facades/ExpandedForm.php
index 7b382a97f3..9334a4212c 100644
--- a/app/Support/Facades/ExpandedForm.php
+++ b/app/Support/Facades/ExpandedForm.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Facades;
@@ -26,9 +25,7 @@ namespace FireflyIII\Support\Facades;
use Illuminate\Support\Facades\Facade;
/**
- * Class Amount
- *
- * @package FireflyIII\Support\Facades
+ * Class Amount.
*/
class ExpandedForm extends Facade
{
@@ -41,5 +38,4 @@ class ExpandedForm extends Facade
{
return 'expandedform';
}
-
}
diff --git a/app/Support/Facades/FireflyConfig.php b/app/Support/Facades/FireflyConfig.php
index 6fa222424f..d8da789f1f 100644
--- a/app/Support/Facades/FireflyConfig.php
+++ b/app/Support/Facades/FireflyConfig.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Facades;
@@ -26,9 +25,7 @@ namespace FireflyIII\Support\Facades;
use Illuminate\Support\Facades\Facade;
/**
- * Class FireflyConfig
- *
- * @package FireflyIII\Support\Facades
+ * Class FireflyConfig.
*/
class FireflyConfig extends Facade
{
@@ -41,5 +38,4 @@ class FireflyConfig extends Facade
{
return 'fireflyconfig';
}
-
}
diff --git a/app/Support/Facades/Navigation.php b/app/Support/Facades/Navigation.php
index e98f22518d..cd5ef864f3 100644
--- a/app/Support/Facades/Navigation.php
+++ b/app/Support/Facades/Navigation.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Facades;
@@ -26,9 +25,7 @@ namespace FireflyIII\Support\Facades;
use Illuminate\Support\Facades\Facade;
/**
- * Class Navigation
- *
- * @package FireflyIII\Support\Facades
+ * Class Navigation.
*/
class Navigation extends Facade
{
@@ -41,5 +38,4 @@ class Navigation extends Facade
{
return 'navigation';
}
-
}
diff --git a/app/Support/Facades/Preferences.php b/app/Support/Facades/Preferences.php
index 2d036df025..1cb13a12d6 100644
--- a/app/Support/Facades/Preferences.php
+++ b/app/Support/Facades/Preferences.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Facades;
@@ -26,9 +25,7 @@ namespace FireflyIII\Support\Facades;
use Illuminate\Support\Facades\Facade;
/**
- * Class Preferences
- *
- * @package FireflyIII\Support\Facades
+ * Class Preferences.
*/
class Preferences extends Facade
{
@@ -41,5 +38,4 @@ class Preferences extends Facade
{
return 'preferences';
}
-
}
diff --git a/app/Support/Facades/Steam.php b/app/Support/Facades/Steam.php
index 42eb0a82ec..cc523bff9d 100644
--- a/app/Support/Facades/Steam.php
+++ b/app/Support/Facades/Steam.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Facades;
@@ -26,9 +25,7 @@ namespace FireflyIII\Support\Facades;
use Illuminate\Support\Facades\Facade;
/**
- * Class Steam
- *
- * @package FireflyIII\Support\Facades
+ * Class Steam.
*/
class Steam extends Facade
{
@@ -41,5 +38,4 @@ class Steam extends Facade
{
return 'steam';
}
-
}
diff --git a/app/Support/FireflyConfig.php b/app/Support/FireflyConfig.php
index 4fefbb9de1..6842300967 100644
--- a/app/Support/FireflyConfig.php
+++ b/app/Support/FireflyConfig.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
@@ -28,9 +27,7 @@ use FireflyIII\Models\Configuration;
use Log;
/**
- * Class FireflyConfig
- *
- * @package FireflyIII\Support
+ * Class FireflyConfig.
*/
class FireflyConfig
{
@@ -38,6 +35,7 @@ class FireflyConfig
* @param $name
*
* @return bool
+ *
* @throws \Exception
*/
public function delete($name): bool
@@ -72,7 +70,7 @@ class FireflyConfig
return $config;
}
// no preference found and default is null:
- if (is_null($default)) {
+ if (null === $default) {
return null;
}
@@ -100,7 +98,7 @@ class FireflyConfig
{
Log::debug('Set new value for ', ['name' => $name]);
$config = Configuration::whereName($name)->first();
- if (is_null($config)) {
+ if (null === $config) {
Log::debug('Does not exist yet ', ['name' => $name]);
$item = new Configuration;
$item->name = $name;
@@ -117,7 +115,5 @@ class FireflyConfig
Cache::forget('ff-config-' . $name);
return $config;
-
}
-
}
diff --git a/app/Support/Import/Configuration/ConfigurationInterface.php b/app/Support/Import/Configuration/ConfigurationInterface.php
index 66e784e6b7..14a2ecb4ae 100644
--- a/app/Support/Import/Configuration/ConfigurationInterface.php
+++ b/app/Support/Import/Configuration/ConfigurationInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Import\Configuration;
@@ -26,9 +25,7 @@ namespace FireflyIII\Support\Import\Configuration;
use FireflyIII\Models\ImportJob;
/**
- * Class ConfigurationInterface
- *
- * @package FireflyIII\Support\Import\Configuration
+ * Class ConfigurationInterface.
*/
interface ConfigurationInterface
{
@@ -61,5 +58,4 @@ interface ConfigurationInterface
* @return bool
*/
public function storeConfiguration(array $data): bool;
-
}
diff --git a/app/Support/Import/Configuration/Csv/Initial.php b/app/Support/Import/Configuration/Csv/Initial.php
index c6f770e777..dff977be5c 100644
--- a/app/Support/Import/Configuration/Csv/Initial.php
+++ b/app/Support/Import/Configuration/Csv/Initial.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Import\Configuration\Csv;
@@ -31,9 +30,7 @@ use FireflyIII\Support\Import\Configuration\ConfigurationInterface;
use Log;
/**
- * Class CsvInitial
- *
- * @package FireflyIII\Support\Import\Configuration
+ * Class CsvInitial.
*/
class Initial implements ConfigurationInterface
{
@@ -109,23 +106,22 @@ class Initial implements ConfigurationInterface
$importId = $data['csv_import_account'] ?? 0;
$account = $repository->find(intval($importId));
- $hasHeaders = isset($data['has_headers']) && intval($data['has_headers']) === 1 ? true : false;
+ $hasHeaders = isset($data['has_headers']) && 1 === intval($data['has_headers']) ? true : false;
$config = $this->job->configuration;
$config['initial-config-complete'] = true;
$config['has-headers'] = $hasHeaders;
$config['date-format'] = $data['date_format'];
$config['delimiter'] = $data['csv_delimiter'];
- $config['delimiter'] = $config['delimiter'] === 'tab' ? "\t" : $config['delimiter'];
+ $config['delimiter'] = 'tab' === $config['delimiter'] ? "\t" : $config['delimiter'];
Log::debug('Entered import account.', ['id' => $importId]);
-
- if (!is_null($account->id)) {
+ if (null !== $account->id) {
Log::debug('Found account.', ['id' => $account->id, 'name' => $account->name]);
$config['import-account'] = $account->id;
}
- if (is_null($account->id)) {
+ if (null === $account->id) {
Log::error('Could not find anything for csv_import_account.', ['id' => $importId]);
}
diff --git a/app/Support/Import/Configuration/Csv/Map.php b/app/Support/Import/Configuration/Csv/Map.php
index f877fb525f..7aa35f62b0 100644
--- a/app/Support/Import/Configuration/Csv/Map.php
+++ b/app/Support/Import/Configuration/Csv/Map.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Import\Configuration\Csv;
-
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Import\Mapper\MapperInterface;
use FireflyIII\Import\MapperPreProcess\PreProcessorInterface;
@@ -34,9 +32,7 @@ use League\Csv\Reader;
use Log;
/**
- * Class Mapping
- *
- * @package FireflyIII\Support\Import\Configuration\Csv
+ * Class Mapping.
*/
class Map implements ConfigurationInterface
{
@@ -44,13 +40,14 @@ class Map implements ConfigurationInterface
private $configuration = [];
/** @var array that holds each column to be mapped by the user */
private $data = [];
- /** @var ImportJob */
+ /** @var ImportJob */
private $job;
/** @var array */
private $validSpecifics = [];
/**
* @return array
+ *
* @throws FireflyException
*/
public function getData(): array
@@ -69,7 +66,6 @@ class Map implements ConfigurationInterface
$indexes = array_keys($this->data);
$rowIndex = 0;
foreach ($results as $rowIndex => $row) {
-
$row = $this->runSpecifics($row);
//do something here
@@ -81,10 +77,9 @@ class Map implements ConfigurationInterface
}
$value = $row[$index];
if (strlen($value) > 0) {
-
// we can do some preprocessing here,
// which is exclusively to fix the tags:
- if (!is_null($this->data[$index]['preProcessMap']) && strlen($this->data[$index]['preProcessMap']) > 0) {
+ if (null !== $this->data[$index]['preProcessMap'] && strlen($this->data[$index]['preProcessMap']) > 0) {
/** @var PreProcessorInterface $preProcessor */
$preProcessor = app($this->data[$index]['preProcessMap']);
$result = $preProcessor->run($value);
@@ -94,7 +89,6 @@ class Map implements ConfigurationInterface
Log::debug($rowIndex . ':' . $index . 'Value after preprocessor', ['value-new' => $result]);
Log::debug($rowIndex . ':' . $index . 'Value after joining', ['value-complete' => $this->data[$index]['values']]);
-
continue;
}
@@ -117,7 +111,6 @@ class Map implements ConfigurationInterface
$this->job->save();
return $this->data;
-
}
/**
@@ -157,7 +150,7 @@ class Map implements ConfigurationInterface
$config['column-mapping-config'][$index] = [];
foreach ($data as $value => $mapId) {
$mapId = intval($mapId);
- if ($mapId !== 0) {
+ if (0 !== $mapId) {
$config['column-mapping-config'][$index][$value] = intval($mapId);
}
}
@@ -195,15 +188,13 @@ class Map implements ConfigurationInterface
$config = $this->job->configuration;
/**
- * @var int $index
+ * @var int
* @var bool $mustBeMapped
*/
foreach ($config['column-do-mapping'] as $index => $mustBeMapped) {
$column = $this->validateColumnName($config['column-roles'][$index] ?? '_ignore');
$shouldMap = $this->shouldMapColumn($column, $mustBeMapped);
if ($shouldMap) {
-
-
// create configuration entry for this specific column and add column to $this->data array for later processing.
$this->data[$index] = [
'name' => $column,
@@ -216,7 +207,6 @@ class Map implements ConfigurationInterface
}
return true;
-
}
/**
@@ -230,7 +220,7 @@ class Map implements ConfigurationInterface
$hasPreProcess = config('csv.import_roles.' . $column . '.pre-process-map');
$preProcessClass = config('csv.import_roles.' . $column . '.pre-process-mapper');
- if (!is_null($hasPreProcess) && $hasPreProcess === true && !is_null($preProcessClass)) {
+ if (null !== $hasPreProcess && true === $hasPreProcess && null !== $preProcessClass) {
$name = sprintf('\\FireflyIII\\Import\\MapperPreProcess\\%s', $preProcessClass);
}
@@ -241,6 +231,7 @@ class Map implements ConfigurationInterface
* @param array $row
*
* @return array
+ *
* @throws FireflyException
*/
private function runSpecifics(array $row): array
@@ -273,13 +264,14 @@ class Map implements ConfigurationInterface
{
$canBeMapped = config('csv.import_roles.' . $column . '.mappable');
- return ($canBeMapped && $mustBeMapped);
+ return $canBeMapped && $mustBeMapped;
}
/**
* @param string $column
*
* @return string
+ *
* @throws FireflyException
*/
private function validateColumnName(string $column): string
diff --git a/app/Support/Import/Configuration/Csv/Roles.php b/app/Support/Import/Configuration/Csv/Roles.php
index 02c0701f06..97160b430e 100644
--- a/app/Support/Import/Configuration/Csv/Roles.php
+++ b/app/Support/Import/Configuration/Csv/Roles.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Import\Configuration\Csv;
-
use FireflyIII\Import\Specifics\SpecificInterface;
use FireflyIII\Models\ImportJob;
use FireflyIII\Support\Import\Configuration\ConfigurationInterface;
@@ -31,14 +29,12 @@ use League\Csv\Reader;
use Log;
/**
- * Class Roles
- *
- * @package FireflyIII\Support\Import\Configuration\Csv
+ * Class Roles.
*/
class Roles implements ConfigurationInterface
{
private $data = [];
- /** @var ImportJob */
+ /** @var ImportJob */
private $job;
/** @var string */
@@ -76,7 +72,7 @@ class Roles implements ConfigurationInterface
$count = count($row);
$this->data['total'] = $count > $this->data['total'] ? $count : $this->data['total'];
$this->processRow($row);
- $start++;
+ ++$start;
}
$this->updateColumCount();
@@ -119,7 +115,7 @@ class Roles implements ConfigurationInterface
Log::debug('Now in storeConfiguration of Roles.');
$config = $this->job->configuration;
$count = $config['column-count'];
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
$role = $data['role'][$i] ?? '_ignore';
$mapping = isset($data['map'][$i]) && $data['map'][$i] === '1' ? true : false;
$config['column-roles'][$i] = $role;
@@ -127,7 +123,6 @@ class Roles implements ConfigurationInterface
Log::debug(sprintf('Column %d has been given role %s', $i, $role));
}
-
$this->job->configuration = $config;
$this->job->save();
@@ -135,7 +130,6 @@ class Roles implements ConfigurationInterface
$this->setRolesComplete();
$this->isMappingNecessary();
-
return true;
}
@@ -150,7 +144,6 @@ class Roles implements ConfigurationInterface
}
return $roles;
-
}
/**
@@ -160,11 +153,11 @@ class Roles implements ConfigurationInterface
{
$config = $this->job->configuration;
$count = $config['column-count'];
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
$role = $config['column-roles'][$i] ?? '_ignore';
$mapping = $config['column-do-mapping'][$i] ?? false;
- if ($role === '_ignore' && $mapping === true) {
+ if ('_ignore' === $role && true === $mapping) {
$mapping = false;
Log::debug(sprintf('Column %d has type %s so it cannot be mapped.', $i, $role));
}
@@ -175,7 +168,6 @@ class Roles implements ConfigurationInterface
$this->job->save();
return true;
-
}
/**
@@ -186,14 +178,14 @@ class Roles implements ConfigurationInterface
$config = $this->job->configuration;
$count = $config['column-count'];
$toBeMapped = 0;
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
$mapping = $config['column-do-mapping'][$i] ?? false;
- if ($mapping === true) {
- $toBeMapped++;
+ if (true === $mapping) {
+ ++$toBeMapped;
}
}
Log::debug(sprintf('Found %d columns that need mapping.', $toBeMapped));
- if ($toBeMapped === 0) {
+ if (0 === $toBeMapped) {
// skip setting of map, because none need to be mapped:
$config['column-mapping-complete'] = true;
$this->job->configuration = $config;
@@ -204,7 +196,7 @@ class Roles implements ConfigurationInterface
}
/**
- * make unique example data
+ * make unique example data.
*/
private function makeExamplesUnique(): bool
{
@@ -261,12 +253,12 @@ class Roles implements ConfigurationInterface
$count = $config['column-count'];
$assigned = 0;
$hasAmount = false;
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
$role = $config['column-roles'][$i] ?? '_ignore';
- if ($role !== '_ignore') {
- $assigned++;
+ if ('_ignore' !== $role) {
+ ++$assigned;
}
- if ($role === 'amount') {
+ if (in_array($role, ['amount', 'amount_credit', 'amount_debet'])) {
$hasAmount = true;
}
}
@@ -276,7 +268,7 @@ class Roles implements ConfigurationInterface
$this->job->save();
$this->warning = '';
}
- if ($assigned === 0 || !$hasAmount) {
+ if (0 === $assigned || !$hasAmount) {
$this->warning = strval(trans('csv.roles_warning'));
}
diff --git a/app/Support/Import/Information/BunqInformation.php b/app/Support/Import/Information/BunqInformation.php
index d3de5bcd2a..3c76d63558 100644
--- a/app/Support/Import/Information/BunqInformation.php
+++ b/app/Support/Import/Information/BunqInformation.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Import\Information;
@@ -38,14 +37,11 @@ use Log;
use Preferences;
/**
- * Class BunqInformation
- *
- * @package FireflyIII\Support\Import\Information
+ * Class BunqInformation.
*/
class BunqInformation implements InformationInterface
{
-
- /** @var User */
+ /** @var User */
private $user;
/**
@@ -83,7 +79,6 @@ class BunqInformation implements InformationInterface
$return = [];
/** @var MonetaryAccountBank $account */
foreach ($accounts as $account) {
-
$current = [
'id' => $account->getId(),
'name' => $account->getDescription(),
@@ -93,7 +88,7 @@ class BunqInformation implements InformationInterface
];
/** @var Alias $alias */
foreach ($account->getAliases() as $alias) {
- if ($alias->getType() === 'IBAN') {
+ if ('IBAN' === $alias->getType()) {
$current['number'] = $alias->getValue();
}
}
@@ -156,13 +151,13 @@ class BunqInformation implements InformationInterface
$request->call();
return $request->getMonetaryAccounts();
-
}
/**
* @param SessionToken $sessionToken
*
* @return int
+ *
* @throws FireflyException
*/
private function getUserInformation(SessionToken $sessionToken): int
diff --git a/app/Support/Import/Information/InformationInterface.php b/app/Support/Import/Information/InformationInterface.php
index 068889f2fe..7de8e527d4 100644
--- a/app/Support/Import/Information/InformationInterface.php
+++ b/app/Support/Import/Information/InformationInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Import\Information;
@@ -26,13 +25,10 @@ namespace FireflyIII\Support\Import\Information;
use FireflyIII\User;
/**
- * Interface InformationInterface
- *
- * @package FireflyIII\Support\Import\Information
+ * Interface InformationInterface.
*/
interface InformationInterface
{
-
/**
* Returns a collection of accounts. Preferrably, these follow a uniform Firefly III format so they can be managed over banks.
*
diff --git a/app/Support/Import/Prerequisites/BunqPrerequisites.php b/app/Support/Import/Prerequisites/BunqPrerequisites.php
index a7b53f2f00..75614b3762 100644
--- a/app/Support/Import/Prerequisites/BunqPrerequisites.php
+++ b/app/Support/Import/Prerequisites/BunqPrerequisites.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Import\Prerequisites;
@@ -41,12 +40,10 @@ use Requests_Exception;
/**
* This class contains all the routines necessary to connect to Bunq.
- *
- * @package FireflyIII\Support\Import\Prerequisites
*/
class BunqPrerequisites implements PrerequisitesInterface
{
- /** @var User */
+ /** @var User */
private $user;
/**
@@ -80,7 +77,7 @@ class BunqPrerequisites implements PrerequisitesInterface
{
$apiKey = Preferences::getForUser($this->user, 'bunq_api_key', false);
- return ($apiKey->data === false || is_null($apiKey->data));
+ return false === $apiKey->data || null === $apiKey->data;
}
/**
@@ -149,7 +146,6 @@ class BunqPrerequisites implements PrerequisitesInterface
Log::debug('Created key pair');
return;
-
}
/**
@@ -157,6 +153,7 @@ class BunqPrerequisites implements PrerequisitesInterface
* to try and detect the server ID for this firefly instance.
*
* @return DeviceServerId
+ *
* @throws FireflyException
*/
private function getExistingDevice(): DeviceServerId
@@ -188,7 +185,7 @@ class BunqPrerequisites implements PrerequisitesInterface
{
Log::debug('Get installation token.');
$token = Preferences::getForUser($this->user, 'bunq_installation_token', null);
- if (!is_null($token)) {
+ if (null !== $token) {
return $token->data;
}
Log::debug('Have no token, request one.');
@@ -220,7 +217,7 @@ class BunqPrerequisites implements PrerequisitesInterface
{
Log::debug('get private key');
$preference = Preferences::getForUser($this->user, 'bunq_private_key', null);
- if (is_null($preference)) {
+ if (null === $preference) {
Log::debug('private key is null');
// create key pair
$this->createKeyPair();
@@ -240,7 +237,7 @@ class BunqPrerequisites implements PrerequisitesInterface
{
Log::debug('get public key');
$preference = Preferences::getForUser($this->user, 'bunq_public_key', null);
- if (is_null($preference)) {
+ if (null === $preference) {
Log::debug('public key is null');
// create key pair
$this->createKeyPair();
@@ -255,18 +252,19 @@ class BunqPrerequisites implements PrerequisitesInterface
* Request users server remote IP. Let's assume this value will not change any time soon.
*
* @return string
+ *
* @throws FireflyException
*/
private function getRemoteIp(): string
{
$preference = Preferences::getForUser($this->user, 'external_ip', null);
- if (is_null($preference)) {
+ if (null === $preference) {
try {
$response = Requests::get('https://api.ipify.org');
} catch (Requests_Exception $e) {
throw new FireflyException(sprintf('Could not retrieve external IP: %s', $e->getMessage()));
}
- if ($response->status_code !== 200) {
+ if (200 !== $response->status_code) {
throw new FireflyException(sprintf('Could not retrieve external IP: %d %s', $response->status_code, $response->body));
}
$serverIp = $response->body;
@@ -300,7 +298,7 @@ class BunqPrerequisites implements PrerequisitesInterface
Log::debug('Now in registerDevice');
$deviceServerId = Preferences::getForUser($this->user, 'bunq_device_server_id', null);
$serverIp = $this->getRemoteIp();
- if (!is_null($deviceServerId)) {
+ if (null !== $deviceServerId) {
Log::debug('Have device server ID.');
return $deviceServerId->data;
@@ -324,7 +322,7 @@ class BunqPrerequisites implements PrerequisitesInterface
} catch (FireflyException $e) {
Log::error($e->getMessage());
}
- if (is_null($deviceServerId)) {
+ if (null === $deviceServerId) {
// try get the current from a list:
$deviceServerId = $this->getExistingDevice();
}
@@ -334,5 +332,4 @@ class BunqPrerequisites implements PrerequisitesInterface
return $deviceServerId;
}
-
}
diff --git a/app/Support/Import/Prerequisites/PrerequisitesInterface.php b/app/Support/Import/Prerequisites/PrerequisitesInterface.php
index cbbc633154..e52fad7d61 100644
--- a/app/Support/Import/Prerequisites/PrerequisitesInterface.php
+++ b/app/Support/Import/Prerequisites/PrerequisitesInterface.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Import\Prerequisites;
-
use FireflyIII\User;
use Illuminate\Http\Request;
use Illuminate\Support\MessageBag;
diff --git a/app/Support/Models/TransactionJournalTrait.php b/app/Support/Models/TransactionJournalTrait.php
index 4bd4739672..928fa95e79 100644
--- a/app/Support/Models/TransactionJournalTrait.php
+++ b/app/Support/Models/TransactionJournalTrait.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Models;
-
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Transaction;
@@ -36,19 +34,18 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Collection;
/**
- * Class TransactionJournalTrait
+ * Class TransactionJournalTrait.
*
* @property int $id
* @property Carbon $date
* @property string $transaction_type_type
* @property TransactionType $transactionType
- *
- * @package FireflyIII\Support\Models
*/
trait TransactionJournalTrait
{
/**
* @return string
+ *
* @throws FireflyException
*/
public function amount(): string
@@ -101,7 +98,7 @@ trait TransactionJournalTrait
public function budgetId(): int
{
$budget = $this->budgets()->first();
- if (!is_null($budget)) {
+ if (null !== $budget) {
return $budget->id;
}
@@ -124,7 +121,7 @@ trait TransactionJournalTrait
public function categoryAsString(): string
{
$category = $this->categories()->first();
- if (!is_null($category)) {
+ if (null !== $category) {
return $category->name;
}
@@ -138,10 +135,10 @@ trait TransactionJournalTrait
*/
public function dateAsString(string $dateField = ''): string
{
- if ($dateField === '') {
+ if ('' === $dateField) {
return $this->date->format('Y-m-d');
}
- if (!is_null($this->$dateField) && $this->$dateField instanceof Carbon) {
+ if (null !== $this->$dateField && $this->$dateField instanceof Carbon) {
// make field NULL
$carbon = clone $this->$dateField;
$this->$dateField = null;
@@ -154,15 +151,13 @@ trait TransactionJournalTrait
return $carbon->format('Y-m-d');
}
$metaField = $this->getMeta($dateField);
- if (!is_null($metaField)) {
+ if (null !== $metaField) {
$carbon = new Carbon($metaField);
return $carbon->format('Y-m-d');
}
return '';
-
-
}
/**
@@ -208,7 +203,6 @@ trait TransactionJournalTrait
}
/**
- *
* @param string $name
*
* @return string
@@ -229,7 +223,7 @@ trait TransactionJournalTrait
public function isJoined(Builder $query, string $table): bool
{
$joins = $query->getQuery()->joins;
- if (is_null($joins)) {
+ if (null === $joins) {
return false;
}
foreach ($joins as $join) {
@@ -242,19 +236,16 @@ trait TransactionJournalTrait
}
/**
- *
* @return bool
*/
abstract public function isOpeningBalance(): bool;
/**
- *
* @return bool
*/
abstract public function isTransfer(): bool;
/**
- *
* @return bool
*/
abstract public function isWithdrawal(): bool;
@@ -287,7 +278,7 @@ trait TransactionJournalTrait
/**
* Save the model to the database.
*
- * @param array $options
+ * @param array $options
*
* @return bool
*/
diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php
index 3df169a12b..158cdc16ab 100644
--- a/app/Support/Navigation.php
+++ b/app/Support/Navigation.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
@@ -27,19 +26,17 @@ use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
/**
- * Class Navigation
- *
- * @package FireflyIII\Support
+ * Class Navigation.
*/
class Navigation
{
-
/**
* @param \Carbon\Carbon $theDate
* @param $repeatFreq
* @param $skip
*
* @return \Carbon\Carbon
+ *
* @throws FireflyException
*/
public function addPeriod(Carbon $theDate, string $repeatFreq, int $skip): Carbon
@@ -75,7 +72,7 @@ class Navigation
// if period is 1M and diff in month is 2 and new DOM = 1, sub a day:
$months = ['1M', 'month', 'monthly'];
$difference = $date->month - $theDate->month;
- if (in_array($repeatFreq, $months) && $difference === 2 && $date->day === 1) {
+ if (in_array($repeatFreq, $months) && 2 === $difference && 1 === $date->day) {
$date->subDay();
}
@@ -87,6 +84,7 @@ class Navigation
* @param $repeatFreq
*
* @return \Carbon\Carbon
+ *
* @throws FireflyException
*/
public function endOfPeriod(\Carbon\Carbon $end, string $repeatFreq): Carbon
@@ -113,7 +111,7 @@ class Navigation
// if the range is custom, the end of the period
// is another X days (x is the difference between start)
// and end added to $theCurrentEnd
- if ($repeatFreq === 'custom') {
+ if ('custom' === $repeatFreq) {
/** @var Carbon $tStart */
$tStart = session('start', Carbon::now()->startOfMonth());
/** @var Carbon $tEnd */
@@ -176,10 +174,9 @@ class Navigation
if (isset($functionMap[$repeatFreq])) {
$function = $functionMap[$repeatFreq];
$currentEnd->$function();
-
}
- if (!is_null($maxDate) && $currentEnd > $maxDate) {
+ if (null !== $maxDate && $currentEnd > $maxDate) {
return clone $maxDate;
}
@@ -221,7 +218,6 @@ class Navigation
}
return $entries;
-
}
/**
@@ -229,6 +225,7 @@ class Navigation
* @param $repeatFrequency
*
* @return string
+ *
* @throws FireflyException
*/
public function periodShow(Carbon $theDate, string $repeatFrequency): string
@@ -241,8 +238,6 @@ class Navigation
'1W' => trans('config.week_in_year'),
'week' => trans('config.week_in_year'),
'weekly' => trans('config.week_in_year'),
- //'3M' => trans('config.quarter_of_year'),
- //'quarter' => trans('config.quarter_of_year'),
'1M' => trans('config.month'),
'month' => trans('config.month'),
'monthly' => trans('config.month'),
@@ -250,13 +245,12 @@ class Navigation
'year' => trans('config.year'),
'yearly' => trans('config.year'),
'6M' => trans('config.half_year'),
-
];
if (isset($formatMap[$repeatFrequency])) {
return $date->formatLocalized(strval($formatMap[$repeatFrequency]));
}
- if ($repeatFrequency === '3M' || $repeatFrequency === 'quarter') {
+ if ('3M' === $repeatFrequency || 'quarter' === $repeatFrequency) {
$quarter = ceil($theDate->month / 3);
return sprintf('Q%d %d', $quarter, $theDate->year);
@@ -310,7 +304,6 @@ class Navigation
}
return $format;
-
}
/**
@@ -357,7 +350,6 @@ class Navigation
}
return $format;
-
}
/**
@@ -381,7 +373,6 @@ class Navigation
}
return $format;
-
}
/**
@@ -389,6 +380,7 @@ class Navigation
* @param $repeatFreq
*
* @return \Carbon\Carbon
+ *
* @throws FireflyException
*/
public function startOfPeriod(Carbon $theDate, string $repeatFreq): Carbon
@@ -417,7 +409,7 @@ class Navigation
return $date;
}
- if ($repeatFreq === 'half-year' || $repeatFreq === '6M') {
+ if ('half-year' === $repeatFreq || '6M' === $repeatFreq) {
$month = $date->month;
$date->startOfYear();
if ($month >= 7) {
@@ -426,11 +418,10 @@ class Navigation
return $date;
}
- if ($repeatFreq === 'custom') {
+ if ('custom' === $repeatFreq) {
return $date; // the date is already at the start.
}
-
throw new FireflyException(sprintf('Cannot do startOfPeriod for $repeat_freq "%s"', $repeatFreq));
}
@@ -440,6 +431,7 @@ class Navigation
* @param int $subtract
*
* @return \Carbon\Carbon
+ *
* @throws FireflyException
*/
public function subtractPeriod(Carbon $theDate, string $repeatFreq, int $subtract = 1): Carbon
@@ -481,7 +473,7 @@ class Navigation
// a custom range requires the session start
// and session end to calculate the difference in days.
// this is then subtracted from $theDate (* $subtract).
- if ($repeatFreq === 'custom') {
+ if ('custom' === $repeatFreq) {
/** @var Carbon $tStart */
$tStart = session('start', Carbon::now()->startOfMonth());
/** @var Carbon $tEnd */
@@ -500,6 +492,7 @@ class Navigation
* @param \Carbon\Carbon $start
*
* @return \Carbon\Carbon
+ *
* @throws FireflyException
*/
public function updateEndDate(string $range, Carbon $start): Carbon
@@ -520,7 +513,7 @@ class Navigation
return $end;
}
- if ($range === '6M') {
+ if ('6M' === $range) {
if ($start->month >= 7) {
$end->endOfYear();
@@ -538,6 +531,7 @@ class Navigation
* @param \Carbon\Carbon $start
*
* @return \Carbon\Carbon
+ *
* @throws FireflyException
*/
public function updateStartDate(string $range, Carbon $start): Carbon
@@ -556,7 +550,7 @@ class Navigation
return $start;
}
- if ($range === '6M') {
+ if ('6M' === $range) {
if ($start->month >= 7) {
$start->startOfYear()->addMonths(6);
@@ -565,11 +559,7 @@ class Navigation
$start->startOfYear();
return $start;
-
-
}
throw new FireflyException(sprintf('updateStartDate cannot handle range "%s"', $range));
}
-
-
}
diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php
index 74d59ad23e..d7aeec3970 100644
--- a/app/Support/Preferences.php
+++ b/app/Support/Preferences.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
@@ -30,9 +29,7 @@ use Illuminate\Support\Collection;
use Session;
/**
- * Class Preferences
- *
- * @package FireflyIII\Support
+ * Class Preferences.
*/
class Preferences
{
@@ -53,6 +50,7 @@ class Preferences
* @param $name
*
* @return bool
+ *
* @throws \Exception
*/
public function delete(string $name): bool
@@ -86,12 +84,13 @@ class Preferences
*/
public function get($name, $default = null)
{
+ /** @var User $user */
$user = auth()->user();
- if (is_null($user)) {
+ if (null === $user) {
return $default;
}
- return $this->getForUser(auth()->user(), $name, $default);
+ return $this->getForUser($user, $name, $default);
}
/**
@@ -115,12 +114,11 @@ class Preferences
}
return $result;
-
}
/**
* @param \FireflyIII\User $user
- * @param string $name
+ * @param string $name
* @param null|string $default
*
* @return \FireflyIII\Models\Preference|null
@@ -140,13 +138,12 @@ class Preferences
return $preference;
}
// no preference found and default is null:
- if (is_null($default)) {
+ if (null === $default) {
// return NULL
return null;
}
return $this->setForUser($user, $name, $default);
-
}
/**
@@ -156,7 +153,7 @@ class Preferences
{
$lastActivity = microtime();
$preference = $this->get('lastActivity', microtime());
- if (!is_null($preference)) {
+ if (null !== $preference) {
$lastActivity = $preference->data;
}
@@ -175,15 +172,15 @@ class Preferences
}
/**
- * @param $name
- * @param $value
+ * @param $name
+ * @param $value
*
* @return Preference
*/
public function set($name, $value): Preference
{
$user = auth()->user();
- if (is_null($user)) {
+ if (null === $user) {
// make new preference, return it:
$pref = new Preference;
$pref->name = $name;
@@ -208,7 +205,7 @@ class Preferences
Cache::forget($fullName);
$pref = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data']);
- if (!is_null($pref)) {
+ if (null !== $pref) {
$pref->data = $value;
$pref->save();
@@ -227,6 +224,5 @@ class Preferences
Cache::forever($fullName, $pref);
return $pref;
-
}
}
diff --git a/app/Support/Search/Modifier.php b/app/Support/Search/Modifier.php
index fddddb9d8d..4d2271a729 100644
--- a/app/Support/Search/Modifier.php
+++ b/app/Support/Search/Modifier.php
@@ -18,17 +18,14 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Search;
-
use Carbon\Carbon;
use Exception;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Transaction;
-use Illuminate\Support\Str;
use Log;
use Steam;
@@ -58,6 +55,7 @@ class Modifier
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
* @return bool
+ *
* @throws FireflyException
*/
public static function apply(array $modifier, Transaction $transaction): bool
@@ -75,16 +73,16 @@ class Modifier
Log::debug(sprintf('Destination is %s? %s', $modifier['value'], var_export($res, true)));
break;
case 'category':
- $res = self::category($transaction, $modifier['value']);
+ $res = self::category($transaction, $modifier['value']);
Log::debug(sprintf('Category is %s? %s', $modifier['value'], var_export($res, true)));
break;
case 'budget':
- $res = self::budget($transaction, $modifier['value']);
+ $res = self::budget($transaction, $modifier['value']);
Log::debug(sprintf('Budget is %s? %s', $modifier['value'], var_export($res, true)));
break;
case 'bill':
$name = Steam::tryDecrypt($transaction->bill_name);
- $res = self::stringCompare($name, $modifier['value']);
+ $res = self::stringCompare($name, $modifier['value']);
Log::debug(sprintf('Bill is %s? %s', $modifier['value'], var_export($res, true)));
break;
}
@@ -151,11 +149,10 @@ class Modifier
*/
public static function stringCompare(string $haystack, string $needle): bool
{
- $res = !(strpos(strtolower($haystack), strtolower($needle)) === false);
+ $res = !(false === strpos(strtolower($haystack), strtolower($needle)));
Log::debug(sprintf('"%s" is in "%s"? %s', $needle, $haystack, var_export($res, true)));
return $res;
-
}
/**
@@ -167,11 +164,11 @@ class Modifier
private static function budget(Transaction $transaction, string $search): bool
{
$journalBudget = '';
- if (!is_null($transaction->transaction_journal_budget_name)) {
+ if (null !== $transaction->transaction_journal_budget_name) {
$journalBudget = Steam::decrypt(intval($transaction->transaction_journal_budget_encrypted), $transaction->transaction_journal_budget_name);
}
$transactionBudget = '';
- if (!is_null($transaction->transaction_budget_name)) {
+ if (null !== $transaction->transaction_budget_name) {
$journalBudget = Steam::decrypt(intval($transaction->transaction_budget_encrypted), $transaction->transaction_budget_name);
}
@@ -187,11 +184,11 @@ class Modifier
private static function category(Transaction $transaction, string $search): bool
{
$journalCategory = '';
- if (!is_null($transaction->transaction_journal_category_name)) {
+ if (null !== $transaction->transaction_journal_category_name) {
$journalCategory = Steam::decrypt(intval($transaction->transaction_journal_category_encrypted), $transaction->transaction_journal_category_name);
}
$transactionCategory = '';
- if (!is_null($transaction->transaction_category_name)) {
+ if (null !== $transaction->transaction_category_name) {
$journalCategory = Steam::decrypt(intval($transaction->transaction_category_encrypted), $transaction->transaction_category_name);
}
diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php
index 6016c7d1e4..e5aa93b4cb 100644
--- a/app/Support/Search/Search.php
+++ b/app/Support/Search/Search.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Search;
-
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
@@ -34,9 +32,7 @@ use Illuminate\Support\Collection;
use Log;
/**
- * Class Search
- *
- * @package FireflyIII\Search
+ * Class Search.
*/
class Search implements SearchInterface
{
@@ -44,13 +40,13 @@ class Search implements SearchInterface
private $limit = 100;
/** @var Collection */
private $modifiers;
- /** @var string */
+ /** @var string */
private $originalQuery = '';
/** @var User */
private $user;
/** @var array */
private $validModifiers = [];
- /** @var array */
+ /** @var array */
private $words = [];
/**
@@ -68,7 +64,7 @@ class Search implements SearchInterface
public function getWordsAsString(): string
{
$string = join(' ', $this->words);
- if (strlen($string) === 0) {
+ if (0 === strlen($string)) {
return is_string($this->originalQuery) ? $this->originalQuery : '';
}
@@ -134,7 +130,6 @@ class Search implements SearchInterface
// Filter transactions that match the given triggers.
$filtered = $set->filter(
function (Transaction $transaction) {
-
if ($this->matchModifiers($transaction)) {
return $transaction;
}
@@ -152,7 +147,7 @@ class Search implements SearchInterface
Log::debug(sprintf('Total count is now %d', $result->count()));
// Update counters
- $page++;
+ ++$page;
$processed += count($set);
Log::debug(sprintf('Page is now %d, processed is %d', $page, $processed));
@@ -167,7 +162,6 @@ class Search implements SearchInterface
// break at some point so the script does not crash:
$currentTime = microtime(true) - $startTime;
Log::debug(sprintf('Have been running for %f seconds.', $currentTime));
-
} while (!$reachedEndOfList && !$foundEnough && $currentTime <= 30);
$result = $result->slice(0, $this->limit);
@@ -238,7 +232,6 @@ class Search implements SearchInterface
}
}
-
return $collector;
}
@@ -248,12 +241,12 @@ class Search implements SearchInterface
private function extractModifier(string $string)
{
$parts = explode(':', $string);
- if (count($parts) === 2 && strlen(trim(strval($parts[0]))) > 0 && strlen(trim(strval($parts[1])))) {
+ if (2 === count($parts) && strlen(trim(strval($parts[0]))) > 0 && strlen(trim(strval($parts[1])))) {
$type = trim(strval($parts[0]));
$value = trim(strval($parts[1]));
if (in_array($type, $this->validModifiers)) {
// filter for valid type
- $this->modifiers->push(['type' => $type, 'value' => $value,]);
+ $this->modifiers->push(['type' => $type, 'value' => $value]);
}
}
}
@@ -262,6 +255,7 @@ class Search implements SearchInterface
* @param Transaction $transaction
*
* @return bool
+ *
* @throws FireflyException
*/
private function matchModifiers(Transaction $transaction): bool
@@ -281,13 +275,12 @@ class Search implements SearchInterface
// then a for-each and a switch for every possible other thingie.
foreach ($this->modifiers as $modifier) {
$res = Modifier::apply($modifier, $transaction);
- if ($res === false) {
+ if (false === $res) {
return $res;
}
}
return true;
-
}
/**
@@ -298,11 +291,11 @@ class Search implements SearchInterface
*/
private function strposArray(string $haystack, array $needle)
{
- if (strlen($haystack) === 0) {
+ if (0 === strlen($haystack)) {
return false;
}
foreach ($needle as $what) {
- if (stripos($haystack, $what) !== false) {
+ if (false !== stripos($haystack, $what)) {
return true;
}
}
diff --git a/app/Support/Search/SearchInterface.php b/app/Support/Search/SearchInterface.php
index d87d07dbe7..f24c26cfc3 100644
--- a/app/Support/Search/SearchInterface.php
+++ b/app/Support/Search/SearchInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Search;
@@ -27,9 +26,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
/**
- * Interface SearchInterface
- *
- * @package FireflyIII\Support\Search
+ * Interface SearchInterface.
*/
interface SearchInterface
{
@@ -48,7 +45,6 @@ interface SearchInterface
*/
public function parseQuery(string $query);
-
/**
* @return Collection
*/
diff --git a/app/Support/SingleCacheProperties.php b/app/Support/SingleCacheProperties.php
new file mode 100644
index 0000000000..f0b88d108d
--- /dev/null
+++ b/app/Support/SingleCacheProperties.php
@@ -0,0 +1,43 @@
+.
+ */
+declare(strict_types=1);
+
+namespace FireflyIII\Support;
+
+use Illuminate\Support\Collection;
+
+/**
+ * Class CacheProperties.
+ */
+class SingleCacheProperties extends CacheProperties
+{
+ /**
+ *
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->properties = new Collection;
+ if (auth()->check()) {
+ $this->addProperty(auth()->user()->id);
+ }
+ }
+}
diff --git a/app/Support/Steam.php b/app/Support/Steam.php
index 4f3a55c32d..70a95bdb01 100644
--- a/app/Support/Steam.php
+++ b/app/Support/Steam.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support;
@@ -32,15 +31,11 @@ use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Support\Collection;
/**
- * Class Steam
- *
- * @package FireflyIII\Support
+ * Class Steam.
*/
class Steam
{
-
/**
- *
* @param \FireflyIII\Models\Account $account
* @param \Carbon\Carbon $date
*
@@ -48,7 +43,6 @@ class Steam
*/
public function balance(Account $account, Carbon $date): string
{
-
// abuse chart properties:
$cache = new CacheProperties;
$cache->addProperty($account->id);
@@ -59,7 +53,7 @@ class Steam
}
$currencyId = intval($account->getMeta('currency_id'));
// use system default currency:
- if ($currencyId === 0) {
+ if (0 === $currencyId) {
$currency = app('amount')->getDefaultCurrency();
$currencyId = $currency->id;
}
@@ -81,7 +75,7 @@ class Steam
->sum('transactions.foreign_amount')
);
$balance = bcadd($nativeBalance, $foreignBalance);
- $virtual = is_null($account->virtual_balance) ? '0' : strval($account->virtual_balance);
+ $virtual = null === $account->virtual_balance ? '0' : strval($account->virtual_balance);
$balance = bcadd($balance, $virtual);
$cache->store($balance);
@@ -89,7 +83,6 @@ class Steam
}
/**
- *
* @param \FireflyIII\Models\Account $account
* @param \Carbon\Carbon $date
*
@@ -97,7 +90,6 @@ class Steam
*/
public function balanceIgnoreVirtual(Account $account, Carbon $date): string
{
-
// abuse chart properties:
$cache = new CacheProperties;
$cache->addProperty($account->id);
@@ -132,7 +124,7 @@ class Steam
}
/**
- * Gets the balance for the given account during the whole range, using this format:
+ * Gets the balance for the given account during the whole range, using this format:.
*
* [yyyy-mm-dd] => 123,2
*
@@ -187,10 +179,10 @@ class Steam
/** @var Transaction $entry */
foreach ($set as $entry) {
// normal amount and foreign amount
- $modified = is_null($entry->modified) ? '0' : strval($entry->modified);
- $foreignModified = is_null($entry->modified_foreign) ? '0' : strval($entry->modified_foreign);
+ $modified = null === $entry->modified ? '0' : strval($entry->modified);
+ $foreignModified = null === $entry->modified_foreign ? '0' : strval($entry->modified_foreign);
$amount = '0';
- if ($currencyId === $entry->transaction_currency_id || $currencyId === 0) {
+ if ($currencyId === $entry->transaction_currency_id || 0 === $currencyId) {
// use normal amount:
$amount = $modified;
}
@@ -208,8 +200,6 @@ class Steam
$cache->store($balances);
return $balances;
-
-
}
/**
@@ -252,7 +242,7 @@ class Steam
*/
public function decrypt(int $isEncrypted, string $value)
{
- if ($isEncrypted === 1) {
+ if (1 === $isEncrypted) {
return Crypt::decrypt($value);
}
@@ -287,7 +277,7 @@ class Steam
*/
public function negative(string $amount): string
{
- if (bccomp($amount, '0') === 1) {
+ if (1 === bccomp($amount, '0')) {
$amount = bcmul($amount, '-1');
}
@@ -315,21 +305,21 @@ class Steam
{
$string = strtolower($string);
- if (!(stripos($string, 'k') === false)) {
+ if (!(false === stripos($string, 'k'))) {
// has a K in it, remove the K and multiply by 1024.
$bytes = bcmul(rtrim($string, 'kK'), '1024');
return intval($bytes);
}
- if (!(stripos($string, 'm') === false)) {
+ if (!(false === stripos($string, 'm'))) {
// has a M in it, remove the M and multiply by 1048576.
$bytes = bcmul(rtrim($string, 'mM'), '1048576');
return intval($bytes);
}
- if (!(stripos($string, 'g') === false)) {
+ if (!(false === stripos($string, 'g'))) {
// has a G in it, remove the G and multiply by (1024)^3.
$bytes = bcmul(rtrim($string, 'gG'), '1073741824');
@@ -337,8 +327,6 @@ class Steam
}
return intval($string);
-
-
}
/**
@@ -370,5 +358,4 @@ class Steam
return $value;
}
-
}
diff --git a/app/Support/Twig/AmountFormat.php b/app/Support/Twig/AmountFormat.php
index d87c6bf119..98ff3509b7 100644
--- a/app/Support/Twig/AmountFormat.php
+++ b/app/Support/Twig/AmountFormat.php
@@ -18,29 +18,23 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Twig;
-
use FireflyIII\Models\Account as AccountModel;
-use FireflyIII\Models\Transaction as TransactionModel;
use FireflyIII\Models\TransactionCurrency;
-use FireflyIII\Models\TransactionJournal;
use Twig_Extension;
use Twig_SimpleFilter;
use Twig_SimpleFunction;
/**
* Contains all amount formatting routines.
- *
- * @package FireflyIII\Support\Twig
*/
class AmountFormat extends Twig_Extension
{
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function getFilters(): array
{
@@ -48,27 +42,22 @@ class AmountFormat extends Twig_Extension
$this->formatAmount(),
$this->formatAmountPlain(),
];
-
}
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function getFunctions(): array
{
return [
$this->formatAmountByAccount(),
$this->formatAmountBySymbol(),
- $this->transactionAmount(),
- $this->journalAmount(),
- $this->journalTotalAmount(),
$this->formatDestinationAfter(),
$this->formatDestinationBefore(),
$this->formatSourceAfter(),
$this->formatSourceBefore(),
$this->formatAmountByCurrency(),
];
-
}
/**
@@ -82,18 +71,18 @@ class AmountFormat extends Twig_Extension
}
/**
- *
* @return Twig_SimpleFilter
*/
protected function formatAmount(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'formatAmount', function (string $string): string {
+ 'formatAmount',
+ function (string $string): string {
+ $currency = app('amount')->getDefaultCurrency();
- $currency = app('amount')->getDefaultCurrency();
-
- return app('amount')->formatAnything($currency, $string, true);
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($currency, $string, true);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -105,20 +94,20 @@ class AmountFormat extends Twig_Extension
protected function formatAmountByAccount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatAmountByAccount', function (AccountModel $account, string $amount, bool $coloured = true): string {
- $currencyId = intval($account->getMeta('currency_id'));
+ 'formatAmountByAccount',
+ function (AccountModel $account, string $amount, bool $coloured = true): string {
+ $currencyId = intval($account->getMeta('currency_id'));
- if ($currencyId !== 0) {
- $currency = TransactionCurrency::find($currencyId);
+ if (0 !== $currencyId) {
+ $currency = TransactionCurrency::find($currencyId);
+
+ return app('amount')->formatAnything($currency, $amount, $coloured);
+ }
+ $currency = app('amount')->getDefaultCurrency();
return app('amount')->formatAnything($currency, $amount, $coloured);
- }
- $currency = app('amount')->getDefaultCurrency();
-
- return app('amount')->formatAnything($currency, $amount, $coloured);
-
-
- }, ['is_safe' => ['html']]
+ },
+ ['is_safe' => ['html']]
);
}
@@ -130,12 +119,11 @@ class AmountFormat extends Twig_Extension
protected function formatAmountByCurrency(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatAmountByCurrency', function (TransactionCurrency $currency, string $amount, bool $coloured = true): string {
-
- return app('amount')->formatAnything($currency, $amount, $coloured);
-
-
- }, ['is_safe' => ['html']]
+ 'formatAmountByCurrency',
+ function (TransactionCurrency $currency, string $amount, bool $coloured = true): string {
+ return app('amount')->formatAnything($currency, $amount, $coloured);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -147,16 +135,15 @@ class AmountFormat extends Twig_Extension
protected function formatAmountBySymbol(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatAmountBySymbol', function (string $amount, string $symbol, int $decimalPlaces = 2, bool $coloured = true): string {
+ 'formatAmountBySymbol',
+ function (string $amount, string $symbol, int $decimalPlaces = 2, bool $coloured = true): string {
+ $currency = new TransactionCurrency;
+ $currency->symbol = $symbol;
+ $currency->decimal_places = $decimalPlaces;
- $currency = new TransactionCurrency;
- $currency->symbol = $symbol;
- $currency->decimal_places = $decimalPlaces;
-
- return app('amount')->formatAnything($currency, $amount, $coloured);
-
-
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($currency, $amount, $coloured);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -166,12 +153,13 @@ class AmountFormat extends Twig_Extension
protected function formatAmountPlain(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'formatAmountPlain', function (string $string): string {
+ 'formatAmountPlain',
+ function (string $string): string {
+ $currency = app('amount')->getDefaultCurrency();
- $currency = app('amount')->getDefaultCurrency();
-
- return app('amount')->formatAnything($currency, $string, false);
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($currency, $string, false);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -181,27 +169,26 @@ class AmountFormat extends Twig_Extension
protected function formatDestinationAfter(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatDestinationAfter', function (array $transaction): string {
-
- // build fake currency for main amount.
- $format = new TransactionCurrency;
- $format->decimal_places = $transaction['transaction_currency_dp'];
- $format->symbol = $transaction['transaction_currency_symbol'];
- $string = app('amount')->formatAnything($format, $transaction['destination_account_after'], true);
-
- // also append foreign amount for clarity:
- if (!is_null($transaction['foreign_destination_amount'])) {
- // build fake currency for foreign amount
+ 'formatDestinationAfter',
+ function (array $transaction): string {
+ // build fake currency for main amount.
$format = new TransactionCurrency;
- $format->decimal_places = $transaction['foreign_currency_dp'];
- $format->symbol = $transaction['foreign_currency_symbol'];
- $string .= ' (' . app('amount')->formatAnything($format, $transaction['foreign_destination_amount'], true) . ')';
- }
+ $format->decimal_places = $transaction['transaction_currency_dp'];
+ $format->symbol = $transaction['transaction_currency_symbol'];
+ $string = app('amount')->formatAnything($format, $transaction['destination_account_after'], true);
+ // also append foreign amount for clarity:
+ if (null !== $transaction['foreign_destination_amount']) {
+ // build fake currency for foreign amount
+ $format = new TransactionCurrency;
+ $format->decimal_places = $transaction['foreign_currency_dp'];
+ $format->symbol = $transaction['foreign_currency_symbol'];
+ $string .= ' (' . app('amount')->formatAnything($format, $transaction['foreign_destination_amount'], true) . ')';
+ }
- return $string;
-
- }, ['is_safe' => ['html']]
+ return $string;
+ },
+ ['is_safe' => ['html']]
);
}
@@ -211,16 +198,16 @@ class AmountFormat extends Twig_Extension
protected function formatDestinationBefore(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatDestinationBefore', function (array $transaction): string {
+ 'formatDestinationBefore',
+ function (array $transaction): string {
+ // build fake currency for main amount.
+ $format = new TransactionCurrency;
+ $format->decimal_places = $transaction['transaction_currency_dp'];
+ $format->symbol = $transaction['transaction_currency_symbol'];
- // build fake currency for main amount.
- $format = new TransactionCurrency;
- $format->decimal_places = $transaction['transaction_currency_dp'];
- $format->symbol = $transaction['transaction_currency_symbol'];
-
- return app('amount')->formatAnything($format, $transaction['destination_account_before'], true);
-
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($format, $transaction['destination_account_before'], true);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -230,28 +217,26 @@ class AmountFormat extends Twig_Extension
protected function formatSourceAfter(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatSourceAfter', function (array $transaction): string {
-
- // build fake currency for main amount.
- $format = new TransactionCurrency;
- $format->decimal_places = $transaction['transaction_currency_dp'];
- $format->symbol = $transaction['transaction_currency_symbol'];
- $string = app('amount')->formatAnything($format, $transaction['source_account_after'], true);
-
- // also append foreign amount for clarity:
- if (!is_null($transaction['foreign_source_amount'])) {
- // build fake currency for foreign amount
+ 'formatSourceAfter',
+ function (array $transaction): string {
+ // build fake currency for main amount.
$format = new TransactionCurrency;
- $format->decimal_places = $transaction['foreign_currency_dp'];
- $format->symbol = $transaction['foreign_currency_symbol'];
- $string .= ' (' . app('amount')->formatAnything($format, $transaction['foreign_source_amount'], true) . ')';
- }
+ $format->decimal_places = $transaction['transaction_currency_dp'];
+ $format->symbol = $transaction['transaction_currency_symbol'];
+ $string = app('amount')->formatAnything($format, $transaction['source_account_after'], true);
+ // also append foreign amount for clarity:
+ if (null !== $transaction['foreign_source_amount']) {
+ // build fake currency for foreign amount
+ $format = new TransactionCurrency;
+ $format->decimal_places = $transaction['foreign_currency_dp'];
+ $format->symbol = $transaction['foreign_currency_symbol'];
+ $string .= ' (' . app('amount')->formatAnything($format, $transaction['foreign_source_amount'], true) . ')';
+ }
- return $string;
-
-
- }, ['is_safe' => ['html']]
+ return $string;
+ },
+ ['is_safe' => ['html']]
);
}
@@ -261,56 +246,16 @@ class AmountFormat extends Twig_Extension
protected function formatSourceBefore(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatSourceBefore', function (array $transaction): string {
+ 'formatSourceBefore',
+ function (array $transaction): string {
+ // build fake currency for main amount.
+ $format = new TransactionCurrency;
+ $format->decimal_places = $transaction['transaction_currency_dp'];
+ $format->symbol = $transaction['transaction_currency_symbol'];
- // build fake currency for main amount.
- $format = new TransactionCurrency;
- $format->decimal_places = $transaction['transaction_currency_dp'];
- $format->symbol = $transaction['transaction_currency_symbol'];
-
- return app('amount')->formatAnything($format, $transaction['source_account_before'], true);
-
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($format, $transaction['source_account_before'], true);
+ },
+ ['is_safe' => ['html']]
);
}
-
- /**
- * @return Twig_SimpleFunction
- */
- protected function journalAmount(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'journalAmount', function (TransactionJournal $journal): string {
-
- return app('amount')->journalAmount($journal, true);
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @return Twig_SimpleFunction
- */
- protected function journalTotalAmount(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'journalTotalAmount', function (TransactionJournal $journal): string {
-
- return app('amount')->journalTotalAmount($journal, true);
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @return Twig_SimpleFunction
- */
- protected function transactionAmount(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'transactionAmount', function (TransactionModel $transaction): string {
-
- return app('amount')->transactionAmount($transaction, true);
- }, ['is_safe' => ['html']]
- );
- }
-
}
diff --git a/app/Support/Twig/Extension/Transaction.php b/app/Support/Twig/Extension/Transaction.php
new file mode 100644
index 0000000000..ef8e443d78
--- /dev/null
+++ b/app/Support/Twig/Extension/Transaction.php
@@ -0,0 +1,523 @@
+.
+ */
+declare(strict_types=1);
+
+namespace FireflyIII\Support\Twig\Extension;
+
+use FireflyIII\Models\AccountType;
+use FireflyIII\Models\Attachment;
+use FireflyIII\Models\Transaction as TransactionModel;
+use FireflyIII\Models\TransactionCurrency;
+use FireflyIII\Models\TransactionType;
+use FireflyIII\Support\SingleCacheProperties;
+use Lang;
+use Twig_Extension;
+
+/**
+ * Class Transaction.
+ */
+class Transaction extends Twig_Extension
+{
+ /**
+ * Can show the amount of a transaction, if that transaction has been collected by the journal collector.
+ *
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function amount(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('transaction-amount');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+
+ $amount = bcmul(app('steam')->positive(strval($transaction->transaction_amount)), '-1');
+ $format = '%s';
+ $coloured = true;
+
+ // at this point amount is always negative.
+ if (TransactionType::RECONCILIATION === $transaction->transaction_type_type && 1 === bccomp(strval($transaction->transaction_amount), '0')) {
+ $amount = bcmul($amount, '-1');
+ }
+
+ if (TransactionType::DEPOSIT === $transaction->transaction_type_type) {
+ $amount = bcmul($amount, '-1');
+ }
+
+ if (TransactionType::TRANSFER === $transaction->transaction_type_type) {
+ $amount = app('steam')->positive($amount);
+ $coloured = false;
+ $format = '%s ';
+ }
+ if (TransactionType::OPENING_BALANCE === $transaction->transaction_type_type) {
+ $amount = strval($transaction->transaction_amount);
+ }
+
+ $currency = new TransactionCurrency;
+ $currency->symbol = $transaction->transaction_currency_symbol;
+ $currency->decimal_places = $transaction->transaction_currency_dp;
+ $str = sprintf($format, app('amount')->formatAnything($currency, $amount, $coloured));
+
+ if (null !== $transaction->transaction_foreign_amount) {
+ $amount = bcmul(app('steam')->positive(strval($transaction->transaction_foreign_amount)), '-1');
+ if (TransactionType::DEPOSIT === $transaction->transaction_type_type) {
+ $amount = bcmul($amount, '-1');
+ }
+
+ if (TransactionType::TRANSFER === $transaction->transaction_type_type) {
+ $amount = app('steam')->positive($amount);
+ $coloured = false;
+ $format = '%s ';
+ }
+
+ $currency = new TransactionCurrency;
+ $currency->symbol = $transaction->foreign_currency_symbol;
+ $currency->decimal_places = $transaction->foreign_currency_dp;
+ $str .= ' (' . sprintf($format, app('amount')->formatAnything($currency, $amount, $coloured)) . ')';
+ }
+ $cache->store($str);
+
+ return $str;
+ }
+
+ /**
+ * @param array $transaction
+ *
+ * @return string
+ */
+ public function amountArray(array $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('transaction-array-amount');
+ $cache->addProperty($transaction['source_id']);
+ $cache->addProperty($transaction['destination_id']);
+ $cache->addProperty($transaction['updated_at']);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+
+ // first display amount:
+ $amount = TransactionType::WITHDRAWAL === $transaction['journal_type'] ? $transaction['source_amount']
+ : $transaction['destination_amount'];
+ $fakeCurrency = new TransactionCurrency;
+ $fakeCurrency->decimal_places = $transaction['transaction_currency_dp'];
+ $fakeCurrency->symbol = $transaction['transaction_currency_symbol'];
+ $string = app('amount')->formatAnything($fakeCurrency, $amount, true);
+
+ // then display (if present) the foreign amount:
+ if (null !== $transaction['foreign_source_amount']) {
+ $amount = TransactionType::WITHDRAWAL === $transaction['journal_type'] ? $transaction['foreign_source_amount']
+ : $transaction['foreign_destination_amount'];
+ $fakeCurrency = new TransactionCurrency;
+ $fakeCurrency->decimal_places = $transaction['foreign_currency_dp'];
+ $fakeCurrency->symbol = $transaction['foreign_currency_symbol'];
+ $string .= ' (' . app('amount')->formatAnything($fakeCurrency, $amount, true) . ')';
+ }
+ $cache->store($string);
+
+ return $string;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function budgets(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('transaction-budgets');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+
+ // journal has a budget:
+ if (isset($transaction->transaction_journal_budget_id)) {
+ $name = app('steam')->tryDecrypt($transaction->transaction_journal_budget_name);
+ $txt = sprintf('%s ', route('budgets.show', [$transaction->transaction_journal_budget_id]), $name, $name);
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ // transaction has a budget
+ if (isset($transaction->transaction_budget_id)) {
+ $name = app('steam')->tryDecrypt($transaction->transaction_budget_name);
+ $txt = sprintf('%s ', route('budgets.show', [$transaction->transaction_budget_id]), $name, $name);
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ // see if the transaction has a budget:
+ $budgets = $transaction->budgets()->get();
+ if (0 === $budgets->count()) {
+ $budgets = $transaction->transactionJournal()->first()->budgets()->get();
+ }
+ if ($budgets->count() > 0) {
+ $str = [];
+ foreach ($budgets as $budget) {
+ $str[] = sprintf('%s ', route('budgets.show', [$budget->id]), $budget->name, $budget->name);
+ }
+
+ $txt = join(', ', $str);
+ $cache->store($txt);
+
+ return $txt;
+ }
+ $txt = '';
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function categories(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('transaction-categories');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+
+ // journal has a category:
+ if (isset($transaction->transaction_journal_category_id)) {
+ $name = app('steam')->tryDecrypt($transaction->transaction_journal_category_name);
+ $txt = sprintf('%s ', route('categories.show', [$transaction->transaction_journal_category_id]), $name, $name);
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ // transaction has a category:
+ if (isset($transaction->transaction_category_id)) {
+ $name = app('steam')->tryDecrypt($transaction->transaction_category_name);
+ $txt = sprintf('%s ', route('categories.show', [$transaction->transaction_category_id]), $name, $name);
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ // see if the transaction has a category:
+ $categories = $transaction->categories()->get();
+ if (0 === $categories->count()) {
+ $categories = $transaction->transactionJournal()->first()->categories()->get();
+ }
+ if ($categories->count() > 0) {
+ $str = [];
+ foreach ($categories as $category) {
+ $str[] = sprintf('%s ', route('categories.show', [$category->id]), $category->name, $category->name);
+ }
+
+ $txt = join(', ', $str);
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ $txt = '';
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function description(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('description');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+ $description = $transaction->description;
+ if (strlen(strval($transaction->transaction_description)) > 0) {
+ $description = $transaction->transaction_description . '(' . $transaction->description . ')';
+ }
+
+ $cache->store($description);
+
+ return $description;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function destinationAccount(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('transaction-destination');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+
+ if (TransactionType::RECONCILIATION === $transaction->transaction_type_type) {
+ return '—';
+ }
+
+ $name = app('steam')->tryDecrypt($transaction->account_name);
+ $transactionId = intval($transaction->account_id);
+ $type = $transaction->account_type;
+
+ // name is present in object, use that one:
+ if (bccomp($transaction->transaction_amount, '0') === -1 && null !== $transaction->opposing_account_id) {
+ $name = $transaction->opposing_account_name;
+ $transactionId = intval($transaction->opposing_account_id);
+ $type = $transaction->opposing_account_type;
+ }
+
+ // Find the opposing account and use that one:
+ if (bccomp($transaction->transaction_amount, '0') === -1 && null === $transaction->opposing_account_id) {
+ // if the amount is negative, find the opposing account and use that one:
+ $journalId = $transaction->journal_id;
+ /** @var TransactionModel $other */
+ $other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
+ ->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
+ 'identifier',
+ $transaction->identifier
+ )
+ ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
+ ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
+ ->first(['transactions.account_id', 'accounts.encrypted', 'accounts.name', 'account_types.type']);
+ $name = app('steam')->tryDecrypt($other->name);
+ $transactionId = $other->account_id;
+ $type = $other->type;
+ }
+
+ if (AccountType::CASH === $type) {
+ $txt = '(' . trans('firefly.cash') . ') ';
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ $txt = sprintf('%1$s ', e($name), route('accounts.show', [$transactionId]));
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function hasAttachments(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('attachments');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+ $journalId = intval($transaction->journal_id);
+ $count = Attachment::whereNull('deleted_at')
+ ->where('attachable_type', 'FireflyIII\Models\TransactionJournal')
+ ->where('attachable_id', $journalId)
+ ->count();
+ if ($count > 0) {
+ $res = sprintf(' ', Lang::choice('firefly.nr_of_attachments', $count, ['count' => $count]));
+ $cache->store($res);
+
+ return $res;
+ }
+
+ $res = '';
+ $cache->store($res);
+
+ return $res;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function icon(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('icon');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+
+ switch ($transaction->transaction_type_type) {
+ case TransactionType::WITHDRAWAL:
+ $txt = sprintf(' ', trans('firefly.withdrawal'));
+ break;
+ case TransactionType::DEPOSIT:
+ $txt = sprintf(' ', trans('firefly.deposit'));
+ break;
+ case TransactionType::TRANSFER:
+ $txt = sprintf(' ', trans('firefly.transfer'));
+ break;
+ case TransactionType::OPENING_BALANCE:
+ $txt = sprintf(' ', trans('firefly.openingBalance'));
+ break;
+ case TransactionType::RECONCILIATION:
+ $txt = sprintf(' ', trans('firefly.reconciliation_transaction'));
+ break;
+ default:
+ $txt = '';
+ break;
+ }
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function isReconciled(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('transaction-reconciled');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ $cache->addProperty($transaction->reconciled);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+ $icon = '';
+ if (1 === intval($transaction->reconciled)) {
+ $icon = ' ';
+ }
+
+ $cache->store($icon);
+
+ return $icon;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function isSplit(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('split');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+ $journalId = intval($transaction->journal_id);
+ $count = TransactionModel::where('transaction_journal_id', $journalId)->whereNull('deleted_at')->count();
+ if ($count > 2) {
+ $res = ' ';
+ $cache->store($res);
+
+ return $res;
+ }
+
+ $res = '';
+ $cache->store($res);
+
+ return $res;
+ }
+
+ /**
+ * @param TransactionModel $transaction
+ *
+ * @return string
+ */
+ public function sourceAccount(TransactionModel $transaction): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('transaction-source');
+ $cache->addProperty($transaction->id);
+ $cache->addProperty($transaction->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+ if (TransactionType::RECONCILIATION === $transaction->transaction_type_type) {
+ return '—';
+ }
+
+ // if the amount is negative, assume that the current account (the one in $transaction) is indeed the source account.
+ $name = app('steam')->tryDecrypt($transaction->account_name);
+ $transactionId = intval($transaction->account_id);
+ $type = $transaction->account_type;
+
+ // name is present in object, use that one:
+ if (1 === bccomp($transaction->transaction_amount, '0') && null !== $transaction->opposing_account_id) {
+ $name = $transaction->opposing_account_name;
+ $transactionId = intval($transaction->opposing_account_id);
+ $type = $transaction->opposing_account_type;
+ }
+ // Find the opposing account and use that one:
+ if (1 === bccomp($transaction->transaction_amount, '0') && null === $transaction->opposing_account_id) {
+ $journalId = $transaction->journal_id;
+ /** @var TransactionModel $other */
+ $other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
+ ->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
+ 'identifier',
+ $transaction->identifier
+ )
+ ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
+ ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
+ ->first(['transactions.account_id', 'accounts.encrypted', 'accounts.name', 'account_types.type']);
+ $name = app('steam')->tryDecrypt($other->name);
+ $transactionId = $other->account_id;
+ $type = $other->type;
+ }
+
+ if (AccountType::CASH === $type) {
+ $txt = '(' . trans('firefly.cash') . ') ';
+ $cache->store($txt);
+
+ return $txt;
+ }
+
+ $txt = sprintf('%1$s ', e($name), route('accounts.show', [$transactionId]));
+ $cache->store($txt);
+
+ return $txt;
+ }
+}
diff --git a/app/Support/Twig/Extension/TransactionJournal.php b/app/Support/Twig/Extension/TransactionJournal.php
new file mode 100644
index 0000000000..66affea81b
--- /dev/null
+++ b/app/Support/Twig/Extension/TransactionJournal.php
@@ -0,0 +1,88 @@
+.
+ */
+declare(strict_types=1);
+
+namespace FireflyIII\Support\Twig\Extension;
+
+use FireflyIII\Models\Transaction as TransactionModel;
+use FireflyIII\Models\TransactionJournal as JournalModel;
+use FireflyIII\Models\TransactionType;
+use FireflyIII\Support\SingleCacheProperties;
+use Twig_Extension;
+
+class TransactionJournal extends Twig_Extension
+{
+ /**
+ * @param JournalModel $journal
+ *
+ * @return string
+ */
+ public function totalAmount(JournalModel $journal): string
+ {
+ $cache = new SingleCacheProperties;
+ $cache->addProperty('total-amount');
+ $cache->addProperty($journal->id);
+ $cache->addProperty($journal->updated_at);
+ if ($cache->has()) {
+ return $cache->get();
+ }
+
+ $transactions = $journal->transactions()->where('amount', '>', 0)->get();
+ $totals = [];
+ $type = $journal->transactionType->type;
+ /** @var TransactionModel $transaction */
+ foreach ($transactions as $transaction) {
+ $currencyId = $transaction->transaction_currency_id;
+ $currency = $transaction->transactionCurrency;
+
+ if (!isset($totals[$currencyId])) {
+ $totals[$currencyId] = [
+ 'amount' => '0',
+ 'currency' => $currency,
+ ];
+ }
+ $totals[$currencyId]['amount'] = bcadd($transaction->amount, $totals[$currencyId]['amount']);
+
+ if (null !== $transaction->foreign_currency_id) {
+ $foreignId = $transaction->foreign_currency_id;
+ $foreign = $transaction->foreignCurrency;
+ if (!isset($totals[$foreignId])) {
+ $totals[$foreignId] = [
+ 'amount' => '0',
+ 'currency' => $foreign,
+ ];
+ }
+ $totals[$foreignId]['amount'] = bcadd($transaction->foreign_amount, $totals[$foreignId]['amount']);
+ }
+ }
+ $array = [];
+ foreach ($totals as $total) {
+ if (TransactionType::WITHDRAWAL === $type) {
+ $total['amount'] = bcmul($total['amount'], '-1');
+ }
+ $array[] = app('amount')->formatAnything($total['currency'], $total['amount']);
+ }
+ $txt = join(' / ', $array);
+ $cache->store($txt);
+
+ return $txt;
+ }
+}
diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php
index 6e3b303bab..754972cd4a 100644
--- a/app/Support/Twig/General.php
+++ b/app/Support/Twig/General.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Twig;
@@ -26,6 +25,7 @@ namespace FireflyIII\Support\Twig;
use Carbon\Carbon;
use FireflyIII\Models\Account;
use FireflyIII\Models\TransactionJournal;
+use League\CommonMark\CommonMarkConverter;
use Route;
use Steam;
use Twig_Extension;
@@ -33,15 +33,10 @@ use Twig_SimpleFilter;
use Twig_SimpleFunction;
/**
- *
- * Class TwigSupport
- *
- * @package FireflyIII\Support
+ * Class TwigSupport.
*/
class General extends Twig_Extension
{
-
-
/**
* @return array
*/
@@ -51,13 +46,12 @@ class General extends Twig_Extension
$this->balance(),
$this->formatFilesize(),
$this->mimeIcon(),
-
+ $this->markdown(),
];
-
}
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function getFunctions(): array
{
@@ -71,13 +65,11 @@ class General extends Twig_Extension
$this->steamPositive(),
$this->activeRoutePartial(),
$this->activeRoutePartialWhat(),
-
];
-
}
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function getName(): string
{
@@ -93,16 +85,17 @@ class General extends Twig_Extension
protected function activeRoutePartial(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'activeRoutePartial', function (): string {
- $args = func_get_args();
- $route = $args[0]; // name of the route.
- $name = Route::getCurrentRoute()->getName() ?? '';
- if (!(strpos($name, $route) === false)) {
- return 'active';
- }
+ 'activeRoutePartial',
+ function (): string {
+ $args = func_get_args();
+ $route = $args[0]; // name of the route.
+ $name = Route::getCurrentRoute()->getName() ?? '';
+ if (!(false === strpos($name, $route))) {
+ return 'active';
+ }
- return '';
- }
+ return '';
+ }
);
}
@@ -115,18 +108,20 @@ class General extends Twig_Extension
protected function activeRoutePartialWhat(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'activeRoutePartialWhat', function ($context): string {
- $args = func_get_args();
- $route = $args[1]; // name of the route.
- $what = $args[2]; // name of the route.
- $activeWhat = $context['what'] ?? false;
+ 'activeRoutePartialWhat',
+ function ($context): string {
+ $args = func_get_args();
+ $route = $args[1]; // name of the route.
+ $what = $args[2]; // name of the route.
+ $activeWhat = $context['what'] ?? false;
- if ($what === $activeWhat && !(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
- return 'active';
- }
+ if ($what === $activeWhat && !(false === strpos(Route::getCurrentRoute()->getName(), $route))) {
+ return 'active';
+ }
- return '';
- }, ['needs_context' => true]
+ return '';
+ },
+ ['needs_context' => true]
);
}
@@ -139,16 +134,17 @@ class General extends Twig_Extension
protected function activeRouteStrict(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'activeRouteStrict', function (): string {
- $args = func_get_args();
- $route = $args[0]; // name of the route.
+ 'activeRouteStrict',
+ function (): string {
+ $args = func_get_args();
+ $route = $args[0]; // name of the route.
- if (Route::getCurrentRoute()->getName() === $route) {
- return 'active';
+ if (Route::getCurrentRoute()->getName() === $route) {
+ return 'active';
+ }
+
+ return '';
}
-
- return '';
- }
);
}
@@ -158,14 +154,15 @@ class General extends Twig_Extension
protected function balance(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'balance', function (?Account $account): string {
- if (is_null($account)) {
- return 'NULL';
- }
- $date = session('end', Carbon::now()->endOfMonth());
+ 'balance',
+ function (?Account $account): string {
+ if (null === $account) {
+ return 'NULL';
+ }
+ $date = session('end', Carbon::now()->endOfMonth());
- return app('steam')->balance($account, $date);
- }
+ return app('steam')->balance($account, $date);
+ }
);
}
@@ -175,9 +172,10 @@ class General extends Twig_Extension
protected function env(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'env', function (string $name, string $default): string {
- return env($name, $default);
- }
+ 'env',
+ function (string $name, string $default): string {
+ return env($name, $default);
+ }
);
}
@@ -187,33 +185,33 @@ class General extends Twig_Extension
protected function formatFilesize(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'filesize', function (int $size): string {
+ 'filesize',
+ function (int $size): string {
+ // less than one GB, more than one MB
+ if ($size < (1024 * 1024 * 2014) && $size >= (1024 * 1024)) {
+ return round($size / (1024 * 1024), 2) . ' MB';
+ }
- // less than one GB, more than one MB
- if ($size < (1024 * 1024 * 2014) && $size >= (1024 * 1024)) {
- return round($size / (1024 * 1024), 2) . ' MB';
+ // less than one MB
+ if ($size < (1024 * 1024)) {
+ return round($size / 1024, 2) . ' KB';
+ }
+
+ return $size . ' bytes';
}
-
- // less than one MB
- if ($size < (1024 * 1024)) {
- return round($size / 1024, 2) . ' KB';
- }
-
- return $size . ' bytes';
- }
);
}
-
/**
* @return Twig_SimpleFunction
*/
protected function getCurrencyCode(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'getCurrencyCode', function (): string {
- return app('amount')->getCurrencyCode();
- }
+ 'getCurrencyCode',
+ function (): string {
+ return app('amount')->getCurrencyCode();
+ }
);
}
@@ -223,9 +221,25 @@ class General extends Twig_Extension
protected function getCurrencySymbol(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'getCurrencySymbol', function (): string {
- return app('amount')->getCurrencySymbol();
- }
+ 'getCurrencySymbol',
+ function (): string {
+ return app('amount')->getCurrencySymbol();
+ }
+ );
+ }
+
+ /**
+ * @return Twig_SimpleFilter
+ */
+ protected function markdown(): Twig_SimpleFilter
+ {
+ return new Twig_SimpleFilter(
+ 'markdown',
+ function (string $text): string {
+ $converter = new CommonMarkConverter;
+
+ return $converter->convertToHtml($text);
+ }, ['is_safe' => ['html']]
);
}
@@ -235,17 +249,19 @@ class General extends Twig_Extension
protected function mimeIcon(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'mimeIcon', function (string $string): string {
- switch ($string) {
- default:
- return 'fa-file-o';
- case 'application/pdf':
- return 'fa-file-pdf-o';
- case 'image/png':
- case 'image/jpeg':
- return 'fa-file-image-o';
- }
- }, ['is_safe' => ['html']]
+ 'mimeIcon',
+ function (string $string): string {
+ switch ($string) {
+ default:
+ return 'fa-file-o';
+ case 'application/pdf':
+ return 'fa-file-pdf-o';
+ case 'image/png':
+ case 'image/jpeg':
+ return 'fa-file-image-o';
+ }
+ },
+ ['is_safe' => ['html']]
);
}
@@ -255,9 +271,10 @@ class General extends Twig_Extension
protected function phpdate()
{
return new Twig_SimpleFunction(
- 'phpdate', function (string $str): string {
- return date($str);
- }
+ 'phpdate',
+ function (string $str): string {
+ return date($str);
+ }
);
}
@@ -267,9 +284,10 @@ class General extends Twig_Extension
protected function steamPositive()
{
return new Twig_SimpleFunction(
- 'steam_positive', function (string $str): string {
- return Steam::positive($str);
- }
+ 'steam_positive',
+ function (string $str): string {
+ return Steam::positive($str);
+ }
);
}
@@ -279,10 +297,10 @@ class General extends Twig_Extension
private function getAmountFromJournal()
{
return new Twig_SimpleFunction(
- 'getAmount', function (TransactionJournal $journal): string {
- return $journal->amount();
- }
+ 'getAmount',
+ function (TransactionJournal $journal): string {
+ return $journal->amount();
+ }
);
}
-
}
diff --git a/app/Support/Twig/Journal.php b/app/Support/Twig/Journal.php
index df404affd6..1f32719ab3 100644
--- a/app/Support/Twig/Journal.php
+++ b/app/Support/Twig/Journal.php
@@ -18,61 +18,57 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Twig;
-
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\Category;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Support\CacheProperties;
+use FireflyIII\Support\Twig\Extension\TransactionJournal as TransactionJournalExtension;
use Twig_Extension;
use Twig_SimpleFilter;
use Twig_SimpleFunction;
/**
- * Class Journal
- *
- * @package FireflyIII\Support\Twig
+ * Class Journal.
*/
class Journal extends Twig_Extension
{
-
-
/**
* @return Twig_SimpleFunction
*/
public function getDestinationAccount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'destinationAccount', function (TransactionJournal $journal) {
- $cache = new CacheProperties;
- $cache->addProperty($journal->id);
- $cache->addProperty('transaction-journal');
- $cache->addProperty('destination-account-string');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
-
- $list = $journal->destinationAccountList();
- $array = [];
- /** @var Account $entry */
- foreach ($list as $entry) {
- if ($entry->accountType->type === AccountType::CASH) {
- $array[] = '(cash) ';
- continue;
+ 'destinationAccount',
+ function (TransactionJournal $journal) {
+ $cache = new CacheProperties;
+ $cache->addProperty($journal->id);
+ $cache->addProperty('transaction-journal');
+ $cache->addProperty('destination-account-string');
+ if ($cache->has()) {
+ return $cache->get(); // @codeCoverageIgnore
}
- $array[] = sprintf('%1$s ', e($entry->name), route('accounts.show', $entry->id));
- }
- $array = array_unique($array);
- $result = join(', ', $array);
- $cache->store($result);
- return $result;
- }
+ $list = $journal->destinationAccountList();
+ $array = [];
+ /** @var Account $entry */
+ foreach ($list as $entry) {
+ if (AccountType::CASH === $entry->accountType->type) {
+ $array[] = '(cash) ';
+ continue;
+ }
+ $array[] = sprintf('%1$s ', e($entry->name), route('accounts.show', $entry->id));
+ }
+ $array = array_unique($array);
+ $result = join(', ', $array);
+ $cache->store($result);
+
+ return $result;
+ }
);
}
@@ -82,7 +78,7 @@ class Journal extends Twig_Extension
public function getFilters(): array
{
$filters = [
- $this->typeIcon(),
+ new Twig_SimpleFilter('journalTotalAmount', [TransactionJournalExtension::class, 'totalAmount'], ['is_safe' => ['html']]),
];
return $filters;
@@ -119,34 +115,32 @@ class Journal extends Twig_Extension
public function getSourceAccount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'sourceAccount', function (TransactionJournal $journal): string {
-
- $cache = new CacheProperties;
- $cache->addProperty($journal->id);
- $cache->addProperty('transaction-journal');
- $cache->addProperty('source-account-string');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
-
- $list = $journal->sourceAccountList();
- $array = [];
- /** @var Account $entry */
- foreach ($list as $entry) {
- if ($entry->accountType->type === AccountType::CASH) {
- $array[] = '(cash) ';
- continue;
+ 'sourceAccount',
+ function (TransactionJournal $journal): string {
+ $cache = new CacheProperties;
+ $cache->addProperty($journal->id);
+ $cache->addProperty('transaction-journal');
+ $cache->addProperty('source-account-string');
+ if ($cache->has()) {
+ return $cache->get(); // @codeCoverageIgnore
}
- $array[] = sprintf('%1$s ', e($entry->name), route('accounts.show', $entry->id));
+
+ $list = $journal->sourceAccountList();
+ $array = [];
+ /** @var Account $entry */
+ foreach ($list as $entry) {
+ if (AccountType::CASH === $entry->accountType->type) {
+ $array[] = '(cash) ';
+ continue;
+ }
+ $array[] = sprintf('%1$s ', e($entry->name), route('accounts.show', $entry->id));
+ }
+ $array = array_unique($array);
+ $result = join(', ', $array);
+ $cache->store($result);
+
+ return $result;
}
- $array = array_unique($array);
- $result = join(', ', $array);
- $cache->store($result);
-
- return $result;
-
-
- }
);
}
@@ -156,34 +150,32 @@ class Journal extends Twig_Extension
public function journalBudgets(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'journalBudgets', function (TransactionJournal $journal): string {
- $cache = new CacheProperties;
- $cache->addProperty($journal->id);
- $cache->addProperty('transaction-journal');
- $cache->addProperty('budget-string');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
+ 'journalBudgets',
+ function (TransactionJournal $journal): string {
+ $cache = new CacheProperties;
+ $cache->addProperty($journal->id);
+ $cache->addProperty('transaction-journal');
+ $cache->addProperty('budget-string');
+ if ($cache->has()) {
+ return $cache->get(); // @codeCoverageIgnore
+ }
-
- $budgets = [];
- // get all budgets:
- foreach ($journal->budgets as $budget) {
- $budgets[] = sprintf('%1$s ', e($budget->name), route('budgets.show', $budget->id));
- }
- // and more!
- foreach ($journal->transactions as $transaction) {
- foreach ($transaction->budgets as $budget) {
+ $budgets = [];
+ // get all budgets:
+ foreach ($journal->budgets as $budget) {
$budgets[] = sprintf('%1$s ', e($budget->name), route('budgets.show', $budget->id));
}
+ // and more!
+ foreach ($journal->transactions as $transaction) {
+ foreach ($transaction->budgets as $budget) {
+ $budgets[] = sprintf('%1$s ', e($budget->name), route('budgets.show', $budget->id));
+ }
+ }
+ $string = join(', ', array_unique($budgets));
+ $cache->store($string);
+
+ return $string;
}
- $string = join(', ', array_unique($budgets));
- $cache->store($string);
-
- return $string;
-
-
- }
);
}
@@ -193,71 +185,38 @@ class Journal extends Twig_Extension
public function journalCategories(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'journalCategories', function (TransactionJournal $journal): string {
- $cache = new CacheProperties;
- $cache->addProperty($journal->id);
- $cache->addProperty('transaction-journal');
- $cache->addProperty('category-string');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
- $categories = [];
- // get all categories for the journal itself (easy):
- foreach ($journal->categories as $category) {
- $categories[] = sprintf('%1$s ', e($category->name), route('categories.show', $category->id));
- }
- if (count($categories) === 0) {
- $set = Category::distinct()->leftJoin('category_transaction', 'categories.id', '=', 'category_transaction.category_id')
- ->leftJoin('transactions', 'category_transaction.transaction_id', '=', 'transactions.id')
- ->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
- ->where('categories.user_id', $journal->user_id)
- ->where('transaction_journals.id', $journal->id)
- ->get(['categories.*']);
- /** @var Category $category */
- foreach ($set as $category) {
+ 'journalCategories',
+ function (TransactionJournal $journal): string {
+ $cache = new CacheProperties;
+ $cache->addProperty($journal->id);
+ $cache->addProperty('transaction-journal');
+ $cache->addProperty('category-string');
+ if ($cache->has()) {
+ return $cache->get(); // @codeCoverageIgnore
+ }
+ $categories = [];
+ // get all categories for the journal itself (easy):
+ foreach ($journal->categories as $category) {
$categories[] = sprintf('%1$s ', e($category->name), route('categories.show', $category->id));
}
+ if (0 === count($categories)) {
+ $set = Category::distinct()->leftJoin('category_transaction', 'categories.id', '=', 'category_transaction.category_id')
+ ->leftJoin('transactions', 'category_transaction.transaction_id', '=', 'transactions.id')
+ ->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
+ ->where('categories.user_id', $journal->user_id)
+ ->where('transaction_journals.id', $journal->id)
+ ->get(['categories.*']);
+ /** @var Category $category */
+ foreach ($set as $category) {
+ $categories[] = sprintf('%1$s ', e($category->name), route('categories.show', $category->id));
+ }
+ }
+
+ $string = join(', ', array_unique($categories));
+ $cache->store($string);
+
+ return $string;
}
-
- $string = join(', ', array_unique($categories));
- $cache->store($string);
-
- return $string;
- }
);
}
-
- /**
- * @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's 5.
- *
- * @return Twig_SimpleFilter
- */
- protected function typeIcon(): Twig_SimpleFilter
- {
- return new Twig_SimpleFilter(
- 'typeIcon', function (TransactionJournal $journal): string {
-
- switch (true) {
- case $journal->isWithdrawal():
- $txt = sprintf(' ', trans('firefly.withdrawal'));
- break;
- case $journal->isDeposit():
- $txt = sprintf(' ', trans('firefly.deposit'));
- break;
- case $journal->isTransfer():
- $txt = sprintf(' ', trans('firefly.transfer'));
- break;
- case $journal->isOpeningBalance():
- $txt = sprintf(' ', trans('firefly.openingBalance'));
- break;
- default:
- $txt = '';
- break;
- }
-
- return $txt;
- }, ['is_safe' => ['html']]
- );
- }
-
}
diff --git a/app/Support/Twig/Loader/TransactionJournalLoader.php b/app/Support/Twig/Loader/TransactionJournalLoader.php
new file mode 100644
index 0000000000..f0a3de2895
--- /dev/null
+++ b/app/Support/Twig/Loader/TransactionJournalLoader.php
@@ -0,0 +1,52 @@
+.
+ */
+declare(strict_types=1);
+
+namespace FireflyIII\Support\Twig\Loader;
+
+use FireflyIII\Support\Twig\Extension\TransactionJournal;
+use Twig_RuntimeLoaderInterface;
+
+/**
+ * Class TransactionJournalLoader.
+ */
+class TransactionJournalLoader implements Twig_RuntimeLoaderInterface
+{
+ /**
+ * Creates the runtime implementation of a Twig element (filter/function/test).
+ *
+ * @param string $class A runtime class
+ *
+ * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class
+ */
+ public function load($class)
+ {
+ // implement the logic to create an instance of $class
+ // and inject its dependencies
+ // most of the time, it means using your dependency injection container
+
+ if (TransactionJournal::class === $class) {
+ return app(TransactionJournal::class);
+ }
+
+ return null;
+ }
+}
diff --git a/app/Support/Twig/Loader/TransactionLoader.php b/app/Support/Twig/Loader/TransactionLoader.php
new file mode 100644
index 0000000000..a32ee03d43
--- /dev/null
+++ b/app/Support/Twig/Loader/TransactionLoader.php
@@ -0,0 +1,52 @@
+.
+ */
+declare(strict_types=1);
+
+namespace FireflyIII\Support\Twig\Loader;
+
+use FireflyIII\Support\Twig\Extension\Transaction;
+use Twig_RuntimeLoaderInterface;
+
+/**
+ * Class TransactionLoader.
+ */
+class TransactionLoader implements Twig_RuntimeLoaderInterface
+{
+ /**
+ * Creates the runtime implementation of a Twig element (filter/function/test).
+ *
+ * @param string $class A runtime class
+ *
+ * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class
+ */
+ public function load($class)
+ {
+ // implement the logic to create an instance of $class
+ // and inject its dependencies
+ // most of the time, it means using your dependency injection container
+
+ if (Transaction::class === $class) {
+ return app(Transaction::class);
+ }
+
+ return null;
+ }
+}
diff --git a/app/Support/Twig/PiggyBank.php b/app/Support/Twig/PiggyBank.php
index a47da054ea..05d91a04be 100644
--- a/app/Support/Twig/PiggyBank.php
+++ b/app/Support/Twig/PiggyBank.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Twig;
@@ -28,14 +27,10 @@ use Twig_Extension;
use Twig_SimpleFunction;
/**
- *
- * Class PiggyBank
- *
- * @package FireflyIII\Support\Twig
+ * Class PiggyBank.
*/
class PiggyBank extends Twig_Extension
{
-
/**
*
*/
@@ -44,15 +39,17 @@ class PiggyBank extends Twig_Extension
$functions = [];
$functions[] = new Twig_SimpleFunction(
- 'currentRelevantRepAmount', function (PB $piggyBank) {
- return $piggyBank->currentRelevantRep()->currentamount;
- }
+ 'currentRelevantRepAmount',
+ function (PB $piggyBank) {
+ return $piggyBank->currentRelevantRep()->currentamount;
+ }
);
$functions[] = new Twig_SimpleFunction(
- 'suggestedMonthlyAmount', function (PB $piggyBank) {
- return $piggyBank->getSuggestedMonthlyAmount();
- }
+ 'suggestedMonthlyAmount',
+ function (PB $piggyBank) {
+ return $piggyBank->getSuggestedMonthlyAmount();
+ }
);
return $functions;
diff --git a/app/Support/Twig/Rule.php b/app/Support/Twig/Rule.php
index 7c36b5b8ff..9a9350de10 100644
--- a/app/Support/Twig/Rule.php
+++ b/app/Support/Twig/Rule.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Twig;
@@ -28,31 +27,29 @@ use Twig_Extension;
use Twig_SimpleFunction;
/**
- * Class Rule
- *
- * @package FireflyIII\Support\Twig
+ * Class Rule.
*/
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);
- asort($possibleActions);
+ '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);
+ asort($possibleActions);
- return $possibleActions;
- }
+ return $possibleActions;
+ }
);
}
@@ -62,12 +59,13 @@ class Rule extends Twig_Extension
public function allJournalTriggers(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'allJournalTriggers', function () {
- return [
- 'store-journal' => trans('firefly.rule_trigger_store_journal'),
- 'update-journal' => trans('firefly.rule_trigger_update_journal'),
- ];
- }
+ 'allJournalTriggers',
+ function () {
+ return [
+ 'store-journal' => trans('firefly.rule_trigger_store_journal'),
+ 'update-journal' => trans('firefly.rule_trigger_update_journal'),
+ ];
+ }
);
}
@@ -77,22 +75,21 @@ class Rule extends Twig_Extension
public function allRuleTriggers(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'allRuleTriggers', function () {
- $ruleTriggers = array_keys(Config::get('firefly.rule-triggers'));
- $possibleTriggers = [];
- foreach ($ruleTriggers as $key) {
- if ($key !== 'user_action') {
- $possibleTriggers[$key] = trans('firefly.rule_trigger_' . $key . '_choice');
+ 'allRuleTriggers',
+ function () {
+ $ruleTriggers = array_keys(Config::get('firefly.rule-triggers'));
+ $possibleTriggers = [];
+ foreach ($ruleTriggers as $key) {
+ if ('user_action' !== $key) {
+ $possibleTriggers[$key] = trans('firefly.rule_trigger_' . $key . '_choice');
+ }
}
+ unset($key, $ruleTriggers);
+ asort($possibleTriggers);
+
+ return $possibleTriggers;
}
- unset($key, $ruleTriggers);
- asort($possibleTriggers);
-
- return $possibleTriggers;
- }
-
);
-
}
/**
@@ -105,7 +102,6 @@ class Rule extends Twig_Extension
$this->allRuleTriggers(),
$this->allActionTriggers(),
];
-
}
/**
diff --git a/app/Support/Twig/Transaction.php b/app/Support/Twig/Transaction.php
index 9c5bb8406e..c9095e78cd 100644
--- a/app/Support/Twig/Transaction.php
+++ b/app/Support/Twig/Transaction.php
@@ -18,95 +18,41 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Twig;
-use FireflyIII\Models\AccountType;
-use FireflyIII\Models\Attachment;
-use FireflyIII\Models\Transaction as TransactionModel;
-use FireflyIII\Models\TransactionType;
-use FireflyIII\Support\CacheProperties;
-use Lang;
-use Steam;
+use FireflyIII\Support\Twig\Extension\Transaction as TransactionExtension;
use Twig_Extension;
use Twig_SimpleFilter;
-use Twig_SimpleFunction;
/**
- * Class Transaction
- *
- * @package FireflyIII\Support\Twig
+ * Class Transaction.
*/
class Transaction extends Twig_Extension
{
- /**
- * @return Twig_SimpleFunction
- */
- public function attachmentIndicator(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'attachmentIndicator', function (int $journalId) {
-
- $cache = new CacheProperties;
- $cache->addProperty('attachments_journal');
- $cache->addProperty($journalId);
- if ($cache->has()) {
- return $cache->get();
- }
- $count = Attachment::whereNull('deleted_at')
- ->where('attachable_type', 'FireflyIII\Models\TransactionJournal')
- ->where('attachable_id', $journalId)
- ->count();
- if ($count > 0) {
- $res = sprintf(' ', Lang::choice('firefly.nr_of_attachments', $count, ['count' => $count]));
- $cache->store($res);
-
- return $res;
- }
-
- $res = '';
- $cache->store($res);
-
- return $res;
-
-
- }, ['is_safe' => ['html']]
- );
- }
-
/**
* @return array
*/
public function getFilters(): array
{
$filters = [
- $this->typeIconTransaction(),
+ new Twig_SimpleFilter('transactionIcon', [TransactionExtension::class, 'icon'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionDescription', [TransactionExtension::class, 'description']),
+ new Twig_SimpleFilter('transactionIsSplit', [TransactionExtension::class, 'isSplit'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionReconciled', [TransactionExtension::class, 'isReconciled'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionHasAtt', [TransactionExtension::class, 'hasAttachments'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionAmount', [TransactionExtension::class, 'amount'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionArrayAmount', [TransactionExtension::class, 'amountArray'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionBudgets', [TransactionExtension::class, 'budgets'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionCategories', [TransactionExtension::class, 'categories'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionSourceAccount', [TransactionExtension::class, 'sourceAccount'], ['is_safe' => ['html']]),
+ new Twig_SimpleFilter('transactionDestinationAccount', [TransactionExtension::class, 'destinationAccount'], ['is_safe' => ['html']]),
];
return $filters;
}
- /**
- * @return array
- */
- public function getFunctions(): array
- {
- $functions = [
- $this->transactionSourceAccount(),
- $this->transactionDestinationAccount(),
- $this->transactionBudgets(),
- $this->transactionIdBudgets(),
- $this->transactionCategories(),
- $this->transactionIdCategories(),
- $this->splitJournalIndicator(),
- $this->attachmentIndicator(),
- ];
-
- return $functions;
- }
-
/**
* Returns the name of the extension.
*
@@ -116,289 +62,4 @@ class Transaction extends Twig_Extension
{
return 'transaction';
}
-
- /**
- * @return Twig_SimpleFunction
- */
- public function splitJournalIndicator(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'splitJournalIndicator', function (int $journalId) {
-
- $cache = new CacheProperties;
- $cache->addProperty('is_split_journal');
- $cache->addProperty($journalId);
- if ($cache->has()) {
- return $cache->get();
- }
- $count = TransactionModel::where('transaction_journal_id', $journalId)->whereNull('deleted_at')->count();
- if ($count > 2) {
- $res = ' ';
- $cache->store($res);
-
- return $res;
- }
-
- $res = '';
- $cache->store($res);
-
- return $res;
-
-
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @return Twig_SimpleFunction
- */
- public function transactionBudgets(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'transactionBudgets', function (TransactionModel $transaction): string {
- return $this->getTransactionBudgets($transaction);
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @return Twig_SimpleFunction
- */
- public function transactionCategories(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'transactionCategories', function (TransactionModel $transaction): string {
- return $this->getTransactionCategories($transaction);
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @return Twig_SimpleFunction
- */
- public function transactionDestinationAccount(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'transactionDestinationAccount', function (TransactionModel $transaction): string {
-
- $name = Steam::decrypt(intval($transaction->account_encrypted), $transaction->account_name);
- $transactionId = intval($transaction->account_id);
- $type = $transaction->account_type;
-
- // name is present in object, use that one:
- if (bccomp($transaction->transaction_amount, '0') === -1 && !is_null($transaction->opposing_account_id)) {
- $name = $transaction->opposing_account_name;
- $transactionId = intval($transaction->opposing_account_id);
- $type = $transaction->opposing_account_type;
- }
-
- // Find the opposing account and use that one:
- if (bccomp($transaction->transaction_amount, '0') === -1 && is_null($transaction->opposing_account_id)) {
- // if the amount is negative, find the opposing account and use that one:
- $journalId = $transaction->journal_id;
- /** @var TransactionModel $other */
- $other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
- ->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
- 'identifier', $transaction->identifier
- )
- ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
- ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
- ->first(['transactions.account_id', 'accounts.encrypted', 'accounts.name', 'account_types.type']);
- $name = Steam::decrypt(intval($other->encrypted), $other->name);
- $transactionId = $other->account_id;
- $type = $other->type;
- }
-
- if ($type === AccountType::CASH) {
- return '(cash) ';
- }
-
- return sprintf('%1$s ', e($name), route('accounts.show', [$transactionId]));
-
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @return Twig_SimpleFunction
- */
- public function transactionIdBudgets(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'transactionIdBudgets', function (int $transactionId): string {
- $transaction = TransactionModel::find($transactionId);
-
- return $this->getTransactionBudgets($transaction);
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @return Twig_SimpleFunction
- */
- public function transactionIdCategories(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'transactionIdCategories', function (int $transactionId): string {
- $transaction = TransactionModel::find($transactionId);
-
- return $this->getTransactionCategories($transaction);
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @return Twig_SimpleFunction
- */
- public function transactionSourceAccount(): Twig_SimpleFunction
- {
- return new Twig_SimpleFunction(
- 'transactionSourceAccount', function (TransactionModel $transaction): string {
-
- // if the amount is negative, assume that the current account (the one in $transaction) is indeed the source account.
- $name = Steam::decrypt(intval($transaction->account_encrypted), $transaction->account_name);
- $transactionId = intval($transaction->account_id);
- $type = $transaction->account_type;
-
- // name is present in object, use that one:
- if (bccomp($transaction->transaction_amount, '0') === 1 && !is_null($transaction->opposing_account_id)) {
- $name = $transaction->opposing_account_name;
- $transactionId = intval($transaction->opposing_account_id);
- $type = $transaction->opposing_account_type;
- }
- // Find the opposing account and use that one:
- if (bccomp($transaction->transaction_amount, '0') === 1 && is_null($transaction->opposing_account_id)) {
- $journalId = $transaction->journal_id;
- /** @var TransactionModel $other */
- $other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
- ->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
- 'identifier', $transaction->identifier
- )
- ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
- ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
- ->first(['transactions.account_id', 'accounts.encrypted', 'accounts.name', 'account_types.type']);
- $name = Steam::decrypt(intval($other->encrypted), $other->name);
- $transactionId = $other->account_id;
- $type = $other->type;
- }
-
- if ($type === AccountType::CASH) {
- return '(cash) ';
- }
-
- return sprintf('%1$s ', e($name), route('accounts.show', [$transactionId]));
-
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's 5.
- *
- * @return Twig_SimpleFilter
- */
- public function typeIconTransaction(): Twig_SimpleFilter
- {
- return new Twig_SimpleFilter(
- 'typeIconTransaction', function (TransactionModel $transaction): string {
-
- switch ($transaction->transaction_type_type) {
- case TransactionType::WITHDRAWAL:
- $txt = sprintf(' ', trans('firefly.withdrawal'));
- break;
- case TransactionType::DEPOSIT:
- $txt = sprintf(' ', trans('firefly.deposit'));
- break;
- case TransactionType::TRANSFER:
- $txt = sprintf(' ', trans('firefly.transfer'));
- break;
- case TransactionType::OPENING_BALANCE:
- $txt = sprintf(' ', trans('firefly.openingBalance'));
- break;
- default:
- $txt = '';
- break;
- }
-
- return $txt;
- }, ['is_safe' => ['html']]
- );
- }
-
- /**
- * @param TransactionModel $transaction
- *
- * @return string
- */
- private function getTransactionBudgets(TransactionModel $transaction): string
- {
- // journal has a budget:
- if (isset($transaction->transaction_journal_budget_id)) {
- $name = Steam::decrypt(intval($transaction->transaction_journal_budget_encrypted), $transaction->transaction_journal_budget_name);
-
- return sprintf('%s ', route('budgets.show', [$transaction->transaction_journal_budget_id]), $name, $name);
- }
-
- // transaction has a budget
- if (isset($transaction->transaction_budget_id)) {
- $name = Steam::decrypt(intval($transaction->transaction_budget_encrypted), $transaction->transaction_budget_name);
-
- return sprintf('%s ', route('budgets.show', [$transaction->transaction_budget_id]), $name, $name);
- }
-
- // see if the transaction has a budget:
- $budgets = $transaction->budgets()->get();
- if ($budgets->count() === 0) {
- $budgets = $transaction->transactionJournal()->first()->budgets()->get();
- }
- if ($budgets->count() > 0) {
- $str = [];
- foreach ($budgets as $budget) {
- $str[] = sprintf('%s ', route('budgets.show', [$budget->id]), $budget->name, $budget->name);
- }
-
- return join(', ', $str);
- }
-
-
- return '';
- }
-
- /**
- * @param TransactionModel $transaction
- *
- * @return string
- */
- private function getTransactionCategories(TransactionModel $transaction): string
- {
- // journal has a category:
- if (isset($transaction->transaction_journal_category_id)) {
- $name = Steam::decrypt(intval($transaction->transaction_journal_category_encrypted), $transaction->transaction_journal_category_name);
-
- return sprintf('%s ', route('categories.show', [$transaction->transaction_journal_category_id]), $name, $name);
- }
-
- // transaction has a category:
- if (isset($transaction->transaction_category_id)) {
- $name = Steam::decrypt(intval($transaction->transaction_category_encrypted), $transaction->transaction_category_name);
-
- return sprintf('%s ', route('categories.show', [$transaction->transaction_category_id]), $name, $name);
- }
-
- // see if the transaction has a category:
- $categories = $transaction->categories()->get();
- if ($categories->count() === 0) {
- $categories = $transaction->transactionJournal()->first()->categories()->get();
- }
- if ($categories->count() > 0) {
- $str = [];
- foreach ($categories as $category) {
- $str[] = sprintf('%s ', route('categories.show', [$category->id]), $category->name, $category->name);
- }
-
- return join(', ', $str);
- }
-
- return '';
- }
}
diff --git a/app/Support/Twig/Translation.php b/app/Support/Twig/Translation.php
index 95c1456315..fd4ffe1852 100644
--- a/app/Support/Twig/Translation.php
+++ b/app/Support/Twig/Translation.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Support\Twig;
@@ -28,14 +27,10 @@ use Twig_SimpleFilter;
use Twig_SimpleFunction;
/**
- *
- * Class Budget
- *
- * @package FireflyIII\Support\Twig
+ * Class Budget.
*/
class Translation extends Twig_Extension
{
-
/**
* @return array
*/
@@ -44,31 +39,28 @@ class Translation extends Twig_Extension
$filters = [];
$filters[] = new Twig_SimpleFilter(
- '_', function ($name) {
-
- return strval(trans(sprintf('firefly.%s', $name)));
-
- }, ['is_safe' => ['html']]
+ '_',
+ function ($name) {
+ return strval(trans(sprintf('firefly.%s', $name)));
+ },
+ ['is_safe' => ['html']]
);
return $filters;
}
-
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function getFunctions(): array
{
return [
$this->journalLinkTranslation(),
-
];
-
}
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function getName(): string
{
@@ -81,17 +73,17 @@ class Translation extends Twig_Extension
public function journalLinkTranslation(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'journalLinkTranslation', function (string $direction, string $original) {
- $key = sprintf('firefly.%s_%s', $original, $direction);
- $translation = trans($key);
- if ($key === $translation) {
- return $original;
- }
+ 'journalLinkTranslation',
+ function (string $direction, string $original) {
+ $key = sprintf('firefly.%s_%s', $original, $direction);
+ $translation = trans($key);
+ if ($key === $translation) {
+ return $original;
+ }
- return $translation;
-
-
- }, ['is_safe' => ['html']]
+ return $translation;
+ },
+ ['is_safe' => ['html']]
);
}
}
diff --git a/app/TransactionRules/Actions/ActionInterface.php b/app/TransactionRules/Actions/ActionInterface.php
index 4df180fd8e..4b8fe556dc 100644
--- a/app/TransactionRules/Actions/ActionInterface.php
+++ b/app/TransactionRules/Actions/ActionInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -27,9 +26,7 @@ use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
/**
- * Interface ActionInterface
- *
- * @package FireflyIII\TransactionRules\Action
+ * Interface ActionInterface.
*/
interface ActionInterface
{
@@ -41,6 +38,8 @@ interface ActionInterface
public function __construct(RuleAction $action);
/**
+ * Execute the action.
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Actions/AddTag.php b/app/TransactionRules/Actions/AddTag.php
index 0886008566..79514af3a4 100644
--- a/app/TransactionRules/Actions/AddTag.php
+++ b/app/TransactionRules/Actions/AddTag.php
@@ -18,26 +18,21 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\Tag;
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class AddTag
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class AddTag.
*/
class AddTag implements ActionInterface
{
-
- /** @var RuleAction */
+ /** @var RuleAction The rule action */
private $action;
/**
@@ -51,18 +46,19 @@ class AddTag implements ActionInterface
}
/**
+ * Add a tag
+ *
* @param TransactionJournal $journal
*
* @return bool
*/
public function act(TransactionJournal $journal): bool
{
-
// journal has this tag maybe?
$tag = Tag::firstOrCreateEncrypted(['tag' => $this->action->action_value, 'user_id' => $journal->user->id]);
$count = $journal->tags()->where('tag_id', $tag->id)->count();
- if ($count === 0) {
+ if (0 === $count) {
$journal->tags()->save($tag);
Log::debug(sprintf('RuleAction AddTag. Added tag #%d ("%s") to journal %d.', $tag->id, $tag->tag, $journal->id));
diff --git a/app/TransactionRules/Actions/AppendDescription.php b/app/TransactionRules/Actions/AppendDescription.php
index 6fd15be25e..1c15703706 100644
--- a/app/TransactionRules/Actions/AppendDescription.php
+++ b/app/TransactionRules/Actions/AppendDescription.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -28,16 +27,13 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class AppendDescription
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class AppendDescription.
*/
class AppendDescription implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -49,6 +45,8 @@ class AppendDescription implements ActionInterface
}
/**
+ * Append description with X
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Actions/AppendNotes.php b/app/TransactionRules/Actions/AppendNotes.php
index b7d09e7b84..bdfb17838d 100644
--- a/app/TransactionRules/Actions/AppendNotes.php
+++ b/app/TransactionRules/Actions/AppendNotes.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -29,16 +28,13 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class AppendNotes
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class AppendNotes.
*/
class AppendNotes implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -50,6 +46,8 @@ class AppendNotes implements ActionInterface
}
/**
+ * Append notes with X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -57,7 +55,7 @@ class AppendNotes implements ActionInterface
public function act(TransactionJournal $journal): bool
{
$dbNote = $journal->notes()->first();
- if (is_null($dbNote)) {
+ if (null === $dbNote) {
$dbNote = new Note;
$dbNote->noteable()->associate($journal);
}
diff --git a/app/TransactionRules/Actions/ClearBudget.php b/app/TransactionRules/Actions/ClearBudget.php
index b10e3ff7f7..c824651be1 100644
--- a/app/TransactionRules/Actions/ClearBudget.php
+++ b/app/TransactionRules/Actions/ClearBudget.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -28,16 +27,13 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class ClearBudget
- *
- * @package FireflyIII\TransactionRules\Action
+ * Class ClearBudget.
*/
class ClearBudget implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -49,6 +45,8 @@ class ClearBudget implements ActionInterface
}
/**
+ * Clear all budgets
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Actions/ClearCategory.php b/app/TransactionRules/Actions/ClearCategory.php
index 198e9c0218..76456d06fd 100644
--- a/app/TransactionRules/Actions/ClearCategory.php
+++ b/app/TransactionRules/Actions/ClearCategory.php
@@ -18,27 +18,22 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class ClearCategory
- *
- * @package FireflyIII\TransactionRules\Action
+ * Class ClearCategory.
*/
class ClearCategory implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -50,6 +45,8 @@ class ClearCategory implements ActionInterface
}
/**
+ * Clear all categories
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Actions/ClearNotes.php b/app/TransactionRules/Actions/ClearNotes.php
index b1ed669e6c..0c132687cf 100644
--- a/app/TransactionRules/Actions/ClearNotes.php
+++ b/app/TransactionRules/Actions/ClearNotes.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -29,16 +28,13 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class ClearNotes
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class ClearNotes.
*/
class ClearNotes implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -50,6 +46,8 @@ class ClearNotes implements ActionInterface
}
/**
+ * Remove notes
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Actions/PrependDescription.php b/app/TransactionRules/Actions/PrependDescription.php
index dae4a86649..bab0c148ef 100644
--- a/app/TransactionRules/Actions/PrependDescription.php
+++ b/app/TransactionRules/Actions/PrependDescription.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -28,16 +27,13 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class AppendDescription
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class AppendDescription.
*/
class PrependDescription implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -49,6 +45,8 @@ class PrependDescription implements ActionInterface
}
/**
+ * Prepend description with X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -59,7 +57,6 @@ class PrependDescription implements ActionInterface
$journal->description = $this->action->action_value . $journal->description;
$journal->save();
-
return true;
}
}
diff --git a/app/TransactionRules/Actions/PrependNotes.php b/app/TransactionRules/Actions/PrependNotes.php
index ee132f3c2d..30b54ae2fd 100644
--- a/app/TransactionRules/Actions/PrependNotes.php
+++ b/app/TransactionRules/Actions/PrependNotes.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -29,16 +28,13 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class PrependNotes
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class PrependNotes.
*/
class PrependNotes implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -50,6 +46,8 @@ class PrependNotes implements ActionInterface
}
/**
+ * Prepend notes with X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -57,7 +55,7 @@ class PrependNotes implements ActionInterface
public function act(TransactionJournal $journal): bool
{
$dbNote = $journal->notes()->first();
- if (is_null($dbNote)) {
+ if (null === $dbNote) {
$dbNote = new Note;
$dbNote->noteable()->associate($journal);
}
diff --git a/app/TransactionRules/Actions/RemoveAllTags.php b/app/TransactionRules/Actions/RemoveAllTags.php
index e7ca077b4c..f1b506b865 100644
--- a/app/TransactionRules/Actions/RemoveAllTags.php
+++ b/app/TransactionRules/Actions/RemoveAllTags.php
@@ -18,26 +18,22 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class RemoveAllTags
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class RemoveAllTags.
*/
class RemoveAllTags implements ActionInterface
{
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -49,6 +45,8 @@ class RemoveAllTags implements ActionInterface
}
/**
+ * Remove all tags
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -59,6 +57,5 @@ class RemoveAllTags implements ActionInterface
$journal->tags()->detach();
return true;
-
}
}
diff --git a/app/TransactionRules/Actions/RemoveTag.php b/app/TransactionRules/Actions/RemoveTag.php
index a1d7b32a89..a5a2f4d616 100644
--- a/app/TransactionRules/Actions/RemoveTag.php
+++ b/app/TransactionRules/Actions/RemoveTag.php
@@ -18,28 +18,23 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\Tag;
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class RemoveTag
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class RemoveTag.
*/
class RemoveTag implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -51,6 +46,8 @@ class RemoveTag implements ActionInterface
}
/**
+ * Remove tag X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -66,7 +63,7 @@ class RemoveTag implements ActionInterface
}
)->first();
- if (!is_null($tag)) {
+ if (null !== $tag) {
Log::debug(sprintf('RuleAction RemoveTag removed tag #%d ("%s") from journal #%d.', $tag->id, $tag->tag, $journal->id));
$journal->tags()->detach([$tag->id]);
diff --git a/app/TransactionRules/Actions/SetBudget.php b/app/TransactionRules/Actions/SetBudget.php
index a832e7d5f4..40e93a73d3 100644
--- a/app/TransactionRules/Actions/SetBudget.php
+++ b/app/TransactionRules/Actions/SetBudget.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\Budget;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
@@ -32,16 +30,13 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use Log;
/**
- * Class SetBudget
- *
- * @package FireflyIII\TransactionRules\Action
+ * Class SetBudget.
*/
class SetBudget implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -53,6 +48,8 @@ class SetBudget implements ActionInterface
}
/**
+ * Set budget X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -69,14 +66,21 @@ class SetBudget implements ActionInterface
return $current->name === $search;
}
)->first();
- if (is_null($budget)) {
+ if (null === $budget) {
Log::debug(sprintf('RuleAction SetBudget could not set budget of journal #%d to "%s" because no such budget exists.', $journal->id, $search));
return true;
}
- if ($journal->transactionType->type !== TransactionType::WITHDRAWAL) {
- Log::debug(sprintf('RuleAction SetBudget could not set budget of journal #%d to "%s" because journal is a %s.', $journal->id, $search, $journal->transactionType->type));
+ if (TransactionType::WITHDRAWAL !== $journal->transactionType->type) {
+ Log::debug(
+ sprintf(
+ 'RuleAction SetBudget could not set budget of journal #%d to "%s" because journal is a %s.',
+ $journal->id,
+ $search,
+ $journal->transactionType->type
+ )
+ );
return true;
}
@@ -85,7 +89,6 @@ class SetBudget implements ActionInterface
$journal->budgets()->sync([$budget->id]);
-
return true;
}
}
diff --git a/app/TransactionRules/Actions/SetCategory.php b/app/TransactionRules/Actions/SetCategory.php
index 6644dbb10f..09e1bcd3d8 100644
--- a/app/TransactionRules/Actions/SetCategory.php
+++ b/app/TransactionRules/Actions/SetCategory.php
@@ -18,28 +18,23 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\Category;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class SetCategory
- *
- * @package FireflyIII\TransactionRules\Action
+ * Class SetCategory.
*/
class SetCategory implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -51,6 +46,8 @@ class SetCategory implements ActionInterface
}
/**
+ * Set category X
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Actions/SetDescription.php b/app/TransactionRules/Actions/SetDescription.php
index f52a7346b6..1a72105aff 100644
--- a/app/TransactionRules/Actions/SetDescription.php
+++ b/app/TransactionRules/Actions/SetDescription.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -28,17 +27,15 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class SetDescription
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class SetDescription.
*/
class SetDescription implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
+ *
* TriggerInterface constructor.
*
* @param RuleAction $action
@@ -49,6 +46,8 @@ class SetDescription implements ActionInterface
}
/**
+ * Set description to X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -61,7 +60,8 @@ class SetDescription implements ActionInterface
Log::debug(
sprintf(
- 'RuleAction SetDescription changed the description of journal #%d from "%s" to "%s".', $journal->id,
+ 'RuleAction SetDescription changed the description of journal #%d from "%s" to "%s".',
+ $journal->id,
$oldDescription,
$this->action->action_value
)
diff --git a/app/TransactionRules/Actions/SetDestinationAccount.php b/app/TransactionRules/Actions/SetDestinationAccount.php
index 93b96f9905..933d46b1b4 100644
--- a/app/TransactionRules/Actions/SetDestinationAccount.php
+++ b/app/TransactionRules/Actions/SetDestinationAccount.php
@@ -18,12 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\RuleAction;
@@ -33,25 +31,22 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use Log;
/**
- * Class SetDestinationAccount
- *
- * @package FireflyIII\TransactionRules\Action
+ * Class SetDestinationAccount.
*/
class SetDestinationAccount implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
- /** @var TransactionJournal */
+ /** @var TransactionJournal The journal */
private $journal;
- /** @var Account */
+ /** @var Account The new account */
private $newDestinationAccount;
- /** @var AccountRepositoryInterface */
+ /** @var AccountRepositoryInterface Account repository */
private $repository;
-
/**
* TriggerInterface constructor.
*
@@ -63,6 +58,7 @@ class SetDestinationAccount implements ActionInterface
}
/**
+ * Set destination account to X
* @param TransactionJournal $journal
*
* @return bool
@@ -83,11 +79,12 @@ class SetDestinationAccount implements ActionInterface
$type = $journal->transactionType->type;
// if this is a deposit or a transfer, the destination account must be an asset account or a default account, and it MUST exist:
- if (($type === TransactionType::DEPOSIT || $type === TransactionType::TRANSFER) && !$this->findAssetAccount()) {
+ if ((TransactionType::DEPOSIT === $type || TransactionType::TRANSFER === $type) && !$this->findAssetAccount()) {
Log::error(
sprintf(
'Cannot change destination account of journal #%d because no asset account with name "%s" exists.',
- $journal->id, $this->action->action_value
+ $journal->id,
+ $this->action->action_value
)
);
@@ -95,7 +92,7 @@ class SetDestinationAccount implements ActionInterface
}
// if this is a withdrawal, the new destination account must be a expense account and may be created:
- if ($type === TransactionType::WITHDRAWAL) {
+ if (TransactionType::WITHDRAWAL === $type) {
$this->findExpenseAccount();
}
@@ -118,7 +115,7 @@ class SetDestinationAccount implements ActionInterface
{
$account = $this->repository->findByName($this->action->action_value, [AccountType::DEFAULT, AccountType::ASSET]);
- if (is_null($account->id)) {
+ if (null === $account->id) {
Log::debug(sprintf('There is NO asset account called "%s".', $this->action->action_value));
return false;
@@ -135,7 +132,7 @@ class SetDestinationAccount implements ActionInterface
private function findExpenseAccount()
{
$account = $this->repository->findByName($this->action->action_value, [AccountType::EXPENSE]);
- if (is_null($account->id)) {
+ if (null === $account->id) {
// create new revenue account with this name:
$data = [
'name' => $this->action->action_value,
diff --git a/app/TransactionRules/Actions/SetNotes.php b/app/TransactionRules/Actions/SetNotes.php
index a29e14d0ba..c93419f8a2 100644
--- a/app/TransactionRules/Actions/SetNotes.php
+++ b/app/TransactionRules/Actions/SetNotes.php
@@ -29,16 +29,13 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class SetNotes
- *
- * @package FireflyIII\TransactionRules\Actions
+ * Class SetNotes.
*/
class SetNotes implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
-
/**
* TriggerInterface constructor.
*
@@ -50,6 +47,8 @@ class SetNotes implements ActionInterface
}
/**
+ * Set notes to X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -57,7 +56,7 @@ class SetNotes implements ActionInterface
public function act(TransactionJournal $journal): bool
{
$dbNote = $journal->notes()->first();
- if (is_null($dbNote)) {
+ if (null === $dbNote) {
$dbNote = new Note;
$dbNote->noteable()->associate($journal);
}
diff --git a/app/TransactionRules/Actions/SetSourceAccount.php b/app/TransactionRules/Actions/SetSourceAccount.php
index 8654646792..4bdb6be100 100644
--- a/app/TransactionRules/Actions/SetSourceAccount.php
+++ b/app/TransactionRules/Actions/SetSourceAccount.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\RuleAction;
@@ -33,25 +32,22 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use Log;
/**
- * Class SetSourceAccount
- *
- * @package FireflyIII\TransactionRules\Action
+ * Class SetSourceAccount.
*/
class SetSourceAccount implements ActionInterface
{
-
+ /** @var RuleAction The rule action */
private $action;
- /** @var TransactionJournal */
+ /** @var TransactionJournal The journal */
private $journal;
- /** @var Account */
+ /** @var Account The new source account*/
private $newSourceAccount;
- /** @var AccountRepositoryInterface */
+ /** @var AccountRepositoryInterface Account repository */
private $repository;
-
/**
* TriggerInterface constructor.
*
@@ -63,6 +59,8 @@ class SetSourceAccount implements ActionInterface
}
/**
+ * Set source account to X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -82,11 +80,12 @@ class SetSourceAccount implements ActionInterface
// journal type:
$type = $journal->transactionType->type;
// if this is a transfer or a withdrawal, the new source account must be an asset account or a default account, and it MUST exist:
- if (($type === TransactionType::WITHDRAWAL || $type === TransactionType::TRANSFER) && !$this->findAssetAccount()) {
+ if ((TransactionType::WITHDRAWAL === $type || TransactionType::TRANSFER === $type) && !$this->findAssetAccount()) {
Log::error(
sprintf(
'Cannot change source account of journal #%d because no asset account with name "%s" exists.',
- $journal->id, $this->action->action_value
+ $journal->id,
+ $this->action->action_value
)
);
@@ -94,7 +93,7 @@ class SetSourceAccount implements ActionInterface
}
// if this is a deposit, the new source account must be a revenue account and may be created:
- if ($type === TransactionType::DEPOSIT) {
+ if (TransactionType::DEPOSIT === $type) {
$this->findRevenueAccount();
}
@@ -117,7 +116,7 @@ class SetSourceAccount implements ActionInterface
{
$account = $this->repository->findByName($this->action->action_value, [AccountType::DEFAULT, AccountType::ASSET]);
- if (is_null($account->id)) {
+ if (null === $account->id) {
Log::debug(sprintf('There is NO asset account called "%s".', $this->action->action_value));
return false;
@@ -134,7 +133,7 @@ class SetSourceAccount implements ActionInterface
private function findRevenueAccount()
{
$account = $this->repository->findByName($this->action->action_value, [AccountType::REVENUE]);
- if (is_null($account->id)) {
+ if (null === $account->id) {
// create new revenue account with this name:
$data = [
'name' => $this->action->action_value,
diff --git a/app/TransactionRules/Factory/ActionFactory.php b/app/TransactionRules/Factory/ActionFactory.php
index 9d0fe14e52..91c903487e 100644
--- a/app/TransactionRules/Factory/ActionFactory.php
+++ b/app/TransactionRules/Factory/ActionFactory.php
@@ -1,7 +1,7 @@
.
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Factory;
@@ -30,13 +29,13 @@ use FireflyIII\TransactionRules\Actions\ActionInterface;
use Log;
/**
- * @codeCoverageIgnore
- * Class ActionFactory
+ * Class ActionFactory can create actions.
*
- * @package FireflyIII\TransactionRules\Factory
+ * @codeCoverageIgnore
*/
class ActionFactory
{
+ /** @var array array of action types */
protected static $actionTypes = [];
/**
@@ -65,6 +64,7 @@ class ActionFactory
* @param string $actionType
*
* @return string
+ *
* @throws FireflyException
*/
public static function getActionClass(string $actionType): string
@@ -84,13 +84,13 @@ class ActionFactory
}
/**
- * Returns a map with actiontypes, mapped to the class representing that type
+ * Returns a map with actiontypes, mapped to the class representing that type.
*
* @return array
*/
protected static function getActionTypes(): array
{
- if (count(self::$actionTypes) === 0) {
+ if (0 === count(self::$actionTypes)) {
self::$actionTypes = Domain::getRuleActions();
}
diff --git a/app/TransactionRules/Factory/TriggerFactory.php b/app/TransactionRules/Factory/TriggerFactory.php
index 3f7bf3fc28..35cf8f2431 100644
--- a/app/TransactionRules/Factory/TriggerFactory.php
+++ b/app/TransactionRules/Factory/TriggerFactory.php
@@ -1,7 +1,7 @@
.
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Factory;
@@ -31,13 +30,13 @@ use FireflyIII\TransactionRules\Triggers\TriggerInterface;
use Log;
/**
- * @codeCoverageIgnore
- * Interface TriggerInterface
+ * Class TriggerFactory can create triggers.
*
- * @package FireflyIII\TransactionRules\Triggers
+ * @codeCoverageIgnore
*/
class TriggerFactory
{
+ /** @var array array with trigger types */
protected static $triggerTypes = [];
/**
@@ -78,7 +77,9 @@ class TriggerFactory
* @param bool $stopProcessing
*
* @see TriggerFactory::getTrigger
+ *
* @return AbstractTrigger
+ *
* @throws FireflyException
*/
public static function makeTriggerFromStrings(string $triggerType, string $triggerValue, bool $stopProcessing)
@@ -98,7 +99,7 @@ class TriggerFactory
*/
protected static function getTriggerTypes(): array
{
- if (count(self::$triggerTypes) === 0) {
+ if (0 === count(self::$triggerTypes)) {
self::$triggerTypes = Domain::getRuleTriggers();
}
@@ -113,6 +114,7 @@ class TriggerFactory
* @param string $triggerType
*
* @return TriggerInterface|string
+ *
* @throws FireflyException
*/
private static function getTriggerClass(string $triggerType): string
diff --git a/app/TransactionRules/Processor.php b/app/TransactionRules/Processor.php
index 8aed15f659..ad4a3560b7 100644
--- a/app/TransactionRules/Processor.php
+++ b/app/TransactionRules/Processor.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules;
@@ -36,26 +35,23 @@ use Illuminate\Support\Collection;
use Log;
/**
- * Class Processor
- *
- * @package FireflyIII\TransactionRules
+ * Class Processor.
*/
final class Processor
{
- /** @var Collection */
+ /** @var Collection Actions to exectute */
public $actions;
- /** @var TransactionJournal */
+ /** @var TransactionJournal Journal to run them on */
public $journal;
- /** @var Rule */
+ /** @var Rule Rule that applies */
public $rule;
- /** @var Collection */
+ /** @var Collection All triggers*/
public $triggers;
- /** @var int */
- protected $foundTriggers = 0;
+ /** @var int Found triggers */
+ private $foundTriggers = 0;
/**
* Processor constructor.
- *
*/
private function __construct()
{
@@ -68,7 +64,6 @@ final class Processor
* and actions found in the given Rule.
*
* @param Rule $rule
- *
* @param bool $includeActions
*
* @return Processor
@@ -128,7 +123,7 @@ final class Processor
{
$self = new self;
foreach ($triggers as $entry) {
- $entry['value'] = is_null($entry['value']) ? '' : $entry['value'];
+ $entry['value'] = null === $entry['value'] ? '' : $entry['value'];
$trigger = TriggerFactory::makeTriggerFromStrings($entry['type'], $entry['value'], $entry['stopProcessing']);
$self->triggers->push($trigger);
}
@@ -137,6 +132,8 @@ final class Processor
}
/**
+ * Return found triggers
+ *
* @return int
*/
public function getFoundTriggers(): int
@@ -145,6 +142,8 @@ final class Processor
}
/**
+ * Set found triggers
+ *
* @param int $foundTriggers
*/
public function setFoundTriggers(int $foundTriggers)
@@ -153,6 +152,7 @@ final class Processor
}
/**
+ * Returns the rule
*
* @return \FireflyIII\Models\Rule
*/
@@ -185,7 +185,7 @@ final class Processor
Log::debug('Has more than zero actions.');
$this->actions();
}
- if ($this->actions->count() === 0) {
+ if (0 === $this->actions->count()) {
Log::info('Rule has no actions!');
}
@@ -193,7 +193,6 @@ final class Processor
}
return false;
-
}
/**
@@ -220,16 +219,17 @@ final class Processor
}
return false;
-
}
/**
+ * Run the actions
+ *
* @return bool
*/
private function actions()
{
/**
- * @var int $index
+ * @var int
* @var RuleAction $action
*/
foreach ($this->actions as $action) {
@@ -241,7 +241,6 @@ final class Processor
Log::debug('Stop processing now and break.');
break;
}
-
}
return true;
@@ -249,7 +248,7 @@ final class Processor
/**
* Method to check whether the current transaction would be triggered
- * by the given list of triggers
+ * by the given list of triggers.
*
* @return bool
*/
@@ -261,25 +260,21 @@ final class Processor
Log::debug(sprintf('Found triggers starts at %d', $foundTriggers));
/** @var AbstractTrigger $trigger */
foreach ($this->triggers as $trigger) {
- $foundTriggers++;
+ ++$foundTriggers;
Log::debug(sprintf('Now checking trigger %s with value %s', get_class($trigger), $trigger->getTriggerValue()));
/** @var AbstractTrigger $trigger */
if ($trigger->triggered($this->journal)) {
Log::debug('Is a match!');
- $hitTriggers++;
+ ++$hitTriggers;
}
if ($trigger->stopProcessing) {
Log::debug('Stop processing this trigger and break.');
break;
}
-
}
$result = ($hitTriggers === $foundTriggers && $foundTriggers > 0);
Log::debug('Result of triggered()', ['hitTriggers' => $hitTriggers, 'foundTriggers' => $foundTriggers, 'result' => $result]);
return $result;
-
}
-
-
}
diff --git a/app/TransactionRules/TransactionMatcher.php b/app/TransactionRules/TransactionMatcher.php
index 5e32179a2f..49ef27059b 100644
--- a/app/TransactionRules/TransactionMatcher.php
+++ b/app/TransactionRules/TransactionMatcher.php
@@ -1,7 +1,7 @@
.
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules;
@@ -33,21 +32,19 @@ use Log;
/**
* Class TransactionMatcher is used to find a list of
- * transaction matching a set of triggers
- *
- * @package FireflyIII\TransactionRules
+ * transaction matching a set of triggers.
*/
class TransactionMatcher
{
- /** @var int */
+ /** @var int Limit of matcher */
private $limit = 10;
/** @var int Maximum number of transaction to search in (for performance reasons) * */
private $range = 200;
- /** @var Rule */
+ /** @var Rule The rule to apply */
private $rule;
- /** @var JournalTaskerInterface */
+ /** @var JournalTaskerInterface Tasker for some related tasks */
private $tasker;
- /** @var array */
+ /** @var array Types that can be matched using this matcher */
private $transactionTypes = [TransactionType::DEPOSIT, TransactionType::WITHDRAWAL, TransactionType::TRANSFER];
/** @var array List of triggers to match */
private $triggers = [];
@@ -60,7 +57,6 @@ class TransactionMatcher
public function __construct(JournalTaskerInterface $tasker)
{
$this->tasker = $tasker;
-
}
/**
@@ -69,11 +65,10 @@ class TransactionMatcher
* triggers onto each transaction journal until enough matches are found ($limit).
*
* @return Collection
- *
*/
public function findTransactionsByRule()
{
- if (count($this->rule->ruleTriggers) === 0) {
+ if (0 === count($this->rule->ruleTriggers)) {
return new Collection;
}
@@ -94,11 +89,10 @@ class TransactionMatcher
* triggers onto each transaction journal until enough matches are found ($limit).
*
* @return Collection
- *
*/
public function findTransactionsByTriggers(): Collection
{
- if (count($this->triggers) === 0) {
+ if (0 === count($this->triggers)) {
return new Collection;
}
@@ -114,6 +108,7 @@ class TransactionMatcher
}
/**
+ * Return limit
* @return int
*/
public function getLimit(): int
@@ -122,6 +117,8 @@ class TransactionMatcher
}
/**
+ * Set limit
+ *
* @param int $limit
*
* @return TransactionMatcher
@@ -134,6 +131,7 @@ class TransactionMatcher
}
/**
+ * Get range
* @return int
*/
public function getRange(): int
@@ -142,6 +140,8 @@ class TransactionMatcher
}
/**
+ * Set range
+ *
* @param int $range
*
* @return TransactionMatcher
@@ -151,10 +151,10 @@ class TransactionMatcher
$this->range = $range;
return $this;
-
}
/**
+ * Get triggers
* @return array
*/
public function getTriggers(): array
@@ -163,6 +163,8 @@ class TransactionMatcher
}
/**
+ * Set triggers
+ *
* @param array $triggers
*
* @return TransactionMatcher
@@ -175,6 +177,8 @@ class TransactionMatcher
}
/**
+ * Set rule
+ *
* @param Rule $rule
*/
public function setRule(Rule $rule)
@@ -183,6 +187,8 @@ class TransactionMatcher
}
/**
+ * Run the processor.
+ *
* @param Processor $processor
*
* @return Collection
@@ -223,7 +229,7 @@ class TransactionMatcher
Log::debug(sprintf('Total count is now %d', $result->count()));
// Update counters
- $page++;
+ ++$page;
$processed += count($set);
Log::debug(sprintf('Page is now %d, processed is %d', $page, $processed));
@@ -236,11 +242,8 @@ class TransactionMatcher
Log::debug(sprintf('reachedEndOfList: %s', var_export($reachedEndOfList, true)));
Log::debug(sprintf('foundEnough: %s', var_export($foundEnough, true)));
Log::debug(sprintf('searchedEnough: %s', var_export($searchedEnough, true)));
-
} while (!$reachedEndOfList && !$foundEnough && !$searchedEnough);
return $result;
}
-
-
}
diff --git a/app/TransactionRules/Triggers/AbstractTrigger.php b/app/TransactionRules/Triggers/AbstractTrigger.php
index 15368bd015..b6ca47c6ca 100644
--- a/app/TransactionRules/Triggers/AbstractTrigger.php
+++ b/app/TransactionRules/Triggers/AbstractTrigger.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -30,33 +29,34 @@ use FireflyIII\Models\TransactionJournal;
* This class will be magical!
*
* Class AbstractTrigger
- *
- * @package FireflyIII\TransactionRules\Triggers
*/
class AbstractTrigger
{
- /** @var bool */
+ /** @var bool Whether to stop processing after this one is checked. */
public $stopProcessing;
- /** @var string */
+ /** @var string Value to check for */
protected $checkValue;
- /** @var TransactionJournal */
+ /** @var TransactionJournal Journal to check */
protected $journal;
- /** @var RuleTrigger */
+ /** @var RuleTrigger Trigger object */
protected $trigger;
- /** @var string */
+ /** @var string Trigger value */
protected $triggerValue;
/**
* AbstractTrigger constructor.
+ *
* @codeCoverageIgnore
*/
private function __construct()
{
-
}
/**
+ * Make a new trigger from the value given in the string.
+ *
* @codeCoverageIgnore
+ *
* @param string $triggerValue
* @param bool $stopProcessing
*
@@ -72,7 +72,9 @@ class AbstractTrigger
}
/**
+ * Make a new trigger from the rule trigger in the parameter
* @codeCoverageIgnore
+ *
* @param RuleTrigger $trigger
*
* @return AbstractTrigger
@@ -88,7 +90,10 @@ class AbstractTrigger
}
/**
+ * Make a new trigger from a trigger value.
+ *
* @codeCoverageIgnore
+ *
* @param string $triggerValue
*
* @return AbstractTrigger
@@ -102,7 +107,10 @@ class AbstractTrigger
}
/**
+ * Returns trigger
+ *
* @codeCoverageIgnore
+ *
* @return RuleTrigger
*/
public function getTrigger(): RuleTrigger
@@ -111,13 +119,14 @@ class AbstractTrigger
}
/**
+ * Returns trigger value
+ *
* @codeCoverageIgnore
+ *
* @return string
*/
public function getTriggerValue(): string
{
return $this->triggerValue;
}
-
-
}
diff --git a/app/TransactionRules/Triggers/AmountExactly.php b/app/TransactionRules/Triggers/AmountExactly.php
index fadc89c159..b6f040478d 100644
--- a/app/TransactionRules/Triggers/AmountExactly.php
+++ b/app/TransactionRules/Triggers/AmountExactly.php
@@ -18,23 +18,18 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class AmountExactly
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class AmountExactly.
*/
final class AmountExactly extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,7 +48,7 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
+ if (null !== $value) {
return false;
}
Log::error(sprintf('Cannot use %s with a null value.', self::class));
@@ -62,6 +57,8 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
}
/**
+ * When the amount is exactly X.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -71,7 +68,7 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
$amount = $journal->destination_amount ?? $journal->amountPositive();
$compare = $this->triggerValue;
$result = bccomp($amount, $compare);
- if ($result === 0) {
+ if (0 === $result) {
Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %d matches %d exactly, so return true', $journal->id, $amount, $compare));
return true;
@@ -79,6 +76,5 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %d matches %d NOT exactly, so return false', $journal->id, $amount, $compare));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/AmountLess.php b/app/TransactionRules/Triggers/AmountLess.php
index 3879dd193b..7f3538a200 100644
--- a/app/TransactionRules/Triggers/AmountLess.php
+++ b/app/TransactionRules/Triggers/AmountLess.php
@@ -18,23 +18,18 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class AmountLess
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class AmountLess.
*/
final class AmountLess extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,7 +48,7 @@ final class AmountLess extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
+ if (null !== $value) {
return false;
}
Log::error(sprintf('Cannot use %s with a null value.', self::class));
@@ -62,6 +57,8 @@ final class AmountLess extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when amount is less than X.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -80,6 +77,5 @@ final class AmountLess extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger AmountLess for journal #%d: %d is NOT less than %d, so return false', $journal->id, $amount, $compare));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/AmountMore.php b/app/TransactionRules/Triggers/AmountMore.php
index 3f2c798861..5e641a8e11 100644
--- a/app/TransactionRules/Triggers/AmountMore.php
+++ b/app/TransactionRules/Triggers/AmountMore.php
@@ -18,23 +18,18 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class AmountMore
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class AmountMore.
*/
final class AmountMore extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +48,9 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = bccomp('0', strval($value)) === 0;
- if ($res === true) {
+ if (null !== $value) {
+ $res = 0 === bccomp('0', strval($value));
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with a value equal to 0.', self::class));
}
@@ -68,6 +63,8 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when amount is more than X.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -77,7 +74,7 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
$amount = $journal->destination_amount ?? $journal->amountPositive();
$compare = $this->triggerValue;
$result = bccomp($amount, $compare);
- if ($result === 1) {
+ if (1 === $result) {
Log::debug(sprintf('RuleTrigger AmountMore for journal #%d: %d is more than %d, so return true', $journal->id, $amount, $compare));
return true;
@@ -86,6 +83,5 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger AmountMore for journal #%d: %d is NOT more than %d, so return false', $journal->id, $amount, $compare));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/BudgetIs.php b/app/TransactionRules/Triggers/BudgetIs.php
index 73b1afe26b..8a87c96f84 100644
--- a/app/TransactionRules/Triggers/BudgetIs.php
+++ b/app/TransactionRules/Triggers/BudgetIs.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class BudgetIs
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class BudgetIs.
*/
final class BudgetIs extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,7 +49,7 @@ final class BudgetIs extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
+ if (null !== $value) {
return false;
}
Log::error(sprintf('Cannot use %s with a null value.', self::class));
@@ -62,6 +58,8 @@ final class BudgetIs extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when budget is X.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -69,7 +67,7 @@ final class BudgetIs extends AbstractTrigger implements TriggerInterface
public function triggered(TransactionJournal $journal): bool
{
$budget = $journal->budgets()->first();
- if (!is_null($budget)) {
+ if (null !== $budget) {
$name = strtolower($budget->name);
// match on journal:
if ($name === strtolower($this->triggerValue)) {
@@ -79,18 +77,21 @@ final class BudgetIs extends AbstractTrigger implements TriggerInterface
}
}
- if (is_null($budget)) {
+ if (null === $budget) {
// perhaps transactions have this budget?
/** @var Transaction $transaction */
foreach ($journal->transactions as $transaction) {
$budget = $transaction->budgets()->first();
- if (!is_null($budget)) {
+ if (null !== $budget) {
$name = strtolower($budget->name);
if ($name === strtolower($this->triggerValue)) {
Log::debug(
sprintf(
'RuleTrigger BudgetIs for journal #%d (transaction #%d): "%s" is "%s", return true.',
- $journal->id, $transaction->id, $name, $this->triggerValue
+ $journal->id,
+ $transaction->id,
+ $name,
+ $this->triggerValue
)
);
diff --git a/app/TransactionRules/Triggers/CategoryIs.php b/app/TransactionRules/Triggers/CategoryIs.php
index d18aa02a24..840d93d017 100644
--- a/app/TransactionRules/Triggers/CategoryIs.php
+++ b/app/TransactionRules/Triggers/CategoryIs.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class CategoryIs
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class CategoryIs.
*/
final class CategoryIs extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,7 +49,7 @@ final class CategoryIs extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
+ if (null !== $value) {
return false;
}
Log::error(sprintf('Cannot use %s with a null value.', self::class));
@@ -62,6 +58,8 @@ final class CategoryIs extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when category is X.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -69,7 +67,7 @@ final class CategoryIs extends AbstractTrigger implements TriggerInterface
public function triggered(TransactionJournal $journal): bool
{
$category = $journal->categories()->first();
- if (!is_null($category)) {
+ if (null !== $category) {
$name = strtolower($category->name);
// match on journal:
if ($name === strtolower($this->triggerValue)) {
@@ -79,18 +77,21 @@ final class CategoryIs extends AbstractTrigger implements TriggerInterface
}
}
- if (is_null($category)) {
+ if (null === $category) {
// perhaps transactions have this category?
/** @var Transaction $transaction */
foreach ($journal->transactions as $transaction) {
$category = $transaction->categories()->first();
- if (!is_null($category)) {
+ if (null !== $category) {
$name = strtolower($category->name);
if ($name === strtolower($this->triggerValue)) {
Log::debug(
sprintf(
'RuleTrigger CategoryIs for journal #%d (transaction #%d): "%s" is "%s", return true.',
- $journal->id, $transaction->id, $name, $this->triggerValue
+ $journal->id,
+ $transaction->id,
+ $name,
+ $this->triggerValue
)
);
diff --git a/app/TransactionRules/Triggers/DescriptionContains.php b/app/TransactionRules/Triggers/DescriptionContains.php
index 3bc2f0d77d..2a14eb97f0 100644
--- a/app/TransactionRules/Triggers/DescriptionContains.php
+++ b/app/TransactionRules/Triggers/DescriptionContains.php
@@ -18,23 +18,18 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class DescriptionContains
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class DescriptionContains.
*/
final class DescriptionContains extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +48,9 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -68,6 +63,7 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf
}
/**
+ * Returns true when description contains X
* @param TransactionJournal $journal
*
* @return bool
@@ -77,7 +73,7 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf
$search = strtolower($this->triggerValue);
$source = strtolower($journal->description ?? '');
$strpos = stripos($source, $search);
- if (!($strpos === false)) {
+ if (!(false === $strpos)) {
Log::debug(sprintf('RuleTrigger DescriptionContains for journal #%d: "%s" contains "%s", return true.', $journal->id, $source, $search));
return true;
@@ -86,6 +82,5 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf
Log::debug(sprintf('RuleTrigger DescriptionContains for journal #%d: "%s" does NOT contain "%s", return false.', $journal->id, $source, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/DescriptionEnds.php b/app/TransactionRules/Triggers/DescriptionEnds.php
index 5bbb6b5d83..36b077c7f2 100644
--- a/app/TransactionRules/Triggers/DescriptionEnds.php
+++ b/app/TransactionRules/Triggers/DescriptionEnds.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -27,13 +26,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class DescriptionEnds
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class DescriptionEnds.
*/
final class DescriptionEnds extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -52,9 +48,9 @@ final class DescriptionEnds extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class DescriptionEnds extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when description ends with X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -89,7 +87,6 @@ final class DescriptionEnds extends AbstractTrigger implements TriggerInterface
$part = substr($description, $searchLength * -1);
if ($part === $search) {
-
Log::debug(sprintf('RuleTrigger DescriptionEnds for journal #%d: "%s" ends with "%s", return true.', $journal->id, $description, $search));
return true;
diff --git a/app/TransactionRules/Triggers/DescriptionIs.php b/app/TransactionRules/Triggers/DescriptionIs.php
index bd6be247a5..bce888ebfe 100644
--- a/app/TransactionRules/Triggers/DescriptionIs.php
+++ b/app/TransactionRules/Triggers/DescriptionIs.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -27,13 +26,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class DescriptionIs
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class DescriptionIs.
*/
final class DescriptionIs extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -52,7 +48,7 @@ final class DescriptionIs extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
+ if (null !== $value) {
return false;
}
@@ -62,6 +58,8 @@ final class DescriptionIs extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when description is X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -72,7 +70,6 @@ final class DescriptionIs extends AbstractTrigger implements TriggerInterface
$search = strtolower($this->triggerValue);
if ($description === $search) {
-
Log::debug(sprintf('RuleTrigger DescriptionIs for journal #%d: "%s" is "%s", return true.', $journal->id, $description, $search));
return true;
diff --git a/app/TransactionRules/Triggers/DescriptionStarts.php b/app/TransactionRules/Triggers/DescriptionStarts.php
index 9d48ffcc2f..773a58e03a 100644
--- a/app/TransactionRules/Triggers/DescriptionStarts.php
+++ b/app/TransactionRules/Triggers/DescriptionStarts.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -27,13 +26,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class DescriptionStarts
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class DescriptionStarts.
*/
final class DescriptionStarts extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -52,9 +48,9 @@ final class DescriptionStarts extends AbstractTrigger implements TriggerInterfac
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class DescriptionStarts extends AbstractTrigger implements TriggerInterfac
}
/**
+ * Returns true when description starts with X
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Triggers/FromAccountContains.php b/app/TransactionRules/Triggers/FromAccountContains.php
index e6d0472264..8e265a2645 100644
--- a/app/TransactionRules/Triggers/FromAccountContains.php
+++ b/app/TransactionRules/Triggers/FromAccountContains.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class FromAccountContains
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class FromAccountContains.
*/
final class FromAccountContains extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf
}
/**
+ * Returns true when from-account contains X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -83,8 +81,7 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf
$search = strtolower($this->triggerValue);
$strpos = strpos($fromAccountName, $search);
- if (!($strpos === false)) {
-
+ if (!(false === $strpos)) {
Log::debug(sprintf('RuleTrigger FromAccountContains for journal #%d: "%s" contains "%s", return true.', $journal->id, $fromAccountName, $search));
return true;
@@ -93,11 +90,12 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf
Log::debug(
sprintf(
'RuleTrigger FromAccountContains for journal #%d: "%s" does not contain "%s", return false.',
- $journal->id, $fromAccountName, $search
+ $journal->id,
+ $fromAccountName,
+ $search
)
);
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/FromAccountEnds.php b/app/TransactionRules/Triggers/FromAccountEnds.php
index 6e08f5d0de..0c7818ee91 100644
--- a/app/TransactionRules/Triggers/FromAccountEnds.php
+++ b/app/TransactionRules/Triggers/FromAccountEnds.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class FromAccountEnds
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class FromAccountEnds.
*/
final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when from account ends with X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -92,7 +90,6 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
return false;
}
-
$part = substr($name, $searchLength * -1);
if ($part === $search) {
@@ -104,6 +101,5 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger FromAccountEnds for journal #%d: "%s" does not end with "%s", return false.', $journal->id, $name, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/FromAccountIs.php b/app/TransactionRules/Triggers/FromAccountIs.php
index 880cf37072..4c8321f241 100644
--- a/app/TransactionRules/Triggers/FromAccountIs.php
+++ b/app/TransactionRules/Triggers/FromAccountIs.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class FromAccountIs
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class FromAccountIs.
*/
final class FromAccountIs extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class FromAccountIs extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class FromAccountIs extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when from-account is X.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -91,6 +89,5 @@ final class FromAccountIs extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger FromAccountIs for journal #%d: "%s" is NOT "%s", return false.', $journal->id, $name, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/FromAccountStarts.php b/app/TransactionRules/Triggers/FromAccountStarts.php
index 637c3d34d3..117d727273 100644
--- a/app/TransactionRules/Triggers/FromAccountStarts.php
+++ b/app/TransactionRules/Triggers/FromAccountStarts.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class FromAccountStarts
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class FromAccountStarts.
*/
final class FromAccountStarts extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class FromAccountStarts extends AbstractTrigger implements TriggerInterfac
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class FromAccountStarts extends AbstractTrigger implements TriggerInterfac
}
/**
+ * Returns true when from-account starts with X.
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Triggers/HasAnyBudget.php b/app/TransactionRules/Triggers/HasAnyBudget.php
index 66b6016ddc..57d3e7b2b4 100644
--- a/app/TransactionRules/Triggers/HasAnyBudget.php
+++ b/app/TransactionRules/Triggers/HasAnyBudget.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class HasAnyBudget
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class HasAnyBudget.
*/
final class HasAnyBudget extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -57,6 +53,8 @@ final class HasAnyBudget extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when transactions have any budget
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -86,6 +84,5 @@ final class HasAnyBudget extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasAnyBudget for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasAnyCategory.php b/app/TransactionRules/Triggers/HasAnyCategory.php
index 65fdb23723..58177c6603 100644
--- a/app/TransactionRules/Triggers/HasAnyCategory.php
+++ b/app/TransactionRules/Triggers/HasAnyCategory.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class HasAnyCategory
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class HasAnyCategory.
*/
final class HasAnyCategory extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -57,6 +53,8 @@ final class HasAnyCategory extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when journal has any category
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -86,6 +84,5 @@ final class HasAnyCategory extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasAnyCategory for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasAnyTag.php b/app/TransactionRules/Triggers/HasAnyTag.php
index 765f814129..bbc07bdcdc 100644
--- a/app/TransactionRules/Triggers/HasAnyTag.php
+++ b/app/TransactionRules/Triggers/HasAnyTag.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -27,13 +26,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class HasAnyTag
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class HasAnyTag.
*/
final class HasAnyTag extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -56,6 +52,8 @@ final class HasAnyTag extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when journal has any tag
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -71,6 +69,5 @@ final class HasAnyTag extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasAnyTag for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasAttachment.php b/app/TransactionRules/Triggers/HasAttachment.php
index 86aed103ab..b9381cd82f 100644
--- a/app/TransactionRules/Triggers/HasAttachment.php
+++ b/app/TransactionRules/Triggers/HasAttachment.php
@@ -18,18 +18,18 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
+/**
+ * Class HasAttachment
+ */
class HasAttachment extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -57,18 +57,23 @@ class HasAttachment extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when journal has more than X attachments.
+ *
* @param TransactionJournal $journal
*
* @return bool
*/
public function triggered(TransactionJournal $journal): bool
{
- $minimum = intval($this->triggerValue);
+ $minimum = intval($this->triggerValue);
$attachments = $journal->attachments()->count();
if ($attachments >= $minimum) {
Log::debug(
sprintf(
- 'RuleTrigger HasAttachment for journal #%d: count is %d, is more than or equal to %d, return true.', $journal->id, $attachments, $minimum
+ 'RuleTrigger HasAttachment for journal #%d: count is %d, is more than or equal to %d, return true.',
+ $journal->id,
+ $attachments,
+ $minimum
)
);
diff --git a/app/TransactionRules/Triggers/HasNoBudget.php b/app/TransactionRules/Triggers/HasNoBudget.php
index cd35f4ad78..f0990f99fb 100644
--- a/app/TransactionRules/Triggers/HasNoBudget.php
+++ b/app/TransactionRules/Triggers/HasNoBudget.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class HasNoBudget
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class HasNoBudget.
*/
final class HasNoBudget extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -57,6 +53,7 @@ final class HasNoBudget extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when journal has no budget
* @param TransactionJournal $journal
*
* @return bool
@@ -70,7 +67,7 @@ final class HasNoBudget extends AbstractTrigger implements TriggerInterface
foreach ($journal->transactions()->get() as $transaction) {
$count += $transaction->budgets()->count();
}
- if ($count === 0) {
+ if (0 === $count) {
Log::debug(sprintf('RuleTrigger HasNoBudget for journal #%d: count is %d, return true.', $journal->id, $count));
return true;
@@ -79,6 +76,5 @@ final class HasNoBudget extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasNoBudget for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasNoCategory.php b/app/TransactionRules/Triggers/HasNoCategory.php
index ce3a84b678..03c8c18732 100644
--- a/app/TransactionRules/Triggers/HasNoCategory.php
+++ b/app/TransactionRules/Triggers/HasNoCategory.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class HasNoCategory
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class HasNoCategory.
*/
final class HasNoCategory extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -57,6 +53,8 @@ final class HasNoCategory extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when journal has no category
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -71,7 +69,7 @@ final class HasNoCategory extends AbstractTrigger implements TriggerInterface
$count += $transaction->categories()->count();
}
- if ($count === 0) {
+ if (0 === $count) {
Log::debug(sprintf('RuleTrigger HasNoCategory for journal #%d: count is %d, return true.', $journal->id, $count));
return true;
@@ -79,6 +77,5 @@ final class HasNoCategory extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasNoCategory for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasNoTag.php b/app/TransactionRules/Triggers/HasNoTag.php
index b2b610d588..377c2bcdd5 100644
--- a/app/TransactionRules/Triggers/HasNoTag.php
+++ b/app/TransactionRules/Triggers/HasNoTag.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -27,13 +26,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class HasNoTag
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class HasNoTag.
*/
final class HasNoTag extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -56,6 +52,8 @@ final class HasNoTag extends AbstractTrigger implements TriggerInterface
}
/**
+ * Return true when journal has no tags.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -63,7 +61,7 @@ final class HasNoTag extends AbstractTrigger implements TriggerInterface
public function triggered(TransactionJournal $journal): bool
{
$count = $journal->tags()->count();
- if ($count === 0) {
+ if (0 === $count) {
Log::debug(sprintf('RuleTrigger HasNoTag for journal #%d: count is %d, return true.', $journal->id, $count));
return true;
@@ -71,6 +69,5 @@ final class HasNoTag extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasNoTag for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/NotesAny.php b/app/TransactionRules/Triggers/NotesAny.php
index 50c20ca324..6e9b298047 100644
--- a/app/TransactionRules/Triggers/NotesAny.php
+++ b/app/TransactionRules/Triggers/NotesAny.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class NotesAny
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class NotesAny.
*/
final class NotesAny extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -57,6 +53,8 @@ final class NotesAny extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when journal has any notes
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -66,12 +64,11 @@ final class NotesAny extends AbstractTrigger implements TriggerInterface
/** @var Note $note */
$note = $journal->notes()->first();
$text = '';
- if (!is_null($note)) {
+ if (null !== $note) {
$text = $note->text;
}
if (strlen($text) > 0) {
-
Log::debug(sprintf('RuleTrigger NotesEmpty for journal #%d: strlen > 0, return true.', $journal->id));
return true;
diff --git a/app/TransactionRules/Triggers/NotesAre.php b/app/TransactionRules/Triggers/NotesAre.php
index 25a889390d..5aea73ae2b 100644
--- a/app/TransactionRules/Triggers/NotesAre.php
+++ b/app/TransactionRules/Triggers/NotesAre.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class NotesAre
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class NotesAre.
*/
final class NotesAre extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,7 +49,7 @@ final class NotesAre extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
+ if (null !== $value) {
return false;
}
@@ -63,6 +59,8 @@ final class NotesAre extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when notes are specifically X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -72,13 +70,12 @@ final class NotesAre extends AbstractTrigger implements TriggerInterface
/** @var Note $note */
$note = $journal->notes()->first();
$text = '';
- if (!is_null($note)) {
+ if (null !== $note) {
$text = strtolower($note->text);
}
$search = strtolower($this->triggerValue);
if ($text === $search && strlen($text) > 0) {
-
Log::debug(sprintf('RuleTrigger NotesAre for journal #%d: "%s" is "%s", return true.', $journal->id, $text, $search));
return true;
diff --git a/app/TransactionRules/Triggers/NotesContain.php b/app/TransactionRules/Triggers/NotesContain.php
index 4cbbc3fc88..20a8549d56 100644
--- a/app/TransactionRules/Triggers/NotesContain.php
+++ b/app/TransactionRules/Triggers/NotesContain.php
@@ -18,24 +18,19 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class NotesContain
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class NotesContain.
*/
final class NotesContain extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -54,9 +49,9 @@ final class NotesContain extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -69,6 +64,8 @@ final class NotesContain extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when notes contains X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -77,7 +74,7 @@ final class NotesContain extends AbstractTrigger implements TriggerInterface
{
$search = trim(strtolower($this->triggerValue));
- if (strlen($search) === 0) {
+ if (0 === strlen($search)) {
Log::debug(sprintf('RuleTrigger NotesContain for journal #%d: "%s" is empty, return false.', $journal->id, $search));
return false;
@@ -86,14 +83,12 @@ final class NotesContain extends AbstractTrigger implements TriggerInterface
/** @var Note $note */
$note = $journal->notes()->first();
$text = '';
- if (!is_null($note)) {
+ if (null !== $note) {
$text = strtolower($note->text);
}
-
$strpos = strpos($text, $search);
- if (!($strpos === false)) {
-
+ if (!(false === $strpos)) {
Log::debug(sprintf('RuleTrigger NotesContain for journal #%d: "%s" contains "%s", return true.', $journal->id, $text, $search));
return true;
@@ -102,6 +97,5 @@ final class NotesContain extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger NotesContain for journal #%d: "%s" does NOT contain "%s", return false.', $journal->id, $text, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/NotesEmpty.php b/app/TransactionRules/Triggers/NotesEmpty.php
index d53c642857..91af8d7b43 100644
--- a/app/TransactionRules/Triggers/NotesEmpty.php
+++ b/app/TransactionRules/Triggers/NotesEmpty.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class NotesEmpty
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class NotesEmpty.
*/
final class NotesEmpty extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -57,6 +53,8 @@ final class NotesEmpty extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when journal has no notes.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -66,12 +64,11 @@ final class NotesEmpty extends AbstractTrigger implements TriggerInterface
/** @var Note $note */
$note = $journal->notes()->first();
$text = '';
- if (!is_null($note)) {
+ if (null !== $note) {
$text = $note->text;
}
- if (strlen($text) === 0) {
-
+ if (0 === strlen($text)) {
Log::debug(sprintf('RuleTrigger NotesEmpty for journal #%d: strlen is 0, return true.', $journal->id));
return true;
diff --git a/app/TransactionRules/Triggers/NotesEnd.php b/app/TransactionRules/Triggers/NotesEnd.php
index 5e1e3140a6..5ed37b9a04 100644
--- a/app/TransactionRules/Triggers/NotesEnd.php
+++ b/app/TransactionRules/Triggers/NotesEnd.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class NotesEnd
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class NotesEnd.
*/
final class NotesEnd extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class NotesEnd extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -68,6 +64,7 @@ final class NotesEnd extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when notes end with X
* @param TransactionJournal $journal
*
* @return bool
@@ -77,7 +74,7 @@ final class NotesEnd extends AbstractTrigger implements TriggerInterface
/** @var Note $note */
$note = $journal->notes()->first();
$text = '';
- if (!is_null($note)) {
+ if (null !== $note) {
$text = strtolower($note->text);
}
$notesLength = strlen($text);
@@ -95,7 +92,6 @@ final class NotesEnd extends AbstractTrigger implements TriggerInterface
$part = substr($text, $searchLength * -1);
if ($part === $search) {
-
Log::debug(sprintf('RuleTrigger NotesEnd for journal #%d: "%s" ends with "%s", return true.', $journal->id, $text, $search));
return true;
diff --git a/app/TransactionRules/Triggers/NotesStart.php b/app/TransactionRules/Triggers/NotesStart.php
index b5a8eadb71..31bc0b43b1 100644
--- a/app/TransactionRules/Triggers/NotesStart.php
+++ b/app/TransactionRules/Triggers/NotesStart.php
@@ -18,24 +18,19 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class NotesStart
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class NotesStart.
*/
final class NotesStart extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -54,9 +49,9 @@ final class NotesStart extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -69,6 +64,8 @@ final class NotesStart extends AbstractTrigger implements TriggerInterface
}
/**
+ * When the notes start with X.
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -78,7 +75,7 @@ final class NotesStart extends AbstractTrigger implements TriggerInterface
/** @var Note $note */
$note = $journal->notes()->first();
$text = '';
- if (!is_null($note)) {
+ if (null !== $note) {
$text = strtolower($note->text);
}
$search = strtolower($this->triggerValue);
@@ -94,6 +91,5 @@ final class NotesStart extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger NotesStart for journal #%d: "%s" does not start with "%s", return false.', $journal->id, $text, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/TagIs.php b/app/TransactionRules/Triggers/TagIs.php
index 7c7b7b02c9..de0b952de1 100644
--- a/app/TransactionRules/Triggers/TagIs.php
+++ b/app/TransactionRules/Triggers/TagIs.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class TagIs
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class TagIs.
*/
final class TagIs extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,7 +49,7 @@ final class TagIs extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
+ if (null !== $value) {
return false;
}
Log::error(sprintf('Cannot use %s with a null value.', self::class));
@@ -62,6 +58,8 @@ final class TagIs extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when tag is X.
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Triggers/ToAccountContains.php b/app/TransactionRules/Triggers/ToAccountContains.php
index e0085cf76f..e73f575a75 100644
--- a/app/TransactionRules/Triggers/ToAccountContains.php
+++ b/app/TransactionRules/Triggers/ToAccountContains.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class ToAccountContains
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class ToAccountContains.
*/
final class ToAccountContains extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac
}
/**
+ * Returns true when to-account contains X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -83,8 +81,7 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac
$search = strtolower($this->triggerValue);
$strpos = strpos($toAccountName, $search);
- if (!($strpos === false)) {
-
+ if (!(false === $strpos)) {
Log::debug(sprintf('RuleTrigger ToAccountContains for journal #%d: "%s" contains "%s", return true.', $journal->id, $toAccountName, $search));
return true;
@@ -93,7 +90,9 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac
Log::debug(
sprintf(
'RuleTrigger ToAccountContains for journal #%d: "%s" does not contain "%s", return false.',
- $journal->id, $toAccountName, $search
+ $journal->id,
+ $toAccountName,
+ $search
)
);
diff --git a/app/TransactionRules/Triggers/ToAccountEnds.php b/app/TransactionRules/Triggers/ToAccountEnds.php
index 01a8936171..ab623133c8 100644
--- a/app/TransactionRules/Triggers/ToAccountEnds.php
+++ b/app/TransactionRules/Triggers/ToAccountEnds.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class ToAccountEnds
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class ToAccountEnds.
*/
final class ToAccountEnds extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class ToAccountEnds extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class ToAccountEnds extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when to-account ends with X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -92,7 +90,6 @@ final class ToAccountEnds extends AbstractTrigger implements TriggerInterface
return false;
}
-
$part = substr($toAccountName, $searchLength * -1);
if ($part === $search) {
diff --git a/app/TransactionRules/Triggers/ToAccountIs.php b/app/TransactionRules/Triggers/ToAccountIs.php
index c2931cf0f2..ab224ff5a0 100644
--- a/app/TransactionRules/Triggers/ToAccountIs.php
+++ b/app/TransactionRules/Triggers/ToAccountIs.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class ToAccountIs
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class ToAccountIs.
*/
final class ToAccountIs extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,7 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when to-account is X.
* @param TransactionJournal $journal
*
* @return bool
@@ -91,6 +88,5 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger ToAccountIs for journal #%d: "%s" is NOT "%s", return true.', $journal->id, $toAccountName, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/ToAccountStarts.php b/app/TransactionRules/Triggers/ToAccountStarts.php
index e903af5a8a..38b18bcd2a 100644
--- a/app/TransactionRules/Triggers/ToAccountStarts.php
+++ b/app/TransactionRules/Triggers/ToAccountStarts.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -28,13 +27,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class ToAccountStarts
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class ToAccountStarts.
*/
final class ToAccountStarts extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -53,9 +49,9 @@ final class ToAccountStarts extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
- $res = strval($value) === '';
- if ($res === true) {
+ if (null !== $value) {
+ $res = '' === strval($value);
+ if (true === $res) {
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
}
@@ -67,6 +63,8 @@ final class ToAccountStarts extends AbstractTrigger implements TriggerInterface
}
/**
+ * Returns true when to-account starts with X
+ *
* @param TransactionJournal $journal
*
* @return bool
@@ -90,8 +88,6 @@ final class ToAccountStarts extends AbstractTrigger implements TriggerInterface
}
Log::debug(sprintf('RuleTrigger ToAccountStarts for journal #%d: "%s" does not start with "%s", return false.', $journal->id, $toAccountName, $search));
-
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/TransactionType.php b/app/TransactionRules/Triggers/TransactionType.php
index e2ddf1b564..0b15a440e1 100644
--- a/app/TransactionRules/Triggers/TransactionType.php
+++ b/app/TransactionRules/Triggers/TransactionType.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -27,13 +26,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class TransactionType
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class TransactionType.
*/
final class TransactionType extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -52,7 +48,7 @@ final class TransactionType extends AbstractTrigger implements TriggerInterface
*/
public static function willMatchEverything($value = null)
{
- if (!is_null($value)) {
+ if (null !== $value) {
return false;
}
Log::error(sprintf('Cannot use %s with a null value.', self::class));
@@ -61,13 +57,15 @@ final class TransactionType extends AbstractTrigger implements TriggerInterface
}
/**
+ * Return true when transaction type is X
+ *
* @param TransactionJournal $journal
*
* @return bool
*/
public function triggered(TransactionJournal $journal): bool
{
- $type = !is_null($journal->transaction_type_type) ? $journal->transaction_type_type : strtolower($journal->transactionType->type);
+ $type = null !== $journal->transaction_type_type ? $journal->transaction_type_type : strtolower($journal->transactionType->type);
$search = strtolower($this->triggerValue);
if ($type === $search) {
diff --git a/app/TransactionRules/Triggers/TriggerInterface.php b/app/TransactionRules/Triggers/TriggerInterface.php
index 611498f7fc..63c2b57af6 100644
--- a/app/TransactionRules/Triggers/TriggerInterface.php
+++ b/app/TransactionRules/Triggers/TriggerInterface.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -26,13 +25,10 @@ namespace FireflyIII\TransactionRules\Triggers;
use FireflyIII\Models\TransactionJournal;
/**
- * Interface TriggerInterface
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Interface TriggerInterface.
*/
interface TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -52,6 +48,8 @@ interface TriggerInterface
public static function willMatchEverything($value = null);
/**
+ * Triggers on a value and journal.
+ *
* @param TransactionJournal $journal
*
* @return bool
diff --git a/app/TransactionRules/Triggers/UserAction.php b/app/TransactionRules/Triggers/UserAction.php
index cd327c26d3..eb0a99076e 100644
--- a/app/TransactionRules/Triggers/UserAction.php
+++ b/app/TransactionRules/Triggers/UserAction.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
@@ -27,13 +26,10 @@ use FireflyIII\Models\TransactionJournal;
use Log;
/**
- * Class UserAction
- *
- * @package FireflyIII\TransactionRules\Triggers
+ * Class UserAction.
*/
final class UserAction extends AbstractTrigger implements TriggerInterface
{
-
/**
* A trigger is said to "match anything", or match any given transaction,
* when the trigger value is very vague or has no restrictions. Easy examples
@@ -47,6 +43,7 @@ final class UserAction extends AbstractTrigger implements TriggerInterface
* false.
*
* @param null $value
+ *
* @codeCoverageIgnore
*
* @return bool
@@ -60,6 +57,7 @@ final class UserAction extends AbstractTrigger implements TriggerInterface
* This trigger is always triggered, because the rule that it is a part of has been pre-selected on this condition.
*
* @param TransactionJournal $journal
+ *
* @codeCoverageIgnore
*
* @return bool
diff --git a/app/User.php b/app/User.php
index 63ff33060f..1bad9256c7 100644
--- a/app/User.php
+++ b/app/User.php
@@ -18,10 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
-
namespace FireflyIII;
use FireflyIII\Events\RequestedNewPassword;
@@ -34,9 +32,7 @@ use Illuminate\Notifications\Notifiable;
use Request;
/**
- * Class User
- *
- * @package FireflyIII
+ * Class User.
*/
class User extends Authenticatable
{
@@ -63,6 +59,8 @@ class User extends Authenticatable
protected $table = 'users';
/**
+ * Link to accounts.
+ *
* @return HasMany
*/
public function accounts(): HasMany
@@ -91,6 +89,8 @@ class User extends Authenticatable
}
/**
+ * Link to attachments
+ *
* @return HasMany
*/
public function attachments(): HasMany
@@ -99,6 +99,8 @@ class User extends Authenticatable
}
/**
+ * Link to available budgets
+ *
* @return HasMany
*/
public function availableBudgets(): HasMany
@@ -107,6 +109,8 @@ class User extends Authenticatable
}
/**
+ * Link to bills.
+ *
* @return HasMany
*/
public function bills(): HasMany
@@ -115,6 +119,8 @@ class User extends Authenticatable
}
/**
+ * Link to budgets.
+ *
* @return HasMany
*/
public function budgets(): HasMany
@@ -123,6 +129,8 @@ class User extends Authenticatable
}
/**
+ * Link to categories
+ *
* @return HasMany
*/
public function categories(): HasMany
@@ -131,6 +139,8 @@ class User extends Authenticatable
}
/**
+ * Link to currency exchange rates
+ *
* @return HasMany
*/
public function currencyExchangeRates(): HasMany
@@ -139,6 +149,8 @@ class User extends Authenticatable
}
/**
+ * Link to export jobs
+ *
* @return HasMany
*/
public function exportJobs(): HasMany
@@ -147,6 +159,8 @@ class User extends Authenticatable
}
/**
+ * Generates access token.
+ *
* @return string
*/
public function generateAccessToken(): string
@@ -167,7 +181,6 @@ class User extends Authenticatable
*/
public function hasRole(string $name): bool
{
-
foreach ($this->roles as $role) {
if ($role->name === $name) {
return true;
@@ -178,6 +191,8 @@ class User extends Authenticatable
}
/**
+ * Link to import jobs.
+ *
* @return HasMany
*/
public function importJobs(): HasMany
@@ -186,6 +201,8 @@ class User extends Authenticatable
}
/**
+ * Link to piggy banks.
+ *
* @return HasManyThrough
*/
public function piggyBanks(): HasManyThrough
@@ -194,6 +211,8 @@ class User extends Authenticatable
}
/**
+ * Link to preferences.
+ *
* @return HasMany
*/
public function preferences(): HasMany
@@ -202,6 +221,8 @@ class User extends Authenticatable
}
/**
+ * Link to roles.
+ *
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function roles(): BelongsToMany
@@ -210,6 +231,8 @@ class User extends Authenticatable
}
/**
+ * Link to rule groups.
+ *
* @return HasMany
*/
public function ruleGroups(): HasMany
@@ -218,6 +241,8 @@ class User extends Authenticatable
}
/**
+ * Link to rules.
+ *
* @return HasMany
*/
public function rules(): HasMany
@@ -228,9 +253,7 @@ class User extends Authenticatable
/**
* Send the password reset notification.
*
- * @param string $token
- *
- * @return void
+ * @param string $token
*/
public function sendPasswordResetNotification($token)
{
@@ -240,6 +263,8 @@ class User extends Authenticatable
}
/**
+ * Link to tags.
+ *
* @return HasMany
*/
public function tags(): HasMany
@@ -248,6 +273,8 @@ class User extends Authenticatable
}
/**
+ * Link to transaction journals.
+ *
* @return HasMany
*/
public function transactionJournals(): HasMany
@@ -256,12 +283,12 @@ class User extends Authenticatable
}
/**
+ * Link to transactions.
+ *
* @return HasManyThrough
*/
public function transactions(): HasManyThrough
{
return $this->hasManyThrough('FireflyIII\Models\Transaction', 'FireflyIII\Models\TransactionJournal');
}
-
-
}
diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php
index 368b9361ae..95b14b987b 100644
--- a/app/Validation/FireflyValidator.php
+++ b/app/Validation/FireflyValidator.php
@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-
declare(strict_types=1);
namespace FireflyIII\Validation;
@@ -42,20 +41,16 @@ use Illuminate\Contracts\Translation\Translator;
use Illuminate\Validation\Validator;
/**
- * Class FireflyValidator
- *
- * @package FireflyIII\Validation
+ * Class FireflyValidator.
*/
class FireflyValidator extends Validator
{
-
/**
* @param Translator $translator
* @param array $data
* @param array $rules
* @param array $messages
* @param array $customAttributes
- *
*/
public function __construct(Translator $translator, array $data, array $rules, array $messages = [], array $customAttributes = [])
{
@@ -64,15 +59,15 @@ class FireflyValidator extends Validator
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ *
* @param $attribute
* @param $value
*
* @return bool
- *
*/
public function validate2faCode($attribute, $value): bool
{
- if (!is_string($value) || is_null($value) || strlen($value) <> 6) {
+ if (!is_string($value) || null === $value || 6 != strlen($value)) {
return false;
}
@@ -83,6 +78,7 @@ class FireflyValidator extends Validator
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ *
* @param $attribute
* @param $value
* @param $parameters
@@ -93,34 +89,33 @@ class FireflyValidator extends Validator
{
$field = $parameters[1] ?? 'id';
- if (intval($value) === 0) {
+ if (0 === intval($value)) {
return true;
}
$count = DB::table($parameters[0])->where('user_id', auth()->user()->id)->where($field, $value)->count();
- if ($count === 1) {
+ if (1 === $count) {
return true;
}
return false;
-
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ *
* @param $attribute
* @param $value
*
* @return bool
- *
*/
public function validateBic($attribute, $value): bool
{
$regex = '/^[a-z]{6}[0-9a-z]{2}([0-9a-z]{3})?\z/i';
$result = preg_match($regex, $value);
- if ($result === false) {
+ if (false === $result) {
return false;
}
- if ($result === 0) {
+ if (0 === $result) {
return false;
}
@@ -129,15 +124,15 @@ class FireflyValidator extends Validator
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ *
* @param $attribute
* @param $value
*
- *
* @return bool
*/
public function validateIban($attribute, $value): bool
{
- if (!is_string($value) || is_null($value) || strlen($value) < 6) {
+ if (!is_string($value) || null === $value || strlen($value) < 6) {
return false;
}
@@ -145,7 +140,7 @@ class FireflyValidator extends Validator
$search = [' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
$replace = ['', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31',
- '32', '33', '34', '35'];
+ '32', '33', '34', '35',];
// take
$first = substr($value, 0, 4);
@@ -154,7 +149,7 @@ class FireflyValidator extends Validator
$iban = str_replace($search, $replace, $iban);
$checksum = bcmod($iban, '97');
- return (intval($checksum) === 1);
+ return 1 === intval($checksum);
}
/**
@@ -174,6 +169,7 @@ class FireflyValidator extends Validator
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ *
* @param $attribute
* @param $value
* @param $parameters
@@ -184,11 +180,11 @@ class FireflyValidator extends Validator
{
$field = $parameters[1] ?? 'id';
- if (intval($value) === 0) {
+ if (0 === intval($value)) {
return true;
}
$count = DB::table($parameters[0])->where($field, $value)->count();
- if ($count === 1) {
+ if (1 === $count) {
return true;
}
@@ -226,10 +222,9 @@ class FireflyValidator extends Validator
}
)->count();
- return ($count === 1);
+ return 1 === $count;
case 'invalid':
return false;
-
}
}
@@ -257,13 +252,13 @@ class FireflyValidator extends Validator
switch ($name) {
case 'amount_less':
$result = is_numeric($value);
- if ($result === false) {
+ if (false === $result) {
return false;
}
break;
case 'transaction_type':
$count = TransactionType::where('type', $value)->count();
- if (!($count === 1)) {
+ if (!(1 === $count)) {
return false;
}
break;
@@ -279,7 +274,6 @@ class FireflyValidator extends Validator
$class = $classes[$name];
return !($class::willMatchEverything($value));
-
}
return false;
@@ -295,7 +289,7 @@ class FireflyValidator extends Validator
{
$verify = false;
if (isset($this->data['verify_password'])) {
- $verify = intval($this->data['verify_password']) === 1;
+ $verify = 1 === intval($this->data['verify_password']);
}
if ($verify) {
/** @var Verifier $service */
@@ -309,11 +303,11 @@ class FireflyValidator extends Validator
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ *
* @param $attribute
* @param $value
* @param $parameters
*
- *
* @return bool
*/
public function validateUniqueAccountForUser($attribute, $value, $parameters): bool
@@ -334,12 +328,12 @@ class FireflyValidator extends Validator
return $this->validateByAccountId($value);
}
-
return false;
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ *
* @param $attribute
* @param $value
* @param $parameters
@@ -363,13 +357,11 @@ class FireflyValidator extends Validator
/** @var AccountMeta $entry */
foreach ($set as $entry) {
if ($entry->data === $value) {
-
return false;
}
}
return true;
-
}
/**
@@ -384,7 +376,6 @@ class FireflyValidator extends Validator
* @param $value
* @param $parameters
*
- *
* @return bool
*/
public function validateUniqueObjectForUser($attribute, $value, $parameters): bool
@@ -412,6 +403,7 @@ class FireflyValidator extends Validator
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ *
* @param $attribute
* @param $value
* @param $parameters
@@ -423,7 +415,7 @@ class FireflyValidator extends Validator
$exclude = $parameters[0] ?? null;
$query = DB::table('piggy_banks')->whereNull('piggy_banks.deleted_at')
->leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id')->where('accounts.user_id', auth()->user()->id);
- if (!is_null($exclude)) {
+ if (null !== $exclude) {
$query->where('piggy_banks.id', '!=', $exclude);
}
$set = $query->get(['piggy_banks.*']);
@@ -447,7 +439,6 @@ class FireflyValidator extends Validator
private function getRuleTriggerName($index): string
{
return $this->data['rule-trigger'][$index] ?? 'invalid';
-
}
/**
@@ -489,7 +480,6 @@ class FireflyValidator extends Validator
$type = AccountType::find($this->data['account_type_id'])->first();
$value = $this->tryDecrypt($this->data['name']);
-
$set = $user->accounts()->where('account_type_id', $type->id)->get();
/** @var Account $entry */
foreach ($set as $entry) {
@@ -505,7 +495,6 @@ class FireflyValidator extends Validator
* @param $value
*
* @return bool
- *
*/
private function validateByAccountId($value): bool
{
@@ -525,7 +514,6 @@ class FireflyValidator extends Validator
}
return true;
-
}
/**
@@ -549,7 +537,6 @@ class FireflyValidator extends Validator
}
return true;
-
}
/**
@@ -575,4 +562,3 @@ class FireflyValidator extends Validator
return true;
}
}
-
diff --git a/bootstrap/app.php b/bootstrap/app.php
index 3517e6246b..e6099f49e7 100644
--- a/bootstrap/app.php
+++ b/bootstrap/app.php
@@ -21,7 +21,7 @@ bcscale(12);
$app = new Illuminate\Foundation\Application(
- realpath(__DIR__.'/../')
+ realpath(__DIR__ . '/../')
);
/*
@@ -51,33 +51,36 @@ $app->singleton(
);
/* Overrule logging */
-$app->configureMonologUsing(
- function (Logger $monolog) use ($app) {
- $interface = php_sapi_name();
- $path = $app->storagePath() . '/logs/ff3-' . $interface . '.log';
- $level = 'debug';
- if ($app->bound('config')) {
- $level = $app->make('config')->get('app.log_level', 'debug');
+if (env('APP_LOG', 'errorlog') === 'daily') {
+ $app->configureMonologUsing(
+ function (Logger $monolog) use ($app) {
+
+ $interface = php_sapi_name();
+ $path = $app->storagePath() . '/logs/ff3-' . $interface . '.log';
+ $level = 'debug';
+ if ($app->bound('config')) {
+ $level = $app->make('config')->get('app.log_level', 'debug');
+ }
+ $levels = [
+ 'debug' => Logger::DEBUG,
+ 'info' => Logger::INFO,
+ 'notice' => Logger::NOTICE,
+ 'warning' => Logger::WARNING,
+ 'error' => Logger::ERROR,
+ 'critical' => Logger::CRITICAL,
+ 'alert' => Logger::ALERT,
+ 'emergency' => Logger::EMERGENCY,
+ ];
+
+ $useLevel = $levels[$level];
+
+ $formatter = new LineFormatter(null, null, true, true);
+ $handler = new RotatingFileHandler($path, 5, $useLevel);
+ $handler->setFormatter($formatter);
+ $monolog->pushHandler($handler);
}
- $levels = [
- 'debug' => Logger::DEBUG,
- 'info' => Logger::INFO,
- 'notice' => Logger::NOTICE,
- 'warning' => Logger::WARNING,
- 'error' => Logger::ERROR,
- 'critical' => Logger::CRITICAL,
- 'alert' => Logger::ALERT,
- 'emergency' => Logger::EMERGENCY,
- ];
-
- $useLevel = $levels[$level];
-
- $formatter = new LineFormatter(null, null, true, true);
- $handler = new RotatingFileHandler($path, 5, $useLevel);
- $handler->setFormatter($formatter);
- $monolog->pushHandler($handler);
- }
-);
+ );
+}
/*
|--------------------------------------------------------------------------
diff --git a/composer.json b/composer.json
index 7000a1c6d5..ed4265d187 100644
--- a/composer.json
+++ b/composer.json
@@ -104,8 +104,7 @@
"@php artisan key:generate"
],
"post-autoload-dump": [
- "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
- "@php artisan package:discover"
+ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump"
],
"post-update-cmd": [
"php artisan firefly:upgrade-database",
@@ -116,6 +115,9 @@
"post-install-cmd": [
"php artisan optimize",
"php artisan firefly:instructions install"
+ ],
+ "compile": [
+ "@php -r \"file_exists('.env.heroku') || copy('.env.heroku', '.env');\""
]
},
"config": {
diff --git a/composer.lock b/composer.lock
index aefd8fccb3..6cc0578933 100644
--- a/composer.lock
+++ b/composer.lock
@@ -438,16 +438,16 @@
},
{
"name": "doctrine/dbal",
- "version": "v2.6.2",
+ "version": "v2.6.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "1a4ee83a5a709555f2c6f9057a3aacf892451c7e"
+ "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/1a4ee83a5a709555f2c6f9057a3aacf892451c7e",
- "reference": "1a4ee83a5a709555f2c6f9057a3aacf892451c7e",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/e3eed9b1facbb0ced3a0995244843a189e7d1b13",
+ "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13",
"shasum": ""
},
"require": {
@@ -507,7 +507,7 @@
"persistence",
"queryobject"
],
- "time": "2017-08-28T11:02:56+00:00"
+ "time": "2017-11-19T13:38:54+00:00"
},
{
"name": "doctrine/inflector",
@@ -632,16 +632,16 @@
},
{
"name": "egulias/email-validator",
- "version": "2.1.2",
+ "version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
- "reference": "bc31baa11ea2883e017f0a10d9722ef9d50eac1c"
+ "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/bc31baa11ea2883e017f0a10d9722ef9d50eac1c",
- "reference": "bc31baa11ea2883e017f0a10d9722ef9d50eac1c",
+ "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/1bec00a10039b823cc94eef4eddd47dcd3b2ca04",
+ "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04",
"shasum": ""
},
"require": {
@@ -650,8 +650,8 @@
},
"require-dev": {
"dominicsayers/isemail": "dev-master",
- "phpunit/phpunit": "^4.8.0",
- "satooshi/php-coveralls": "dev-master"
+ "phpunit/phpunit": "^4.8.35",
+ "satooshi/php-coveralls": "^1.0.1"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
@@ -685,25 +685,28 @@
"validation",
"validator"
],
- "time": "2017-01-30T22:07:36+00:00"
+ "time": "2017-11-15T23:40:40+00:00"
},
{
"name": "erusev/parsedown",
- "version": "1.6.3",
+ "version": "1.6.4",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
- "reference": "728952b90a333b5c6f77f06ea9422b94b585878d"
+ "reference": "fbe3fe878f4fe69048bb8a52783a09802004f548"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d",
- "reference": "728952b90a333b5c6f77f06ea9422b94b585878d",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/fbe3fe878f4fe69048bb8a52783a09802004f548",
+ "reference": "fbe3fe878f4fe69048bb8a52783a09802004f548",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35"
+ },
"type": "library",
"autoload": {
"psr-0": {
@@ -727,7 +730,7 @@
"markdown",
"parser"
],
- "time": "2017-05-14T14:47:48+00:00"
+ "time": "2017-11-14T20:44:03+00:00"
},
{
"name": "fideloper/proxy",
@@ -788,16 +791,16 @@
},
{
"name": "laravel/framework",
- "version": "v5.5.19",
+ "version": "v5.5.22",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "c678100e84934ec85c9f8bc26bd0a60222682719"
+ "reference": "2404af887ca8272d721628a99bbc721ac3b692e7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/c678100e84934ec85c9f8bc26bd0a60222682719",
- "reference": "c678100e84934ec85c9f8bc26bd0a60222682719",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/2404af887ca8272d721628a99bbc721ac3b692e7",
+ "reference": "2404af887ca8272d721628a99bbc721ac3b692e7",
"shasum": ""
},
"require": {
@@ -871,6 +874,8 @@
"suggest": {
"aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).",
+ "ext-pcntl": "Required to use all features of the queue worker.",
+ "ext-posix": "Required to use all features of the queue worker.",
"fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).",
"guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).",
"laravel/tinker": "Required to use the tinker console command (~1.0).",
@@ -879,7 +884,7 @@
"nexmo/client": "Required to use the Nexmo transport (~1.0).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).",
"predis/predis": "Required to use the redis cache and queue drivers (~1.0).",
- "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).",
+ "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0).",
"symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.3).",
"symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.3).",
"symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)."
@@ -915,7 +920,7 @@
"framework",
"laravel"
],
- "time": "2017-10-25T19:10:45+00:00"
+ "time": "2017-11-27T15:29:55+00:00"
},
{
"name": "laravelcollective/html",
@@ -1871,44 +1876,45 @@
},
{
"name": "symfony/console",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "116bc56e45a8e5572e51eb43ab58c769a352366c"
+ "reference": "9468ad3fba3a5e1f0dc12a96e50e84cddb923cf0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/116bc56e45a8e5572e51eb43ab58c769a352366c",
- "reference": "116bc56e45a8e5572e51eb43ab58c769a352366c",
+ "url": "https://api.github.com/repos/symfony/console/zipball/9468ad3fba3a5e1f0dc12a96e50e84cddb923cf0",
+ "reference": "9468ad3fba3a5e1f0dc12a96e50e84cddb923cf0",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
- "symfony/debug": "~2.8|~3.0",
+ "symfony/debug": "~2.8|~3.0|~4.0",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
- "symfony/dependency-injection": "<3.3"
+ "symfony/dependency-injection": "<3.4",
+ "symfony/process": "<3.3"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~3.3",
- "symfony/dependency-injection": "~3.3",
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/filesystem": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0"
+ "symfony/config": "~3.3|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/event-dispatcher": "~2.8|~3.0|~4.0",
+ "symfony/lock": "~3.4|~4.0",
+ "symfony/process": "~3.3|~4.0"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
- "symfony/filesystem": "",
+ "symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1935,20 +1941,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-29T13:28:14+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "07447650225ca9223bd5c97180fe7c8267f7d332"
+ "reference": "7134b93e90ea7e7881fcb2da006d21b4c5f31908"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/07447650225ca9223bd5c97180fe7c8267f7d332",
- "reference": "07447650225ca9223bd5c97180fe7c8267f7d332",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/7134b93e90ea7e7881fcb2da006d21b4c5f31908",
+ "reference": "7134b93e90ea7e7881fcb2da006d21b4c5f31908",
"shasum": ""
},
"require": {
@@ -1957,7 +1963,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -1988,20 +1994,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-05T16:10:10+00:00"
},
{
"name": "symfony/debug",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd"
+ "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd",
- "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/fb2001e5d85f95d8b6ab94ae3be5d2672df128fd",
+ "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd",
"shasum": ""
},
"require": {
@@ -2012,12 +2018,12 @@
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
- "symfony/http-kernel": "~2.8|~3.0"
+ "symfony/http-kernel": "~2.8|~3.0|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2044,20 +2050,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-21T09:01:46+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.28",
+ "version": "v2.8.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "7fe089232554357efb8d4af65ce209fc6e5a2186"
+ "reference": "b59aacf238fadda50d612c9de73b74751872a903"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7fe089232554357efb8d4af65ce209fc6e5a2186",
- "reference": "7fe089232554357efb8d4af65ce209fc6e5a2186",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b59aacf238fadda50d612c9de73b74751872a903",
+ "reference": "b59aacf238fadda50d612c9de73b74751872a903",
"shasum": ""
},
"require": {
@@ -2104,20 +2110,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2017-10-01T21:00:16+00:00"
+ "time": "2017-11-05T15:25:56+00:00"
},
{
"name": "symfony/finder",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "773e19a491d97926f236942484cb541560ce862d"
+ "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/773e19a491d97926f236942484cb541560ce862d",
- "reference": "773e19a491d97926f236942484cb541560ce862d",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/dac8d7db537bac7ad8143eb11360a8c2231f251a",
+ "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a",
"shasum": ""
},
"require": {
@@ -2126,7 +2132,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2153,33 +2159,34 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-05T16:10:10+00:00"
},
{
"name": "symfony/http-foundation",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8"
+ "reference": "d9625c8abb907e0ca2d7506afd7a719a572c766f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8",
- "reference": "22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d9625c8abb907e0ca2d7506afd7a719a572c766f",
+ "reference": "d9625c8abb907e0ca2d7506afd7a719a572c766f",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
- "symfony/polyfill-mbstring": "~1.1"
+ "symfony/polyfill-mbstring": "~1.1",
+ "symfony/polyfill-php70": "~1.6"
},
"require-dev": {
- "symfony/expression-language": "~2.8|~3.0"
+ "symfony/expression-language": "~2.8|~3.0|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2206,7 +2213,7 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2017-10-05T23:10:23+00:00"
+ "time": "2017-11-30T14:56:21+00:00"
},
{
"name": "symfony/http-kernel",
@@ -2408,6 +2415,65 @@
],
"time": "2017-10-11T12:05:26+00:00"
},
+ {
+ "name": "symfony/polyfill-php70",
+ "version": "v1.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php70.git",
+ "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff",
+ "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff",
+ "shasum": ""
+ },
+ "require": {
+ "paragonie/random_compat": "~1.0|~2.0",
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.6-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php70\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2017-10-11T12:05:26+00:00"
+ },
{
"name": "symfony/polyfill-util",
"version": "v1.6.0",
@@ -2462,16 +2528,16 @@
},
{
"name": "symfony/process",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "fdf89e57a723a29baf536e288d6e232c059697b1"
+ "reference": "db25e810fd5e124085e3777257d0cf4ae533d0ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/fdf89e57a723a29baf536e288d6e232c059697b1",
- "reference": "fdf89e57a723a29baf536e288d6e232c059697b1",
+ "url": "https://api.github.com/repos/symfony/process/zipball/db25e810fd5e124085e3777257d0cf4ae533d0ea",
+ "reference": "db25e810fd5e124085e3777257d0cf4ae533d0ea",
"shasum": ""
},
"require": {
@@ -2480,7 +2546,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2507,20 +2573,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-22T12:18:49+00:00"
},
{
"name": "symfony/routing",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "2e26fa63da029dab49bf9377b3b4f60a8fecb009"
+ "reference": "d768aa5b25d98188bae3fe4ce3eb2924c97aafac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/2e26fa63da029dab49bf9377b3b4f60a8fecb009",
- "reference": "2e26fa63da029dab49bf9377b3b4f60a8fecb009",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/d768aa5b25d98188bae3fe4ce3eb2924c97aafac",
+ "reference": "d768aa5b25d98188bae3fe4ce3eb2924c97aafac",
"shasum": ""
},
"require": {
@@ -2529,17 +2595,17 @@
"conflict": {
"symfony/config": "<2.8",
"symfony/dependency-injection": "<3.3",
- "symfony/yaml": "<3.3"
+ "symfony/yaml": "<3.4"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/common": "~2.2",
"psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/dependency-injection": "~3.3",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/http-foundation": "~2.8|~3.0",
- "symfony/yaml": "~3.3"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/http-foundation": "~2.8|~3.0|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"doctrine/annotations": "For using the annotation loader",
@@ -2552,7 +2618,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2585,20 +2651,20 @@
"uri",
"url"
],
- "time": "2017-10-02T07:25:00+00:00"
+ "time": "2017-11-24T14:13:49+00:00"
},
{
"name": "symfony/translation",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "409bf229cd552bf7e3faa8ab7e3980b07672073f"
+ "reference": "e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/409bf229cd552bf7e3faa8ab7e3980b07672073f",
- "reference": "409bf229cd552bf7e3faa8ab7e3980b07672073f",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa",
+ "reference": "e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa",
"shasum": ""
},
"require": {
@@ -2607,13 +2673,16 @@
},
"conflict": {
"symfony/config": "<2.8",
- "symfony/yaml": "<3.3"
+ "symfony/dependency-injection": "<3.4",
+ "symfony/yaml": "<3.4"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/intl": "^2.8.18|^3.2.5",
- "symfony/yaml": "~3.3"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/finder": "~2.8|~3.0|~4.0",
+ "symfony/intl": "^2.8.18|^3.2.5|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"psr/log": "To use logging capability in translator",
@@ -2623,7 +2692,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2650,20 +2719,20 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-27T14:23:00+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "03e3693a36701f1c581dd24a6d6eea2eba2113f6"
+ "reference": "ec650a975a8e04e0c114d35eab732981243db3a2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/03e3693a36701f1c581dd24a6d6eea2eba2113f6",
- "reference": "03e3693a36701f1c581dd24a6d6eea2eba2113f6",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ec650a975a8e04e0c114d35eab732981243db3a2",
+ "reference": "ec650a975a8e04e0c114d35eab732981243db3a2",
"shasum": ""
},
"require": {
@@ -2679,12 +2748,13 @@
},
"suggest": {
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
+ "ext-intl": "To show region name in time zone dump",
"ext-symfony_debug": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2718,7 +2788,7 @@
"debug",
"dump"
],
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-30T14:59:23+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@@ -2880,16 +2950,16 @@
},
{
"name": "watson/validating",
- "version": "3.1.1",
+ "version": "3.1.2",
"source": {
"type": "git",
"url": "https://github.com/dwightwatson/validating.git",
- "reference": "ade13078bf2e820e244603446114a28eda51b08c"
+ "reference": "22edd06d45893f5d4f79c9e901bd7fbce174a79f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dwightwatson/validating/zipball/ade13078bf2e820e244603446114a28eda51b08c",
- "reference": "ade13078bf2e820e244603446114a28eda51b08c",
+ "url": "https://api.github.com/repos/dwightwatson/validating/zipball/22edd06d45893f5d4f79c9e901bd7fbce174a79f",
+ "reference": "22edd06d45893f5d4f79c9e901bd7fbce174a79f",
"shasum": ""
},
"require": {
@@ -2926,7 +2996,7 @@
"laravel",
"validation"
],
- "time": "2017-10-08T22:42:01+00:00"
+ "time": "2017-11-06T21:35:49+00:00"
}
],
"packages-dev": [
@@ -3157,16 +3227,16 @@
},
{
"name": "filp/whoops",
- "version": "2.1.12",
+ "version": "2.1.14",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
- "reference": "a99f0b151846021ba7a73b4e3cba3ebc9f14f03e"
+ "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/filp/whoops/zipball/a99f0b151846021ba7a73b4e3cba3ebc9f14f03e",
- "reference": "a99f0b151846021ba7a73b4e3cba3ebc9f14f03e",
+ "url": "https://api.github.com/repos/filp/whoops/zipball/c6081b8838686aa04f1e83ba7e91f78b7b2a23e6",
+ "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6",
"shasum": ""
},
"require": {
@@ -3175,7 +3245,7 @@
},
"require-dev": {
"mockery/mockery": "0.9.*",
- "phpunit/phpunit": "^4.8 || ^5.0",
+ "phpunit/phpunit": "^4.8.35 || ^5.7",
"symfony/var-dumper": "^2.6 || ^3.0"
},
"suggest": {
@@ -3214,7 +3284,7 @@
"throwable",
"whoops"
],
- "time": "2017-10-15T13:05:10+00:00"
+ "time": "2017-11-23T18:22:44+00:00"
},
{
"name": "fzaninotto/faker",
@@ -3797,29 +3867,35 @@
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "4.1.1",
+ "version": "4.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2"
+ "reference": "66465776cfc249844bde6d117abff1d22e06c2da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2",
- "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/66465776cfc249844bde6d117abff1d22e06c2da",
+ "reference": "66465776cfc249844bde6d117abff1d22e06c2da",
"shasum": ""
},
"require": {
"php": "^7.0",
- "phpdocumentor/reflection-common": "^1.0@dev",
+ "phpdocumentor/reflection-common": "^1.0.0",
"phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^4.4"
+ "doctrine/instantiator": "~1.0.5",
+ "mockery/mockery": "^1.0",
+ "phpunit/phpunit": "^6.4"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
@@ -3838,7 +3914,7 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2017-08-30T18:51:59+00:00"
+ "time": "2017-11-27T17:38:31+00:00"
},
{
"name": "phpdocumentor/type-resolver",
@@ -3889,16 +3965,16 @@
},
{
"name": "phpspec/prophecy",
- "version": "v1.7.2",
+ "version": "1.7.3",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6"
+ "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
- "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
+ "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
"shasum": ""
},
"require": {
@@ -3910,7 +3986,7 @@
},
"require-dev": {
"phpspec/phpspec": "^2.5|^3.2",
- "phpunit/phpunit": "^4.8 || ^5.6.5"
+ "phpunit/phpunit": "^4.8.35 || ^5.7"
},
"type": "library",
"extra": {
@@ -3948,20 +4024,20 @@
"spy",
"stub"
],
- "time": "2017-09-04T11:05:03+00:00"
+ "time": "2017-11-24T13:59:53+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "5.2.2",
+ "version": "5.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b"
+ "reference": "033ec97498cf530cc1be4199264cad568b19be26"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8ed1902a57849e117b5651fc1a5c48110946c06b",
- "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/033ec97498cf530cc1be4199264cad568b19be26",
+ "reference": "033ec97498cf530cc1be4199264cad568b19be26",
"shasum": ""
},
"require": {
@@ -3970,7 +4046,7 @@
"php": "^7.0",
"phpunit/php-file-iterator": "^1.4.2",
"phpunit/php-text-template": "^1.2.1",
- "phpunit/php-token-stream": "^1.4.11 || ^2.0",
+ "phpunit/php-token-stream": "^2.0.1",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^3.0",
"sebastian/version": "^2.0.1",
@@ -4012,20 +4088,20 @@
"testing",
"xunit"
],
- "time": "2017-08-03T12:40:43+00:00"
+ "time": "2017-11-27T09:00:30+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.2",
+ "version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
@@ -4059,7 +4135,7 @@
"filesystem",
"iterator"
],
- "time": "2016-10-03T07:40:28+00:00"
+ "time": "2017-11-27T13:52:08+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -4153,16 +4229,16 @@
},
{
"name": "phpunit/php-token-stream",
- "version": "2.0.1",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0"
+ "reference": "791198a2c6254db10131eecfe8c06670700904db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0",
- "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
+ "reference": "791198a2c6254db10131eecfe8c06670700904db",
"shasum": ""
},
"require": {
@@ -4198,20 +4274,20 @@
"keywords": [
"tokenizer"
],
- "time": "2017-08-20T05:47:52+00:00"
+ "time": "2017-11-27T05:48:46+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "6.4.3",
+ "version": "6.4.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "06b28548fd2b4a20c3cd6e247dc86331a7d4db13"
+ "reference": "562f7dc75d46510a4ed5d16189ae57fbe45a9932"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/06b28548fd2b4a20c3cd6e247dc86331a7d4db13",
- "reference": "06b28548fd2b4a20c3cd6e247dc86331a7d4db13",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/562f7dc75d46510a4ed5d16189ae57fbe45a9932",
+ "reference": "562f7dc75d46510a4ed5d16189ae57fbe45a9932",
"shasum": ""
},
"require": {
@@ -4282,7 +4358,7 @@
"testing",
"xunit"
],
- "time": "2017-10-16T13:18:59+00:00"
+ "time": "2017-11-08T11:26:09+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -4390,30 +4466,30 @@
},
{
"name": "sebastian/comparator",
- "version": "2.0.2",
+ "version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a"
+ "reference": "1174d9018191e93cb9d719edec01257fc05f8158"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ae068fede81d06e7bb9bb46a367210a3d3e1fe6a",
- "reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158",
+ "reference": "1174d9018191e93cb9d719edec01257fc05f8158",
"shasum": ""
},
"require": {
"php": "^7.0",
"sebastian/diff": "^2.0",
- "sebastian/exporter": "^3.0"
+ "sebastian/exporter": "^3.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.1.x-dev"
}
},
"autoload": {
@@ -4444,13 +4520,13 @@
}
],
"description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
+ "homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
- "time": "2017-08-03T07:14:59+00:00"
+ "time": "2017-11-03T07:16:52+00:00"
},
{
"name": "sebastian/diff",
@@ -4904,23 +4980,23 @@
},
{
"name": "symfony/class-loader",
- "version": "v3.3.10",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
- "reference": "7572c904b209fa9907c69a6a9a68243c265a4d01"
+ "reference": "e8d36a7b5568d232f5c3f8ef92665836b9f1e038"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/class-loader/zipball/7572c904b209fa9907c69a6a9a68243c265a4d01",
- "reference": "7572c904b209fa9907c69a6a9a68243c265a4d01",
+ "url": "https://api.github.com/repos/symfony/class-loader/zipball/e8d36a7b5568d232f5c3f8ef92665836b9f1e038",
+ "reference": "e8d36a7b5568d232f5c3f8ef92665836b9f1e038",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8"
},
"require-dev": {
- "symfony/finder": "~2.8|~3.0",
+ "symfony/finder": "~2.8|~3.0|~4.0",
"symfony/polyfill-apcu": "~1.1"
},
"suggest": {
@@ -4929,7 +5005,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -4956,34 +5032,32 @@
],
"description": "Symfony ClassLoader Component",
"homepage": "https://symfony.com",
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-05T16:10:10+00:00"
},
{
"name": "symfony/config",
- "version": "v3.3.10",
+ "version": "v4.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "4ab62407bff9cd97c410a7feaef04c375aaa5cfd"
+ "reference": "6e6dbc6d2beff8117b974d74274bff02e43c32a6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/4ab62407bff9cd97c410a7feaef04c375aaa5cfd",
- "reference": "4ab62407bff9cd97c410a7feaef04c375aaa5cfd",
+ "url": "https://api.github.com/repos/symfony/config/zipball/6e6dbc6d2beff8117b974d74274bff02e43c32a6",
+ "reference": "6e6dbc6d2beff8117b974d74274bff02e43c32a6",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/filesystem": "~2.8|~3.0"
+ "php": "^7.1.3",
+ "symfony/filesystem": "~3.4|~4.0"
},
"conflict": {
- "symfony/dependency-injection": "<3.3",
- "symfony/finder": "<3.3"
+ "symfony/finder": "<3.4"
},
"require-dev": {
- "symfony/dependency-injection": "~3.3",
- "symfony/finder": "~3.3",
- "symfony/yaml": "~3.0"
+ "symfony/finder": "~3.4|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
@@ -4991,7 +5065,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -5018,29 +5092,29 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2017-10-04T18:56:58+00:00"
+ "time": "2017-11-20T18:22:57+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v3.3.10",
+ "version": "v4.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "90bc45abf02ae6b7deb43895c1052cb0038506f1"
+ "reference": "c9d4a26759ff75a077e4e334315cb632739b661a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/90bc45abf02ae6b7deb43895c1052cb0038506f1",
- "reference": "90bc45abf02ae6b7deb43895c1052cb0038506f1",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/c9d4a26759ff75a077e4e334315cb632739b661a",
+ "reference": "c9d4a26759ff75a077e4e334315cb632739b661a",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8"
+ "php": "^7.1.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -5067,29 +5141,29 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2017-10-03T13:33:10+00:00"
+ "time": "2017-11-21T14:14:53+00:00"
},
{
"name": "symfony/stopwatch",
- "version": "v3.3.10",
+ "version": "v4.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "170edf8b3247d7b6779eb6fa7428f342702ca184"
+ "reference": "ac0e49150555c703fef6b696d8eaba1db7a3ca03"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/170edf8b3247d7b6779eb6fa7428f342702ca184",
- "reference": "170edf8b3247d7b6779eb6fa7428f342702ca184",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/ac0e49150555c703fef6b696d8eaba1db7a3ca03",
+ "reference": "ac0e49150555c703fef6b696d8eaba1db7a3ca03",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8"
+ "php": "^7.1.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -5116,27 +5190,30 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
- "time": "2017-10-02T06:42:24+00:00"
+ "time": "2017-11-09T12:45:29+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.3.10",
+ "version": "v4.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46"
+ "reference": "7be8741ce5dce9943f41a9269f6828b66e726776"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46",
- "reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/7be8741ce5dce9943f41a9269f6828b66e726776",
+ "reference": "7be8741ce5dce9943f41a9269f6828b66e726776",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8"
+ "php": "^7.1.3"
+ },
+ "conflict": {
+ "symfony/console": "<3.4"
},
"require-dev": {
- "symfony/console": "~2.8|~3.0"
+ "symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
@@ -5144,7 +5221,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -5171,7 +5248,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-10-05T14:43:42+00:00"
+ "time": "2017-11-29T13:42:03+00:00"
},
{
"name": "theseer/tokenizer",
diff --git a/config/auth.php b/config/auth.php
index e324d1a6f8..73352da7a0 100644
--- a/config/auth.php
+++ b/config/auth.php
@@ -36,7 +36,7 @@ return [
*/
'defaults' => [
- 'guard' => 'web',
+ 'guard' => 'web',
'passwords' => 'users',
],
@@ -59,12 +59,12 @@ return [
'guards' => [
'web' => [
- 'driver' => 'session',
+ 'driver' => 'session',
'provider' => 'users',
],
'api' => [
- 'driver' => 'token',
+ 'driver' => 'token',
'provider' => 'users',
],
],
@@ -89,7 +89,7 @@ return [
'providers' => [
'users' => [
'driver' => 'eloquent',
- 'model' => FireflyIII\User::class,
+ 'model' => FireflyIII\User::class,
],
// 'users' => [
@@ -116,8 +116,8 @@ return [
'passwords' => [
'users' => [
'provider' => 'users',
- 'table' => 'password_resets',
- 'expire' => 60,
+ 'table' => 'password_resets',
+ 'expire' => 60,
],
],
diff --git a/config/broadcasting.php b/config/broadcasting.php
index 962c603b70..00c45c8caf 100644
--- a/config/broadcasting.php
+++ b/config/broadcasting.php
@@ -53,17 +53,17 @@ return [
'connections' => [
'pusher' => [
- 'driver' => 'pusher',
- 'key' => env('PUSHER_APP_KEY'),
- 'secret' => env('PUSHER_APP_SECRET'),
- 'app_id' => env('PUSHER_APP_ID'),
+ 'driver' => 'pusher',
+ 'key' => env('PUSHER_APP_KEY'),
+ 'secret' => env('PUSHER_APP_SECRET'),
+ 'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
],
'redis' => [
- 'driver' => 'redis',
+ 'driver' => 'redis',
'connection' => 'default',
],
diff --git a/config/cache.php b/config/cache.php
index 812128ea27..c3360fdae1 100644
--- a/config/cache.php
+++ b/config/cache.php
@@ -61,37 +61,37 @@ return [
],
'database' => [
- 'driver' => 'database',
- 'table' => 'cache',
+ 'driver' => 'database',
+ 'table' => 'cache',
'connection' => null,
],
'file' => [
'driver' => 'file',
- 'path' => storage_path('framework/cache/data'),
+ 'path' => storage_path('framework/cache/data'),
],
'memcached' => [
- 'driver' => 'memcached',
+ 'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
- 'sasl' => [
+ 'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
- 'options' => [
+ 'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
- 'servers' => [
+ 'servers' => [
[
- 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
- 'port' => env('MEMCACHED_PORT', 11211),
+ 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
+ 'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
- 'driver' => 'redis',
+ 'driver' => 'redis',
'connection' => 'default',
],
diff --git a/config/csv.php b/config/csv.php
index edba7b4714..a10ea901ba 100644
--- a/config/csv.php
+++ b/config/csv.php
@@ -280,6 +280,18 @@ return [
'converter' => 'Amount',
'field' => 'amount',
],
+ 'amount_debet' => [
+ 'mappable' => false,
+ 'pre-process-map' => false,
+ 'converter' => 'AmountDebet',
+ 'field' => 'amount_debet',
+ ],
+ 'amount_credit' => [
+ 'mappable' => false,
+ 'pre-process-map' => false,
+ 'converter' => 'AmountCredit',
+ 'field' => 'amount_credit',
+ ],
'sepa-ct-id' => [
'mappable' => false,
'pre-process-map' => false,
diff --git a/config/database.php b/config/database.php
index f23918048e..352c2e6f7f 100644
--- a/config/database.php
+++ b/config/database.php
@@ -22,6 +22,20 @@
declare(strict_types=1);
+$databaseUrl = getenv('DATABASE_URL');
+$host = '';
+$username = '';
+$password = '';
+$database = '';
+
+if (!($databaseUrl === false)) {
+ $options = parse_url($databaseUrl);
+ $host = $options['host'];
+ $username = $options['user'];
+ $password = $options['pass'];
+ $database = substr($options['path'], 1);
+}
+
return [
'default' => env('DB_CONNECTION', 'mysql'),
@@ -47,11 +61,11 @@ return [
],
'pgsql' => [
'driver' => 'pgsql',
- 'host' => env('DB_HOST', '127.0.0.1'),
+ 'host' => env('DB_HOST', $host),
'port' => env('DB_PORT', '5432'),
- 'database' => env('DB_DATABASE', 'forge'),
- 'username' => env('DB_USERNAME', 'forge'),
- 'password' => env('DB_PASSWORD', ''),
+ 'database' => env('DB_DATABASE', $database),
+ 'username' => env('DB_USERNAME', $username),
+ 'password' => env('DB_PASSWORD', $password),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
diff --git a/config/firefly.php b/config/firefly.php
index 8ca8c90385..3643b2c39e 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -33,9 +33,9 @@ return [
'is_demo_site' => false,
],
'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true),
- 'version' => '4.6.10',
+ 'version' => '4.6.11',
'maxUploadSize' => 15242880,
- 'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'],
+ 'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf','text/plain'],
'list_length' => 10,
'export_formats' => [
'csv' => 'FireflyIII\Export\Exporter\CsvExporter',
@@ -107,12 +107,13 @@ return [
],
'accountTypeByIdentifier' =>
[
- 'asset' => 'Asset account',
- 'expense' => 'Expense account',
- 'revenue' => 'Revenue account',
- 'opening' => 'Initial balance account',
- 'initial' => 'Initial balance account',
- 'import' => 'Import account',
+ 'asset' => 'Asset account',
+ 'expense' => 'Expense account',
+ 'revenue' => 'Revenue account',
+ 'opening' => 'Initial balance account',
+ 'initial' => 'Initial balance account',
+ 'import' => 'Import account',
+ 'reconcile' => 'Reconciliation account',
],
'shortNamesByFullName' =>
[
@@ -125,16 +126,20 @@ return [
'Cash account' => 'cash',
],
'languages' => [
+ // completed languages
+ 'nl_NL' => ['name_locale' => 'Nederlands', 'name_english' => 'Dutch', 'complete' => true],
'de_DE' => ['name_locale' => 'Deutsch', 'name_english' => 'German', 'complete' => true],
- 'es_ES' => ['name_locale' => 'Spanish', 'name_english' => 'Spanish', 'complete' => false],
'en_US' => ['name_locale' => 'English', 'name_english' => 'English', 'complete' => true],
'fr_FR' => ['name_locale' => 'Français', 'name_english' => 'French', 'complete' => true],
- 'id_ID' => ['name_locale' => 'Indonesian', 'name_english' => 'Indonesian', 'complete' => false],
- 'nl_NL' => ['name_locale' => 'Nederlands', 'name_english' => 'Dutch', 'complete' => true],
'pl_PL' => ['name_locale' => 'Polski', 'name_english' => 'Polish ', 'complete' => true],
- 'pt_BR' => ['name_locale' => 'Português do Brasil', 'name_english' => 'Portuguese (Brazil)', 'complete' => true],
+
+ // incomplete languages:
+ 'pt_BR' => ['name_locale' => 'Português do Brasil', 'name_english' => 'Portuguese (Brazil)', 'complete' => false],
+ 'id_ID' => ['name_locale' => 'Indonesian', 'name_english' => 'Indonesian', 'complete' => false],
+ 'es_ES' => ['name_locale' => 'Spanish', 'name_english' => 'Spanish', 'complete' => false],
'ru_RU' => ['name_locale' => 'Русский', 'name_english' => 'Russian', 'complete' => false],
'sl_SI' => ['name_locale' => 'Slovenščina', 'name_english' => 'Slovenian', 'complete' => false],
+ 'tr_TR' => ['name_locale' => 'Türkçe', 'name_english' => 'Turkish', 'complete' => false],
],
'transactionTypesByWhat' => [
'expenses' => ['Withdrawal'],
diff --git a/config/queue.php b/config/queue.php
index 7c4b8840a2..171e9babc5 100644
--- a/config/queue.php
+++ b/config/queue.php
@@ -57,32 +57,32 @@ return [
],
'database' => [
- 'driver' => 'database',
- 'table' => 'jobs',
- 'queue' => 'default',
+ 'driver' => 'database',
+ 'table' => 'jobs',
+ 'queue' => 'default',
'retry_after' => 90,
],
'beanstalkd' => [
- 'driver' => 'beanstalkd',
- 'host' => 'localhost',
- 'queue' => 'default',
+ 'driver' => 'beanstalkd',
+ 'host' => 'localhost',
+ 'queue' => 'default',
'retry_after' => 90,
],
'sqs' => [
'driver' => 'sqs',
- 'key' => 'your-public-key',
+ 'key' => 'your-public-key',
'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
- 'queue' => 'your-queue-name',
+ 'queue' => 'your-queue-name',
'region' => 'us-east-1',
],
'redis' => [
- 'driver' => 'redis',
- 'connection' => 'default',
- 'queue' => 'default',
+ 'driver' => 'redis',
+ 'connection' => 'default',
+ 'queue' => 'default',
'retry_after' => 90,
],
@@ -101,7 +101,7 @@ return [
'failed' => [
'database' => env('DB_CONNECTION', 'mysql'),
- 'table' => 'failed_jobs',
+ 'table' => 'failed_jobs',
],
];
diff --git a/config/services.php b/config/services.php
index 0e0dd3b120..8b9e73ff36 100644
--- a/config/services.php
+++ b/config/services.php
@@ -42,7 +42,7 @@ return [
],
'ses' => [
- 'key' => env('SES_KEY'),
+ 'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
@@ -52,8 +52,8 @@ return [
],
'stripe' => [
- 'model' => FireflyIII\User::class,
- 'key' => env('STRIPE_KEY'),
+ 'model' => FireflyIII\User::class,
+ 'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
diff --git a/config/twigbridge.php b/config/twigbridge.php
index 601364ccfe..df96c93a2d 100644
--- a/config/twigbridge.php
+++ b/config/twigbridge.php
@@ -176,7 +176,7 @@ return [
'is_safe' => [
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location',
'multiRadio', 'file', 'multiCheckbox', 'staticText', 'amountSmall', 'password', 'nonSelectableBalance', 'nonSelectableAmount',
- 'number'
+ 'number',
],
],
'Form' => [
diff --git a/config/upgrade.php b/config/upgrade.php
index 9d162714ac..d0f6e5b716 100644
--- a/config/upgrade.php
+++ b/config/upgrade.php
@@ -27,13 +27,13 @@ return [
[
'4.3' => 'Make sure you run the migrations and clear your cache. If you need more help, please check Github or the Firefly III website.',
'4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.',
- '4.6.4' => 'This version of Firefly III requires PHP7.1.'
+ '4.6.4' => 'This version of Firefly III requires PHP7.1.',
],
'install' =>
[
'4.3' => 'Welcome to Firefly! Make sure you follow the installation guide. If you need more help, please check Github or the Firefly III website. The installation guide has a FAQ which you should check out as well.',
'4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.',
- '4.6.4' => 'This version of Firefly III requires PHP7.1.'
+ '4.6.4' => 'This version of Firefly III requires PHP7.1.',
],
],
];
diff --git a/crowdin.yaml b/crowdin.yaml
deleted file mode 100644
index 2ebe1dbabf..0000000000
--- a/crowdin.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-files:
- -
- source: /resources/lang/en_US/*.php
- translation: /resources/lang/%locale_with_underscore%/%original_file_name%
diff --git a/crowdin.yml b/crowdin.yml
new file mode 100644
index 0000000000..c4313cfa93
--- /dev/null
+++ b/crowdin.yml
@@ -0,0 +1,129 @@
+#
+# Your crowdin's credentials
+#
+"api_key_env": CROWDIN_API_KEY
+"project_identifier_env": CROWDIN_PROJECT_ID
+"base_path_env": CROWDIN_BASE_PATH
+#"base_url" : ""
+
+#
+# Choose file structure in crowdin
+# e.g. true or false
+#
+"preserve_hierarchy": false
+
+#
+# Files configuration
+#
+files: [
+ {
+ #
+ # Source files filter
+ # e.g. "/resources/en/*.json"
+ #
+ "source" : "",
+ source: "/resources/lang/en_US/*.php",
+
+ #
+ # where translations live
+ # e.g. "/resources/%two_letters_code%/%original_file_name%"
+ #
+ "translation" : "",
+ translation: /resources/lang/%locale_with_underscore%/%original_file_name%,
+
+ #
+ # files or directories for ignore
+ # e.g. ["/**/?.txt", "/**/[0-9].txt", "/**/*\?*.txt"]
+ #
+ #"ignore" : [],
+
+ #
+ # The dest allows you to specify a file name on Crowdin
+ # e.g. "/messages.json"
+ #
+ #"dest" : "",
+
+ #
+ # File type
+ # e.g. "json"
+ #
+ #type:"json"
+
+ #
+ # The parameter "update_option" is optional. If it is not set, translations for changed strings will be lost. Useful for typo fixes and minor changes in source strings.
+ # e.g. "update_as_unapproved" or "update_without_changes"
+ #
+ #"update_option" : "",
+
+ #
+ # Start block only for XML
+ #
+
+ #
+ # Defines whether to translate tags attributes.
+ # e.g. 0 or 1 (Default is 1)
+ #
+ # "translate_attributes" : 1,
+
+ #
+ # Defines whether to translate texts placed inside the tags.
+ # e.g. 0 or 1 (Default is 1)
+ #
+ # "translate_content" : 1,
+
+ #
+ # This is an array of strings, where each item is the XPaths to DOM element that should be imported
+ # e.g. ["/content/text", "/content/text[@value]"]
+ #
+ # "translatable_elements" : [],
+
+ #
+ # Defines whether to split long texts into smaller text segments.
+ # e.g. 0 or 1 (Default is 1)
+ #
+ # "content_segmentation" : 1,
+
+ #
+ # End block only for XML
+ #
+
+ #
+ # Start .properties block
+ #
+
+ #
+ # Defines whether single quote should be escaped by another single quote or backslash in exported translations.
+ # e.g. 0 or 1 or 2 or 3 (Default is 3)
+ # 0 - do not escape single quote;
+ # 1 - escape single quote by another single quote;
+ # 2 - escape single quote by backslash;
+ # 3 - escape single quote by another single quote only in strings containing variables ( {0} ).
+ #
+ # "escape_quotes" : 3,
+
+ #
+ # End .properties block
+ #
+
+ #
+ # Often software projects have custom names for locale directories. crowdin-cli allows you to map your own languages to be understandable by Crowdin.
+ #
+ #"languages_mapping" : {
+ # "two_letters_code" : {
+ # "crowdin_language_code" : "local_name"
+ # }
+ #},
+
+ #
+ # Is first line contains header?
+ # e.g. true or false
+ #
+ #"first_line_contains_header" : true,
+
+ #
+ # for spreadsheets
+ # e.g. "identifier,source_phrase,context,uk,ru,fr"
+ #
+ # "scheme" : "",
+ }
+]
\ No newline at end of file
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php
index 8669ccf1b3..85bedc97cf 100644
--- a/database/factories/ModelFactory.php
+++ b/database/factories/ModelFactory.php
@@ -12,7 +12,6 @@ declare(strict_types=1);
use Carbon\Carbon;
-
/*
|--------------------------------------------------------------------------
| Model Factories
@@ -25,224 +24,235 @@ use Carbon\Carbon;
*/
$factory->define(
- FireflyIII\User::class, function (Faker\Generator $faker) {
- static $password;
+ FireflyIII\User::class,
+ function (Faker\Generator $faker) {
+ static $password;
- return [
- 'email' => $faker->safeEmail,
- 'password' => $password ?: $password = bcrypt('secret'),
- 'remember_token' => str_random(10),
- ];
-}
+ return [
+ 'email' => $faker->safeEmail,
+ 'password' => $password ?: $password = bcrypt('secret'),
+ 'remember_token' => str_random(10),
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\CurrencyExchangeRate::class, function (Faker\Generator $faker) {
-
- return [
- 'user_id' => 1,
- 'from_currency_id' => 1,
- 'to_currency_id' => 2,
- 'date' => '2017-01-01',
- 'rate' => '1.5',
- 'user_rate' => null,
- ];
-}
+ FireflyIII\Models\CurrencyExchangeRate::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'user_id' => 1,
+ 'from_currency_id' => 1,
+ 'to_currency_id' => 2,
+ 'date' => '2017-01-01',
+ 'rate' => '1.5',
+ 'user_rate' => null,
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\TransactionCurrency::class, function (Faker\Generator $faker) {
-
- return [
- 'name' => $faker->words(1, true),
- 'code' => 'ABC',
- 'symbol' => 'x',
- ];
-}
+ FireflyIII\Models\TransactionCurrency::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'name' => $faker->words(1, true),
+ 'code' => 'ABC',
+ 'symbol' => 'x',
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\ImportJob::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->numberBetween(1, 100),
- 'user_id' => 1,
- 'key' => $faker->words(1, true),
- 'file_type' => 'csv',
- 'status' => 'import_status_never_started',
- 'configuration' => null,
- 'extended_status' => [
- 'total_steps' => 0,
- 'steps_done' => 0,
- 'import_count' => 0,
- 'importTag' => 0,
- 'errors' => [],
- ],
- ];
-}
-);
-
-
-$factory->define(
- FireflyIII\Models\TransactionJournal::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->unique()->numberBetween(1000, 10000),
- 'user_id' => 1,
- 'transaction_type_id' => 1,
- 'bill_id' => null,
- // TODO update this transaction currency reference.
- 'transaction_currency_id' => 1,
- 'description' => $faker->words(3, true),
- 'date' => '2017-01-01',
- 'interest_date' => null,
- 'book_date' => null,
- 'process_date' => null,
- 'order' => 0,
- 'tag_count' => 0,
- 'encrypted' => 0,
- 'completed' => 1,
- ];
-}
+ FireflyIII\Models\ImportJob::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->numberBetween(1, 100),
+ 'user_id' => 1,
+ 'key' => $faker->words(1, true),
+ 'file_type' => 'csv',
+ 'status' => 'import_status_never_started',
+ 'configuration' => null,
+ 'extended_status' => [
+ 'total_steps' => 0,
+ 'steps_done' => 0,
+ 'import_count' => 0,
+ 'importTag' => 0,
+ 'errors' => [],
+ ],
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\Bill::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->numberBetween(1, 10),
- 'user_id' => 1,
- 'name' => $faker->words(3, true),
- 'match' => $faker->words(3, true),
- 'amount_min' => '100.00',
- 'amount_max' => '100.00',
- 'date' => '2017-01-01',
- 'repeat_freq' => 'monthly',
- 'skip' => 0,
- 'automatch' => 1,
- 'name_encrypted' => 0,
- 'match_encrypted' => 0,
- ];
-}
+ FireflyIII\Models\TransactionJournal::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->unique()->numberBetween(1000, 10000),
+ 'user_id' => 1,
+ 'transaction_type_id' => 1,
+ 'bill_id' => null,
+ // TODO update this transaction currency reference.
+ 'transaction_currency_id' => 1,
+ 'description' => $faker->words(3, true),
+ 'date' => '2017-01-01',
+ 'interest_date' => null,
+ 'book_date' => null,
+ 'process_date' => null,
+ 'order' => 0,
+ 'tag_count' => 0,
+ 'encrypted' => 0,
+ 'completed' => 1,
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\PiggyBankRepetition::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->unique()->numberBetween(100, 10000),
- 'piggy_bank_id' => $faker->numberBetween(1, 10),
- 'startdate' => '2017-01-01',
- 'targetdate' => '2020-01-01',
- 'currentamount' => 10,
- ];
-}
+ FireflyIII\Models\Bill::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->numberBetween(1, 10),
+ 'user_id' => 1,
+ 'name' => $faker->words(3, true),
+ 'match' => $faker->words(3, true),
+ 'amount_min' => '100.00',
+ 'amount_max' => '100.00',
+ 'date' => '2017-01-01',
+ 'repeat_freq' => 'monthly',
+ 'skip' => 0,
+ 'automatch' => 1,
+ 'name_encrypted' => 0,
+ 'match_encrypted' => 0,
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\PiggyBank::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->unique()->numberBetween(100, 10000),
- 'account_id' => $faker->numberBetween(1, 10),
- 'name' => $faker->words(3, true),
- 'target_amount' => '1000.00',
- 'startdate' => '2017-01-01',
- 'order' => 1,
- 'active' => 1,
- 'encrypted' => 0,
- ];
-}
+ FireflyIII\Models\PiggyBankRepetition::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->unique()->numberBetween(100, 10000),
+ 'piggy_bank_id' => $faker->numberBetween(1, 10),
+ 'startdate' => '2017-01-01',
+ 'targetdate' => '2020-01-01',
+ 'currentamount' => 10,
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\Tag::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->unique()->numberBetween(200, 10000),
- 'user_id' => 1,
- 'tagMode' => 'nothing',
- 'tag' => $faker->words(1, true),
- ];
-}
+ FireflyIII\Models\PiggyBank::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->unique()->numberBetween(100, 10000),
+ 'account_id' => $faker->numberBetween(1, 10),
+ 'name' => $faker->words(3, true),
+ 'target_amount' => '1000.00',
+ 'startdate' => '2017-01-01',
+ 'order' => 1,
+ 'active' => 1,
+ 'encrypted' => 0,
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\Category::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->numberBetween(1, 10),
- 'name' => $faker->words(3, true),
- ];
-}
+ FireflyIII\Models\Tag::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->unique()->numberBetween(200, 10000),
+ 'user_id' => 1,
+ 'tagMode' => 'nothing',
+ 'tag' => $faker->words(1, true),
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\Budget::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->numberBetween(1, 10),
- 'name' => $faker->words(3, true),
- ];
-}
+ FireflyIII\Models\Category::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->numberBetween(1, 10),
+ 'name' => $faker->words(3, true),
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\PiggyBankEvent::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->numberBetween(1, 10),
- 'piggy_bank_id' => $faker->numberBetween(1, 10),
- 'transaction_journal_id' => $faker->numberBetween(1, 10),
- 'date' => $faker->date('Y-m-d'),
- 'amount' => '100',
- ];
-}
+ FireflyIII\Models\Budget::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->numberBetween(1, 10),
+ 'name' => $faker->words(3, true),
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\BudgetLimit::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->numberBetween(1, 10),
- 'start_date' => '2017-01-01',
- 'end_date' => '2017-01-31',
- 'amount' => '300',
- 'budget_id' => $faker->numberBetween(1, 6),
-
- ];
-}
+ FireflyIII\Models\PiggyBankEvent::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->numberBetween(1, 10),
+ 'piggy_bank_id' => $faker->numberBetween(1, 10),
+ 'transaction_journal_id' => $faker->numberBetween(1, 10),
+ 'date' => $faker->date('Y-m-d'),
+ 'amount' => '100',
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\Account::class, function (Faker\Generator $faker) {
- return [
- 'id' => $faker->unique()->numberBetween(1000, 10000),
- 'name' => $faker->words(3, true),
- 'account_type_id' => 1,
- 'active' => true,
- ];
-}
+ FireflyIII\Models\BudgetLimit::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->numberBetween(1, 10),
+ 'start_date' => '2017-01-01',
+ 'end_date' => '2017-01-31',
+ 'amount' => '300',
+ 'budget_id' => $faker->numberBetween(1, 6),
+ ];
+ }
);
$factory->define(
- FireflyIII\Models\Transaction::class, function (Faker\Generator $faker) {
- return [
- 'transaction_amount' => strval($faker->randomFloat(2, -100, 100)),
- 'destination_amount' => strval($faker->randomFloat(2, -100, 100)),
- 'opposing_account_id' => $faker->numberBetween(1, 10),
- 'source_account_id' => $faker->numberBetween(1, 10),
- 'opposing_account_name' => $faker->words(3, true),
- 'description' => $faker->words(3, true),
- 'source_account_name' => $faker->words(3, true),
- 'destination_account_id' => $faker->numberBetween(1, 10),
- 'date' => new Carbon,
- 'destination_account_name' => $faker->words(3, true),
- 'amount' => strval($faker->randomFloat(2, -100, 100)),
- 'budget_id' => 0,
- 'category' => $faker->words(3, true),
- 'transaction_journal_id' => $faker->numberBetween(1, 10),
- 'journal_id' => $faker->numberBetween(1, 10),
- 'transaction_currency_code' => 'EUR',
- 'transaction_type_type' => 'Withdrawal',
- 'account_encrypted' => 0,
- 'account_name' => 'Some name',
- 'transaction_currency_id' => 1,
- 'transaction_currency_symbol' => '€',
- 'foreign_destination_amount' => null,
- 'foreign_currency_id' => null,
- 'foreign_currency_code' => null,
- 'foreign_currency_symbol' => null,
- ];
-}
+ FireflyIII\Models\Account::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'id' => $faker->unique()->numberBetween(1000, 10000),
+ 'name' => $faker->words(3, true),
+ 'account_type_id' => 1,
+ 'active' => true,
+ ];
+ }
+);
+
+$factory->define(
+ FireflyIII\Models\Transaction::class,
+ function (Faker\Generator $faker) {
+ return [
+ 'transaction_amount' => strval($faker->randomFloat(2, -100, 100)),
+ 'destination_amount' => strval($faker->randomFloat(2, -100, 100)),
+ 'opposing_account_id' => $faker->numberBetween(1, 10),
+ 'source_account_id' => $faker->numberBetween(1, 10),
+ 'opposing_account_name' => $faker->words(3, true),
+ 'description' => $faker->words(3, true),
+ 'source_account_name' => $faker->words(3, true),
+ 'destination_account_id' => $faker->numberBetween(1, 10),
+ 'date' => new Carbon,
+ 'destination_account_name' => $faker->words(3, true),
+ 'amount' => strval($faker->randomFloat(2, -100, 100)),
+ 'budget_id' => 0,
+ 'category' => $faker->words(3, true),
+ 'transaction_journal_id' => $faker->numberBetween(1, 10),
+ 'journal_id' => $faker->numberBetween(1, 10),
+ 'transaction_currency_code' => 'EUR',
+ 'transaction_type_type' => 'Withdrawal',
+ 'account_encrypted' => 0,
+ 'account_name' => 'Some name',
+ 'transaction_currency_id' => 1,
+ 'transaction_currency_symbol' => '€',
+ 'foreign_destination_amount' => null,
+ 'foreign_currency_id' => null,
+ 'foreign_currency_code' => null,
+ 'foreign_currency_symbol' => null,
+ ];
+ }
);
diff --git a/database/migrations/2016_06_16_000000_create_support_tables.php b/database/migrations/2016_06_16_000000_create_support_tables.php
index cd16910972..b47de14d0b 100644
--- a/database/migrations/2016_06_16_000000_create_support_tables.php
+++ b/database/migrations/2016_06_16_000000_create_support_tables.php
@@ -20,11 +20,9 @@ class CreateSupportTables extends Migration
{
/**
* Reverse the migrations.
- *
*/
public function down()
{
-
Schema::drop('account_types');
Schema::drop('transaction_currencies');
Schema::drop('transaction_types');
@@ -35,7 +33,6 @@ class CreateSupportTables extends Migration
Schema::drop('roles');
Schema::drop('sessions');
Schema::drop('configuration');
-
}
/**
@@ -64,14 +61,15 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('account_types')) {
Schema::create(
- 'account_types', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->string('type', 50);
+ 'account_types',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->string('type', 50);
- // type must be unique.
- $table->unique(['type']);
- }
+ // type must be unique.
+ $table->unique(['type']);
+ }
);
}
}
@@ -80,15 +78,15 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('configuration')) {
Schema::create(
- 'configuration', function (Blueprint $table) {
-
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->string('name', 50);
- $table->text('data');
- $table->unique(['name']);
- }
+ 'configuration',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->string('name', 50);
+ $table->text('data');
+ $table->unique(['name']);
+ }
);
}
}
@@ -100,18 +98,18 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('transaction_currencies')) {
Schema::create(
- 'transaction_currencies', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->string('code', 3);
- $table->string('name', 255);
- $table->string('symbol', 12);
+ 'transaction_currencies',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->string('code', 3);
+ $table->string('name', 255);
+ $table->string('symbol', 12);
- // code must be unique.
- $table->unique(['code']);
-
- }
+ // code must be unique.
+ $table->unique(['code']);
+ }
);
}
}
@@ -123,20 +121,19 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('jobs')) {
Schema::create(
- 'jobs', function (Blueprint $table) {
-
- // straight from Laravel
- $table->bigIncrements('id');
- $table->string('queue');
- $table->longText('payload');
- $table->tinyInteger('attempts')->unsigned();
- $table->tinyInteger('reserved')->unsigned();
- $table->unsignedInteger('reserved_at')->nullable();
- $table->unsignedInteger('available_at');
- $table->unsignedInteger('created_at');
- $table->index(['queue', 'reserved', 'reserved_at']);
-
- }
+ 'jobs',
+ function (Blueprint $table) {
+ // straight from Laravel
+ $table->bigIncrements('id');
+ $table->string('queue');
+ $table->longText('payload');
+ $table->tinyInteger('attempts')->unsigned();
+ $table->tinyInteger('reserved')->unsigned();
+ $table->unsignedInteger('reserved_at')->nullable();
+ $table->unsignedInteger('available_at');
+ $table->unsignedInteger('created_at');
+ $table->index(['queue', 'reserved', 'reserved_at']);
+ }
);
}
}
@@ -148,13 +145,13 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('password_resets')) {
Schema::create(
- 'password_resets', function (Blueprint $table) {
- // straight from laravel
- $table->string('email')->index();
- $table->string('token')->index();
- $table->timestamp('created_at');
-
- }
+ 'password_resets',
+ function (Blueprint $table) {
+ // straight from laravel
+ $table->string('email')->index();
+ $table->string('token')->index();
+ $table->timestamp('created_at');
+ }
);
}
}
@@ -166,15 +163,16 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('permission_role')) {
Schema::create(
- 'permission_role', function (Blueprint $table) {
- $table->integer('permission_id')->unsigned();
- $table->integer('role_id')->unsigned();
+ 'permission_role',
+ function (Blueprint $table) {
+ $table->integer('permission_id')->unsigned();
+ $table->integer('role_id')->unsigned();
- $table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('cascade')->onDelete('cascade');
- $table->foreign('role_id')->references('id')->on('roles')->onUpdate('cascade')->onDelete('cascade');
+ $table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('cascade')->onDelete('cascade');
+ $table->foreign('role_id')->references('id')->on('roles')->onUpdate('cascade')->onDelete('cascade');
- $table->primary(['permission_id', 'role_id']);
- }
+ $table->primary(['permission_id', 'role_id']);
+ }
);
}
}
@@ -186,13 +184,14 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('permissions')) {
Schema::create(
- 'permissions', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->string('name')->unique();
- $table->string('display_name')->nullable();
- $table->string('description')->nullable();
- }
+ 'permissions',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->string('name')->unique();
+ $table->string('display_name')->nullable();
+ $table->string('description')->nullable();
+ }
);
}
}
@@ -204,13 +203,14 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('roles')) {
Schema::create(
- 'roles', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->string('name')->unique();
- $table->string('display_name')->nullable();
- $table->string('description')->nullable();
- }
+ 'roles',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->string('name')->unique();
+ $table->string('display_name')->nullable();
+ $table->string('description')->nullable();
+ }
);
}
}
@@ -220,17 +220,17 @@ class CreateSupportTables extends Migration
*/
private function createSessionsTable()
{
-
if (!Schema::hasTable('sessions')) {
Schema::create(
- 'sessions', function (Blueprint $table) {
- $table->string('id')->unique();
- $table->integer('user_id')->nullable();
- $table->string('ip_address', 45)->nullable();
- $table->text('user_agent')->nullable();
- $table->text('payload');
- $table->integer('last_activity');
- }
+ 'sessions',
+ function (Blueprint $table) {
+ $table->string('id')->unique();
+ $table->integer('user_id')->nullable();
+ $table->string('ip_address', 45)->nullable();
+ $table->text('user_agent')->nullable();
+ $table->text('payload');
+ $table->integer('last_activity');
+ }
);
}
}
@@ -242,16 +242,16 @@ class CreateSupportTables extends Migration
{
if (!Schema::hasTable('transaction_types')) {
Schema::create(
- 'transaction_types', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->string('type', 50);
+ 'transaction_types',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->string('type', 50);
- // type must be unique.
- $table->unique(['type']);
-
- }
+ // type must be unique.
+ $table->unique(['type']);
+ }
);
}
}
diff --git a/database/migrations/2016_06_16_000001_create_users_table.php b/database/migrations/2016_06_16_000001_create_users_table.php
index 563fbd1584..52573e8b1f 100644
--- a/database/migrations/2016_06_16_000001_create_users_table.php
+++ b/database/migrations/2016_06_16_000001_create_users_table.php
@@ -35,16 +35,17 @@ class CreateUsersTable extends Migration
{
if (!Schema::hasTable('users')) {
Schema::create(
- 'users', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->string('email', 255);
- $table->string('password', 60);
- $table->string('remember_token', 100)->nullable();
- $table->string('reset', 32)->nullable();
- $table->tinyInteger('blocked', false, true)->default('0');
- $table->string('blocked_code', 25)->nullable();
- }
+ 'users',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->string('email', 255);
+ $table->string('password', 60);
+ $table->string('remember_token', 100)->nullable();
+ $table->string('reset', 32)->nullable();
+ $table->tinyInteger('blocked', false, true)->default('0');
+ $table->string('blocked_code', 25)->nullable();
+ }
);
}
}
diff --git a/database/migrations/2016_06_16_000002_create_main_tables.php b/database/migrations/2016_06_16_000002_create_main_tables.php
index 300024918a..edc7eb3b36 100644
--- a/database/migrations/2016_06_16_000002_create_main_tables.php
+++ b/database/migrations/2016_06_16_000002_create_main_tables.php
@@ -60,7 +60,6 @@ class CreateMainTables extends Migration
*/
public function up()
{
- //
$this->createAccountTables();
$this->createPiggyBanksTable();
$this->createAttachmentsTable();
@@ -82,33 +81,35 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('accounts')) {
Schema::create(
- 'accounts', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->integer('account_type_id', false, true);
- $table->string('name', 1024);
- $table->decimal('virtual_balance', 22, 12)->nullable();
- $table->string('iban', 255)->nullable();
- $table->boolean('active')->default(1);
- $table->boolean('encrypted')->default(0);
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- $table->foreign('account_type_id')->references('id')->on('account_types')->onDelete('cascade');
- }
+ 'accounts',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->integer('account_type_id', false, true);
+ $table->string('name', 1024);
+ $table->decimal('virtual_balance', 22, 12)->nullable();
+ $table->string('iban', 255)->nullable();
+ $table->boolean('active')->default(1);
+ $table->boolean('encrypted')->default(0);
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ $table->foreign('account_type_id')->references('id')->on('account_types')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('account_meta')) {
Schema::create(
- 'account_meta', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('account_id', false, true);
- $table->string('name');
- $table->text('data');
- $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
- }
+ 'account_meta',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('account_id', false, true);
+ $table->string('name');
+ $table->text('data');
+ $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
+ }
);
}
}
@@ -118,30 +119,28 @@ class CreateMainTables extends Migration
*/
private function createAttachmentsTable()
{
-
if (!Schema::hasTable('attachments')) {
Schema::create(
- 'attachments', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->integer('attachable_id', false, true);
- $table->string('attachable_type', 255);
- $table->string('md5', 32);
- $table->string('filename', 1024);
- $table->string('title', 1024)->nullable();
- $table->text('description')->nullable();
- $table->text('notes')->nullable();
- $table->string('mime', 1024);
- $table->integer('size', false, true);
- $table->boolean('uploaded')->default(1);
+ 'attachments',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->integer('attachable_id', false, true);
+ $table->string('attachable_type', 255);
+ $table->string('md5', 32);
+ $table->string('filename', 1024);
+ $table->string('title', 1024)->nullable();
+ $table->text('description')->nullable();
+ $table->text('notes')->nullable();
+ $table->string('mime', 1024);
+ $table->integer('size', false, true);
+ $table->boolean('uploaded')->default(1);
- // link user id to users table
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
-
-
- }
+ // link user id to users table
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
}
@@ -153,26 +152,27 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('bills')) {
Schema::create(
- 'bills', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->string('name', 1024);
- $table->string('match', 1024);
- $table->decimal('amount_min', 22, 12);
- $table->decimal('amount_max', 22, 12);
- $table->date('date');
- $table->string('repeat_freq', 30);
- $table->smallInteger('skip', false, true)->default(0);
- $table->boolean('automatch')->default(1);
- $table->boolean('active')->default(1);
- $table->boolean('name_encrypted')->default(0);
- $table->boolean('match_encrypted')->default(0);
+ 'bills',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->string('name', 1024);
+ $table->string('match', 1024);
+ $table->decimal('amount_min', 22, 12);
+ $table->decimal('amount_max', 22, 12);
+ $table->date('date');
+ $table->string('repeat_freq', 30);
+ $table->smallInteger('skip', false, true)->default(0);
+ $table->boolean('automatch')->default(1);
+ $table->boolean('active')->default(1);
+ $table->boolean('name_encrypted')->default(0);
+ $table->boolean('match_encrypted')->default(0);
- // link user id to users table
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- }
+ // link user id to users table
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
}
@@ -184,46 +184,46 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('budgets')) {
Schema::create(
- 'budgets', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->string('name', 1024);
- $table->boolean('active')->default(1);
- $table->boolean('encrypted')->default(0);
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
-
-
- }
+ 'budgets',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->string('name', 1024);
+ $table->boolean('active')->default(1);
+ $table->boolean('encrypted')->default(0);
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('budget_limits')) {
Schema::create(
- 'budget_limits', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('budget_id', false, true);
- $table->date('startdate');
- $table->decimal('amount', 22, 12);
- $table->string('repeat_freq', 30);
- $table->boolean('repeats')->default(0);
- $table->foreign('budget_id')->references('id')->on('budgets')->onDelete('cascade');
-
- }
+ 'budget_limits',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('budget_id', false, true);
+ $table->date('startdate');
+ $table->decimal('amount', 22, 12);
+ $table->string('repeat_freq', 30);
+ $table->boolean('repeats')->default(0);
+ $table->foreign('budget_id')->references('id')->on('budgets')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('limit_repetitions')) {
Schema::create(
- 'limit_repetitions', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('budget_limit_id', false, true);
- $table->date('startdate');
- $table->date('enddate');
- $table->decimal('amount', 22, 12);
- $table->foreign('budget_limit_id')->references('id')->on('budget_limits')->onDelete('cascade');
- }
+ 'limit_repetitions',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('budget_limit_id', false, true);
+ $table->date('startdate');
+ $table->date('enddate');
+ $table->decimal('amount', 22, 12);
+ $table->foreign('budget_limit_id')->references('id')->on('budget_limits')->onDelete('cascade');
+ }
);
}
}
@@ -235,18 +235,18 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('categories')) {
Schema::create(
- 'categories', function (Blueprint $table) {
+ 'categories',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->string('name', 1024);
+ $table->boolean('encrypted')->default(0);
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->string('name', 1024);
- $table->boolean('encrypted')->default(0);
-
- // link user id to users table
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- }
+ // link user id to users table
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
}
@@ -258,32 +258,33 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('export_jobs')) {
Schema::create(
- 'export_jobs', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('user_id', false, true);
- $table->string('key', 12);
- $table->string('status', 255);
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- }
+ 'export_jobs',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('user_id', false, true);
+ $table->string('key', 12);
+ $table->string('status', 255);
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('import_jobs')) {
Schema::create(
- 'import_jobs', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('user_id')->unsigned();
- $table->string('key', 12)->unique();
- $table->string('file_type', 12);
- $table->string('status', 45);
- $table->text('configuration')->nullable();
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- }
+ 'import_jobs',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('user_id')->unsigned();
+ $table->string('key', 12)->unique();
+ $table->string('file_type', 12);
+ $table->string('status', 45);
+ $table->text('configuration')->nullable();
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
-
}
/**
@@ -293,34 +294,36 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('piggy_banks')) {
Schema::create(
- 'piggy_banks', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('account_id', false, true);
- $table->string('name', 1024);
- $table->decimal('targetamount', 22, 12);
- $table->date('startdate')->nullable();
- $table->date('targetdate')->nullable();
- $table->integer('order', false, true)->default(0);
- $table->boolean('active')->default(0);
- $table->boolean('encrypted')->default(1);
- $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
- }
+ 'piggy_banks',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('account_id', false, true);
+ $table->string('name', 1024);
+ $table->decimal('targetamount', 22, 12);
+ $table->date('startdate')->nullable();
+ $table->date('targetdate')->nullable();
+ $table->integer('order', false, true)->default(0);
+ $table->boolean('active')->default(0);
+ $table->boolean('encrypted')->default(1);
+ $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('piggy_bank_repetitions')) {
Schema::create(
- 'piggy_bank_repetitions', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('piggy_bank_id', false, true);
- $table->date('startdate')->nullable();
- $table->date('targetdate')->nullable();
- $table->decimal('currentamount', 22, 12);
- $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade');
- }
+ 'piggy_bank_repetitions',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('piggy_bank_id', false, true);
+ $table->date('startdate')->nullable();
+ $table->date('targetdate')->nullable();
+ $table->decimal('currentamount', 22, 12);
+ $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade');
+ }
);
}
}
@@ -332,15 +335,16 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('preferences')) {
Schema::create(
- 'preferences', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('user_id', false, true);
- $table->string('name', 1024);
- $table->text('data');
+ 'preferences',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('user_id', false, true);
+ $table->string('name', 1024);
+ $table->text('data');
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- }
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
}
@@ -350,22 +354,20 @@ class CreateMainTables extends Migration
*/
private function createRoleTable()
{
-
if (!Schema::hasTable('role_user')) {
Schema::create(
- 'role_user', function (Blueprint $table) {
- $table->integer('user_id', false, true);
- $table->integer('role_id', false, true);
+ 'role_user',
+ function (Blueprint $table) {
+ $table->integer('user_id', false, true);
+ $table->integer('role_id', false, true);
- $table->foreign('user_id')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
- $table->foreign('role_id')->references('id')->on('roles')->onUpdate('cascade')->onDelete('cascade');
+ $table->foreign('user_id')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
+ $table->foreign('role_id')->references('id')->on('roles')->onUpdate('cascade')->onDelete('cascade');
- $table->primary(['user_id', 'role_id']);
-
- }
+ $table->primary(['user_id', 'role_id']);
+ }
);
}
-
}
/**
@@ -376,81 +378,83 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('rule_groups')) {
Schema::create(
- 'rule_groups', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->string('title', 255);
- $table->text('description')->nullable();
- $table->integer('order', false, true)->default(0);
- $table->boolean('active')->default(1);
+ 'rule_groups',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->string('title', 255);
+ $table->text('description')->nullable();
+ $table->integer('order', false, true)->default(0);
+ $table->boolean('active')->default(1);
- // link user id to users table
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- }
+ // link user id to users table
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('rules')) {
Schema::create(
- 'rules', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->integer('rule_group_id', false, true);
- $table->string('title', 255);
- $table->text('description')->nullable();
- $table->integer('order', false, true)->default(0);
- $table->boolean('active')->default(1);
- $table->boolean('stop_processing')->default(0);
+ 'rules',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->integer('rule_group_id', false, true);
+ $table->string('title', 255);
+ $table->text('description')->nullable();
+ $table->integer('order', false, true)->default(0);
+ $table->boolean('active')->default(1);
+ $table->boolean('stop_processing')->default(0);
- // link user id to users table
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ // link user id to users table
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- // link rule group id to rule group table
- $table->foreign('rule_group_id')->references('id')->on('rule_groups')->onDelete('cascade');
- }
+ // link rule group id to rule group table
+ $table->foreign('rule_group_id')->references('id')->on('rule_groups')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('rule_actions')) {
Schema::create(
- 'rule_actions', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('rule_id', false, true);
+ 'rule_actions',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('rule_id', false, true);
- $table->string('action_type', 50);
- $table->string('action_value', 255);
+ $table->string('action_type', 50);
+ $table->string('action_value', 255);
- $table->integer('order', false, true)->default(0);
- $table->boolean('active')->default(1);
- $table->boolean('stop_processing')->default(0);
+ $table->integer('order', false, true)->default(0);
+ $table->boolean('active')->default(1);
+ $table->boolean('stop_processing')->default(0);
-
- // link rule id to rules table
- $table->foreign('rule_id')->references('id')->on('rules')->onDelete('cascade');
- }
+ // link rule id to rules table
+ $table->foreign('rule_id')->references('id')->on('rules')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('rule_triggers')) {
Schema::create(
- 'rule_triggers', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('rule_id', false, true);
+ 'rule_triggers',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('rule_id', false, true);
- $table->string('trigger_type', 50);
- $table->string('trigger_value', 255);
+ $table->string('trigger_type', 50);
+ $table->string('trigger_value', 255);
- $table->integer('order', false, true)->default(0);
- $table->boolean('active')->default(1);
- $table->boolean('stop_processing')->default(0);
+ $table->integer('order', false, true)->default(0);
+ $table->boolean('active')->default(1);
+ $table->boolean('stop_processing')->default(0);
-
- // link rule id to rules table
- $table->foreign('rule_id')->references('id')->on('rules')->onDelete('cascade');
- }
+ // link rule id to rules table
+ $table->foreign('rule_id')->references('id')->on('rules')->onDelete('cascade');
+ }
);
}
}
@@ -462,24 +466,24 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('tags')) {
Schema::create(
- 'tags', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
+ 'tags',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
- $table->string('tag', 1024);
- $table->string('tagMode', 1024);
- $table->date('date')->nullable();
- $table->text('description')->nullable();
- $table->decimal('latitude', 24, 12)->nullable();
- $table->decimal('longitude', 24, 12)->nullable();
- $table->smallInteger('zoomLevel', false, true)->nullable();
+ $table->string('tag', 1024);
+ $table->string('tagMode', 1024);
+ $table->date('date')->nullable();
+ $table->text('description')->nullable();
+ $table->decimal('latitude', 24, 12)->nullable();
+ $table->decimal('longitude', 24, 12)->nullable();
+ $table->smallInteger('zoomLevel', false, true)->nullable();
- // link user id to users table
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
-
- }
+ // link user id to users table
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
}
@@ -493,141 +497,149 @@ class CreateMainTables extends Migration
{
if (!Schema::hasTable('transaction_journals')) {
Schema::create(
- 'transaction_journals', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->integer('transaction_type_id', false, true);
- $table->integer('bill_id', false, true)->nullable();
- $table->integer('transaction_currency_id', false, true);
- $table->string('description', 1024);
- $table->date('date');
- $table->date('interest_date')->nullable();
- $table->date('book_date')->nullable();
- $table->date('process_date')->nullable();
- $table->integer('order', false, true)->default(0);
- $table->integer('tag_count', false, true);
- $table->boolean('encrypted')->default(1);
- $table->boolean('completed')->default(1);
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- $table->foreign('transaction_type_id')->references('id')->on('transaction_types')->onDelete('cascade');
- $table->foreign('bill_id')->references('id')->on('bills')->onDelete('set null');
- $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
- }
+ 'transaction_journals',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->integer('transaction_type_id', false, true);
+ $table->integer('bill_id', false, true)->nullable();
+ $table->integer('transaction_currency_id', false, true);
+ $table->string('description', 1024);
+ $table->date('date');
+ $table->date('interest_date')->nullable();
+ $table->date('book_date')->nullable();
+ $table->date('process_date')->nullable();
+ $table->integer('order', false, true)->default(0);
+ $table->integer('tag_count', false, true);
+ $table->boolean('encrypted')->default(1);
+ $table->boolean('completed')->default(1);
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ $table->foreign('transaction_type_id')->references('id')->on('transaction_types')->onDelete('cascade');
+ $table->foreign('bill_id')->references('id')->on('bills')->onDelete('set null');
+ $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('journal_meta')) {
Schema::create(
- 'journal_meta', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('transaction_journal_id', false, true);
- $table->string('name', 255);
- $table->text('data');
- $table->string('hash', 64);
- $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
- }
+ 'journal_meta',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('transaction_journal_id', false, true);
+ $table->string('name', 255);
+ $table->text('data');
+ $table->string('hash', 64);
+ $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('tag_transaction_journal')) {
Schema::create(
- 'tag_transaction_journal', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('tag_id', false, true);
- $table->integer('transaction_journal_id', false, true);
- $table->foreign('tag_id')->references('id')->on('tags')->onDelete('cascade');
- $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
+ 'tag_transaction_journal',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->integer('tag_id', false, true);
+ $table->integer('transaction_journal_id', false, true);
+ $table->foreign('tag_id')->references('id')->on('tags')->onDelete('cascade');
+ $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
-
- }
+ // unique combi:
+ $table->unique(['tag_id', 'transaction_journal_id']);
+ }
);
}
if (!Schema::hasTable('budget_transaction_journal')) {
Schema::create(
- 'budget_transaction_journal', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('budget_id', false, true);
- $table->integer('transaction_journal_id', false, true);
- $table->foreign('budget_id')->references('id')->on('budgets')->onDelete('cascade');
- $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
- }
+ 'budget_transaction_journal',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->integer('budget_id', false, true);
+ $table->integer('transaction_journal_id', false, true);
+ $table->foreign('budget_id')->references('id')->on('budgets')->onDelete('cascade');
+ $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('category_transaction_journal')) {
Schema::create(
- 'category_transaction_journal', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('category_id', false, true);
- $table->integer('transaction_journal_id', false, true);
- $table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
- $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
- }
+ 'category_transaction_journal',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->integer('category_id', false, true);
+ $table->integer('transaction_journal_id', false, true);
+ $table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
+ $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
+ }
);
}
-
if (!Schema::hasTable('piggy_bank_events')) {
Schema::create(
- 'piggy_bank_events', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('piggy_bank_id', false, true);
- $table->integer('transaction_journal_id', false, true)->nullable();
- $table->date('date');
- $table->decimal('amount', 22, 12);
+ 'piggy_bank_events',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('piggy_bank_id', false, true);
+ $table->integer('transaction_journal_id', false, true)->nullable();
+ $table->date('date');
+ $table->decimal('amount', 22, 12);
- $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade');
- $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('set null');
- }
+ $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade');
+ $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('set null');
+ }
);
}
if (!Schema::hasTable('transactions')) {
Schema::create(
- 'transactions', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('account_id', false, true);
- $table->integer('transaction_journal_id', false, true);
- $table->string('description', 1024)->nullable();
- $table->decimal('amount', 22, 12);
+ 'transactions',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('account_id', false, true);
+ $table->integer('transaction_journal_id', false, true);
+ $table->string('description', 1024)->nullable();
+ $table->decimal('amount', 22, 12);
- $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
- $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
-
- }
+ $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
+ $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('budget_transaction')) {
Schema::create(
- 'budget_transaction', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('budget_id', false, true);
- $table->integer('transaction_id', false, true);
+ 'budget_transaction',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->integer('budget_id', false, true);
+ $table->integer('transaction_id', false, true);
- $table->foreign('budget_id')->references('id')->on('budgets')->onDelete('cascade');
- $table->foreign('transaction_id')->references('id')->on('transactions')->onDelete('cascade');
- }
+ $table->foreign('budget_id')->references('id')->on('budgets')->onDelete('cascade');
+ $table->foreign('transaction_id')->references('id')->on('transactions')->onDelete('cascade');
+ }
);
}
if (!Schema::hasTable('category_transaction')) {
Schema::create(
- 'category_transaction', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('category_id', false, true);
- $table->integer('transaction_id', false, true);
+ 'category_transaction',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->integer('category_id', false, true);
+ $table->integer('transaction_id', false, true);
- $table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
- $table->foreign('transaction_id')->references('id')->on('transactions')->onDelete('cascade');
- }
+ $table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
+ $table->foreign('transaction_id')->references('id')->on('transactions')->onDelete('cascade');
+ }
);
}
}
diff --git a/database/migrations/2016_08_25_091522_changes_for_3101.php b/database/migrations/2016_08_25_091522_changes_for_3101.php
index b317ef163c..4a9c2a33ec 100644
--- a/database/migrations/2016_08_25_091522_changes_for_3101.php
+++ b/database/migrations/2016_08_25_091522_changes_for_3101.php
@@ -23,7 +23,6 @@ class ChangesFor3101 extends Migration
*/
public function down()
{
- //
}
/**
@@ -34,9 +33,10 @@ class ChangesFor3101 extends Migration
public function up()
{
Schema::table(
- 'import_jobs', function (Blueprint $table) {
- $table->text('extended_status')->nullable();
- }
+ 'import_jobs',
+ function (Blueprint $table) {
+ $table->text('extended_status')->nullable();
+ }
);
}
}
diff --git a/database/migrations/2016_09_12_121359_fix_nullables.php b/database/migrations/2016_09_12_121359_fix_nullables.php
index ba037d328b..164e3e5236 100644
--- a/database/migrations/2016_09_12_121359_fix_nullables.php
+++ b/database/migrations/2016_09_12_121359_fix_nullables.php
@@ -18,13 +18,11 @@ use Illuminate\Database\Schema\Blueprint;
*/
class FixNullables extends Migration
{
-
/**
* Reverse the migrations.
*/
public function down()
{
-
}
/**
@@ -35,15 +33,17 @@ class FixNullables extends Migration
public function up()
{
Schema::table(
- 'rule_groups', function (Blueprint $table) {
- $table->text('description')->nullable()->change();
- }
+ 'rule_groups',
+ function (Blueprint $table) {
+ $table->text('description')->nullable()->change();
+ }
);
Schema::table(
- 'rules', function (Blueprint $table) {
- $table->text('description')->nullable()->change();
- }
+ 'rules',
+ function (Blueprint $table) {
+ $table->text('description')->nullable()->change();
+ }
);
}
}
diff --git a/database/migrations/2016_10_09_150037_expand_transactions_table.php b/database/migrations/2016_10_09_150037_expand_transactions_table.php
index 6909aaa2a5..2e33905fd8 100644
--- a/database/migrations/2016_10_09_150037_expand_transactions_table.php
+++ b/database/migrations/2016_10_09_150037_expand_transactions_table.php
@@ -8,7 +8,6 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
@@ -24,7 +23,6 @@ class ExpandTransactionsTable extends Migration
*/
public function down()
{
- //
}
/**
@@ -35,9 +33,10 @@ class ExpandTransactionsTable extends Migration
public function up()
{
Schema::table(
- 'transactions', function (Blueprint $table) {
- $table->smallInteger('identifier', false, true)->default(0);
- }
+ 'transactions',
+ function (Blueprint $table) {
+ $table->smallInteger('identifier', false, true)->default(0);
+ }
);
}
}
diff --git a/database/migrations/2016_10_22_075804_changes_for_v410.php b/database/migrations/2016_10_22_075804_changes_for_v410.php
index 0714fb32e5..b3931aeb78 100644
--- a/database/migrations/2016_10_22_075804_changes_for_v410.php
+++ b/database/migrations/2016_10_22_075804_changes_for_v410.php
@@ -8,13 +8,11 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
-
/**
* Class ChangesForV410
*/
@@ -36,15 +34,16 @@ class ChangesForV410 extends Migration
public function up()
{
Schema::create(
- 'notes', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('noteable_id', false, true);
- $table->string('noteable_type');
- $table->string('title')->nullable();
- $table->text('text')->nullable();
- }
+ 'notes',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('noteable_id', false, true);
+ $table->string('noteable_type');
+ $table->string('title')->nullable();
+ $table->text('text')->nullable();
+ }
);
}
}
diff --git a/database/migrations/2016_11_24_210552_changes_for_v420.php b/database/migrations/2016_11_24_210552_changes_for_v420.php
index 1d0a57e940..1ca2c5b652 100644
--- a/database/migrations/2016_11_24_210552_changes_for_v420.php
+++ b/database/migrations/2016_11_24_210552_changes_for_v420.php
@@ -8,7 +8,6 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
@@ -24,7 +23,6 @@ class ChangesForV420 extends Migration
*/
public function down()
{
- //
}
/**
@@ -35,9 +33,10 @@ class ChangesForV420 extends Migration
public function up()
{
Schema::table(
- 'journal_meta', function (Blueprint $table) {
- $table->softDeletes();
- }
+ 'journal_meta',
+ function (Blueprint $table) {
+ $table->softDeletes();
+ }
);
}
}
diff --git a/database/migrations/2016_12_22_150431_changes_for_v430.php b/database/migrations/2016_12_22_150431_changes_for_v430.php
index ef0747e4f4..57be784576 100644
--- a/database/migrations/2016_12_22_150431_changes_for_v430.php
+++ b/database/migrations/2016_12_22_150431_changes_for_v430.php
@@ -8,10 +8,8 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
-
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
@@ -36,20 +34,20 @@ class ChangesForV430 extends Migration
public function up()
{
Schema::create(
- 'available_budgets', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->integer('transaction_currency_id', false, true);
- $table->decimal('amount', 22, 12);
- $table->date('start_date');
- $table->date('end_date');
+ 'available_budgets',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->integer('transaction_currency_id', false, true);
+ $table->decimal('amount', 22, 12);
+ $table->date('start_date');
+ $table->date('end_date');
-
- $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- }
+ $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ }
);
}
}
diff --git a/database/migrations/2016_12_28_203205_changes_for_v431.php b/database/migrations/2016_12_28_203205_changes_for_v431.php
index 1bac0f7924..9beb9fd9f6 100644
--- a/database/migrations/2016_12_28_203205_changes_for_v431.php
+++ b/database/migrations/2016_12_28_203205_changes_for_v431.php
@@ -8,7 +8,6 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
@@ -21,31 +20,30 @@ class ChangesForV431 extends Migration
{
/**
* Reverse the migrations.
- *
- * @return void
*/
public function down()
{
// reinstate "repeats" and "repeat_freq".
Schema::table(
- 'budget_limits', function (Blueprint $table) {
- $table->string('repeat_freq', 30)->nullable();
- }
+ 'budget_limits',
+ function (Blueprint $table) {
+ $table->string('repeat_freq', 30)->nullable();
+ }
);
Schema::table(
- 'budget_limits', function (Blueprint $table) {
- $table->boolean('repeats')->default(0);
- }
+ 'budget_limits',
+ function (Blueprint $table) {
+ $table->boolean('repeats')->default(0);
+ }
);
-
// remove date field "end_date"
Schema::table(
- 'budget_limits', function (Blueprint $table) {
- $table->dropColumn('end_date');
- }
+ 'budget_limits',
+ function (Blueprint $table) {
+ $table->dropColumn('end_date');
+ }
);
-
}
/**
@@ -57,38 +55,40 @@ class ChangesForV431 extends Migration
{
// add decimal places to "transaction currencies".
Schema::table(
- 'transaction_currencies', function (Blueprint $table) {
- $table->smallInteger('decimal_places', false, true)->default(2);
- }
+ 'transaction_currencies',
+ function (Blueprint $table) {
+ $table->smallInteger('decimal_places', false, true)->default(2);
+ }
);
// change field "startdate" to "start_date"
Schema::table(
- 'budget_limits', function (Blueprint $table) {
- $table->renameColumn('startdate', 'start_date');
- }
+ 'budget_limits',
+ function (Blueprint $table) {
+ $table->renameColumn('startdate', 'start_date');
+ }
);
// add date field "end_date" after "start_date"
Schema::table(
- 'budget_limits', function (Blueprint $table) {
- $table->date('end_date')->nullable()->after('start_date');
- }
+ 'budget_limits',
+ function (Blueprint $table) {
+ $table->date('end_date')->nullable()->after('start_date');
+ }
);
// drop "repeats" and "repeat_freq".
Schema::table(
- 'budget_limits', function (Blueprint $table) {
- $table->dropColumn('repeats');
-
- }
+ 'budget_limits',
+ function (Blueprint $table) {
+ $table->dropColumn('repeats');
+ }
);
Schema::table(
- 'budget_limits', function (Blueprint $table) {
- $table->dropColumn('repeat_freq');
- }
+ 'budget_limits',
+ function (Blueprint $table) {
+ $table->dropColumn('repeat_freq');
+ }
);
-
-
}
}
diff --git a/database/migrations/2017_04_13_163623_changes_for_v440.php b/database/migrations/2017_04_13_163623_changes_for_v440.php
index 8293836751..be6aa0e697 100644
--- a/database/migrations/2017_04_13_163623_changes_for_v440.php
+++ b/database/migrations/2017_04_13_163623_changes_for_v440.php
@@ -8,10 +8,8 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
-
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
@@ -22,8 +20,6 @@ class ChangesForV440 extends Migration
{
/**
* Reverse the migrations.
- *
- * @return void
*/
public function down()
{
@@ -36,36 +32,36 @@ class ChangesForV440 extends Migration
* Run the migrations.
*
* @SuppressWarnings(PHPMD.ShortMethodName)
- * @return void
*/
public function up()
{
if (!Schema::hasTable('currency_exchange_rates')) {
Schema::create(
- 'currency_exchange_rates', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->integer('user_id', false, true);
- $table->integer('from_currency_id', false, true);
- $table->integer('to_currency_id', false, true);
- $table->date('date');
- $table->decimal('rate', 22, 12);
- $table->decimal('user_rate', 22, 12)->nullable();
+ 'currency_exchange_rates',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->integer('user_id', false, true);
+ $table->integer('from_currency_id', false, true);
+ $table->integer('to_currency_id', false, true);
+ $table->date('date');
+ $table->decimal('rate', 22, 12);
+ $table->decimal('user_rate', 22, 12)->nullable();
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- $table->foreign('from_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
- $table->foreign('to_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
- }
+ $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
+ $table->foreign('from_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
+ $table->foreign('to_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
+ }
);
}
- //
- Schema::table(
- 'transactions', function (Blueprint $table) {
- $table->integer('transaction_currency_id', false, true)->after('description')->nullable();
- $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
- }
- );
+ Schema::table(
+ 'transactions',
+ function (Blueprint $table) {
+ $table->integer('transaction_currency_id', false, true)->after('description')->nullable();
+ $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
+ }
+ );
}
}
diff --git a/database/migrations/2017_06_02_105232_changes_for_v450.php b/database/migrations/2017_06_02_105232_changes_for_v450.php
index 44c2a04dc4..dbc92fe4da 100644
--- a/database/migrations/2017_06_02_105232_changes_for_v450.php
+++ b/database/migrations/2017_06_02_105232_changes_for_v450.php
@@ -8,10 +8,8 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
-
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
@@ -22,8 +20,6 @@ class ChangesForV450 extends Migration
{
/**
* Reverse the migrations.
- *
- * @return void
*/
public function down()
{
@@ -33,23 +29,24 @@ class ChangesForV450 extends Migration
* Run the migrations.
*
* @SuppressWarnings(PHPMD.ShortMethodName)
- * @return void
*/
public function up()
{
// add "foreign_amount" to transactions
Schema::table(
- 'transactions', function (Blueprint $table) {
- $table->decimal('foreign_amount', 22, 12)->nullable()->after('amount');
- }
+ 'transactions',
+ function (Blueprint $table) {
+ $table->decimal('foreign_amount', 22, 12)->nullable()->after('amount');
+ }
);
// add foreign transaction currency id to transactions (is nullable):
Schema::table(
- 'transactions', function (Blueprint $table) {
- $table->integer('foreign_currency_id', false, true)->default(null)->after('foreign_amount')->nullable();
- $table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
- }
+ 'transactions',
+ function (Blueprint $table) {
+ $table->integer('foreign_currency_id', false, true)->default(null)->after('foreign_amount')->nullable();
+ $table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
+ }
);
}
}
diff --git a/database/migrations/2017_08_20_062014_changes_for_v470.php b/database/migrations/2017_08_20_062014_changes_for_v470.php
index 942ef5e788..0f1173a17f 100644
--- a/database/migrations/2017_08_20_062014_changes_for_v470.php
+++ b/database/migrations/2017_08_20_062014_changes_for_v470.php
@@ -1,6 +1,6 @@
increments('id');
- $table->timestamps();
- $table->softDeletes();
- $table->string('name');
- $table->string('outward');
- $table->string('inward');
- $table->boolean('editable');
+ 'link_types',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->softDeletes();
+ $table->string('name');
+ $table->string('outward');
+ $table->string('inward');
+ $table->boolean('editable');
- $table->unique(['name', 'outward','inward']);
- }
+ $table->unique(['name', 'outward', 'inward']);
+ }
);
}
if (!Schema::hasTable('journal_links')) {
Schema::create(
- 'journal_links', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('link_type_id', false, true);
- $table->integer('source_id', false, true);
- $table->integer('destination_id', false, true);
- $table->text('comment')->nullable();
+ 'journal_links',
+ function (Blueprint $table) {
+ $table->increments('id');
+ $table->timestamps();
+ $table->integer('link_type_id', false, true);
+ $table->integer('source_id', false, true);
+ $table->integer('destination_id', false, true);
+ $table->text('comment')->nullable();
- $table->foreign('link_type_id')->references('id')->on('link_types')->onDelete('cascade');
- $table->foreign('source_id')->references('id')->on('transaction_journals')->onDelete('cascade');
- $table->foreign('destination_id')->references('id')->on('transaction_journals')->onDelete('cascade');
+ $table->foreign('link_type_id')->references('id')->on('link_types')->onDelete('cascade');
+ $table->foreign('source_id')->references('id')->on('transaction_journals')->onDelete('cascade');
+ $table->foreign('destination_id')->references('id')->on('transaction_journals')->onDelete('cascade');
- $table->unique(['link_type_id','source_id','destination_id']);
-
-
- }
+ $table->unique(['link_type_id', 'source_id', 'destination_id']);
+ }
);
}
}
diff --git a/database/migrations/2017_11_04_170844_changes_for_v470a.php b/database/migrations/2017_11_04_170844_changes_for_v470a.php
new file mode 100644
index 0000000000..6ebbdb0a23
--- /dev/null
+++ b/database/migrations/2017_11_04_170844_changes_for_v470a.php
@@ -0,0 +1,32 @@
+boolean('reconciled')->after('deleted_at')->default(0);
+ }
+ );
+ }
+}
diff --git a/database/seeds/AccountTypeSeeder.php b/database/seeds/AccountTypeSeeder.php
index e98b6b8db7..2a1b072141 100644
--- a/database/seeds/AccountTypeSeeder.php
+++ b/database/seeds/AccountTypeSeeder.php
@@ -8,7 +8,6 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
use FireflyIII\Models\AccountType;
@@ -21,16 +20,15 @@ class AccountTypeSeeder extends Seeder
{
public function run()
{
- AccountType::create(['type' => 'Default account']);
- AccountType::create(['type' => 'Cash account']);
- AccountType::create(['type' => 'Asset account']);
- AccountType::create(['type' => 'Expense account']);
- AccountType::create(['type' => 'Revenue account']);
- AccountType::create(['type' => 'Initial balance account']);
- AccountType::create(['type' => 'Beneficiary account']);
- AccountType::create(['type' => 'Import account']);
- AccountType::create(['type' => 'Loan']);
+ AccountType::create(['type' => AccountType::DEFAULT]);
+ AccountType::create(['type' => AccountType::CASH]);
+ AccountType::create(['type' => AccountType::ASSET]);
+ AccountType::create(['type' => AccountType::EXPENSE]);
+ AccountType::create(['type' => AccountType::REVENUE]);
+ AccountType::create(['type' => AccountType::INITIAL_BALANCE]);
+ AccountType::create(['type' => AccountType::BENEFICIARY]);
+ AccountType::create(['type' => AccountType::IMPORT]);
+ AccountType::create(['type' => AccountType::LOAN]);
+ AccountType::create(['type' => AccountType::RECONCILIATION]);
}
-
-
-}
+}
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
index 03adb0669e..11505d148a 100644
--- a/database/seeds/DatabaseSeeder.php
+++ b/database/seeds/DatabaseSeeder.php
@@ -19,8 +19,6 @@ class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
- *
- * @return void
*/
public function run()
{
@@ -29,6 +27,5 @@ class DatabaseSeeder extends Seeder
$this->call(TransactionTypeSeeder::class);
$this->call(PermissionSeeder::class);
$this->call(LinkTypeSeeder::class);
-
}
}
diff --git a/database/seeds/LinkTypeSeeder.php b/database/seeds/LinkTypeSeeder.php
index 3b872e4588..4662d0820c 100644
--- a/database/seeds/LinkTypeSeeder.php
+++ b/database/seeds/LinkTypeSeeder.php
@@ -7,10 +7,8 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
-
use FireflyIII\Models\LinkType;
use Illuminate\Database\Seeder;
@@ -51,7 +49,5 @@ class LinkTypeSeeder extends Seeder
$link->outward = '(partially) reimburses';
$link->editable = false;
$link->save();
-
}
-
}
diff --git a/database/seeds/PermissionSeeder.php b/database/seeds/PermissionSeeder.php
index 94b3e48afa..f24ef6b1c0 100644
--- a/database/seeds/PermissionSeeder.php
+++ b/database/seeds/PermissionSeeder.php
@@ -8,10 +8,8 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
-
use FireflyIII\Models\Role;
use Illuminate\Database\Seeder;
@@ -33,7 +31,5 @@ class PermissionSeeder extends Seeder
$demo->display_name = 'Demo User';
$demo->description = 'User is a demo user';
$demo->save();
-
}
-
}
diff --git a/database/seeds/TransactionCurrencySeeder.php b/database/seeds/TransactionCurrencySeeder.php
index 0d7732e80b..31b3650681 100644
--- a/database/seeds/TransactionCurrencySeeder.php
+++ b/database/seeds/TransactionCurrencySeeder.php
@@ -8,7 +8,6 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
use FireflyIII\Models\TransactionCurrency;
@@ -21,14 +20,34 @@ class TransactionCurrencySeeder extends Seeder
{
public function run()
{
+ // european currencies
TransactionCurrency::create(['code' => 'EUR', 'name' => 'Euro', 'symbol' => '€', 'decimal_places' => 2]);
- TransactionCurrency::create(['code' => 'USD', 'name' => 'US Dollar', 'symbol' => '$', 'decimal_places' => 2]);
TransactionCurrency::create(['code' => 'HUF', 'name' => 'Hungarian forint', 'symbol' => 'Ft', 'decimal_places' => 2]);
- TransactionCurrency::create(['code' => 'BRL', 'name' => 'Real', 'symbol' => 'R$', 'decimal_places' => 2]);
TransactionCurrency::create(['code' => 'GBP', 'name' => 'British Pound', 'symbol' => '£', 'decimal_places' => 2]);
- TransactionCurrency::create(['code' => 'IDR', 'name' => 'Indonesian rupiah', 'symbol' => 'Rp', 'decimal_places' => 2]);
- TransactionCurrency::create(['code' => 'XBT', 'name' => 'Bitcoin', 'symbol' => 'B', 'decimal_places' => 8]);
- TransactionCurrency::create(['code' => 'JPY', 'name' => 'Japanese yen', 'symbol' => '¥', 'decimal_places' => 2]);
- }
-}
+ // american currencies
+ TransactionCurrency::create(['code' => 'USD', 'name' => 'US Dollar', 'symbol' => '$', 'decimal_places' => 2]);
+ TransactionCurrency::create(['code' => 'BRL', 'name' => 'Brazilian real', 'symbol' => 'R$', 'decimal_places' => 2]);
+ TransactionCurrency::create(['code' => 'CAD', 'name' => 'Canadian dollar', 'symbol' => 'C$', 'decimal_places' => 2]);
+
+ // oceanian currencies
+ TransactionCurrency::create(['code' => 'IDR', 'name' => 'Indonesian rupiah', 'symbol' => 'Rp', 'decimal_places' => 2]);
+ TransactionCurrency::create(['code' => 'AUD', 'name' => 'Australian dollar', 'symbol' => 'A$', 'decimal_places' => 2]);
+ TransactionCurrency::create(['code' => 'NZD', 'name' => 'New Zealand dollar', 'symbol' => 'NZ$', 'decimal_places' => 2]);
+
+ // african currencies
+ TransactionCurrency::create(['code' => 'EGP', 'name' => 'Egyptian pound', 'symbol' => 'E£', 'decimal_places' => 2]);
+ TransactionCurrency::create(['code' => 'MAD', 'name' => 'Moroccan dirham', 'symbol' => 'DH', 'decimal_places' => 2]);
+ TransactionCurrency::create(['code' => 'ZAR', 'name' => 'South African rand', 'symbol' => 'R', 'decimal_places' => 2]);
+
+ // asian currencies
+ TransactionCurrency::create(['code' => 'JPY', 'name' => 'Japanese yen', 'symbol' => '¥', 'decimal_places' => 2]);
+ TransactionCurrency::create(['code' => 'RMB', 'name' => 'Chinese yuan', 'symbol' => '元', 'decimal_places' => 2]);
+ TransactionCurrency::create(['code' => 'RUB', 'name' => 'Russian ruble ', 'symbol' => '₽', 'decimal_places' => 2]);
+
+ // international currencies
+ TransactionCurrency::create(['code' => 'XBT', 'name' => 'Bitcoin', 'symbol' => '₿', 'decimal_places' => 8]);
+ TransactionCurrency::create(['code' => 'BCH', 'name' => 'Bitcoin cash', 'symbol' => '₿C', 'decimal_places' => 8]);
+ TransactionCurrency::create(['code' => 'ETH', 'name' => 'Ethereum', 'symbol' => 'Ξ', 'decimal_places' => 12]);
+ }
+}
diff --git a/database/seeds/TransactionTypeSeeder.php b/database/seeds/TransactionTypeSeeder.php
index 6c1a709bb3..f12c118758 100644
--- a/database/seeds/TransactionTypeSeeder.php
+++ b/database/seeds/TransactionTypeSeeder.php
@@ -8,7 +8,6 @@
*
* See the LICENSE file for details.
*/
-
declare(strict_types=1);
use FireflyIII\Models\TransactionType;
@@ -25,6 +24,6 @@ class TransactionTypeSeeder extends Seeder
TransactionType::create(['type' => TransactionType::DEPOSIT]);
TransactionType::create(['type' => TransactionType::TRANSFER]);
TransactionType::create(['type' => TransactionType::OPENING_BALANCE]);
+ TransactionType::create(['type' => TransactionType::RECONCILIATION]);
}
-
-}
+}
diff --git a/docker-compose.dockerhub.yml b/docker-compose.dockerhub.yml
index adad39769f..9efec01696 100644
--- a/docker-compose.dockerhub.yml
+++ b/docker-compose.dockerhub.yml
@@ -1,7 +1,7 @@
version: '2'
services:
firefly-db:
- image: 'mysql:8'
+ image: mysql:8
environment:
- MYSQL_DATABASE=firefly_db
- MYSQL_USER=firefly_db
diff --git a/nginx_app.conf b/nginx_app.conf
index b0a4d0ee32..97bdb62378 100644
--- a/nginx_app.conf
+++ b/nginx_app.conf
@@ -1,7 +1,12 @@
+# prevent HTTPoxy vulnerability
+fastcgi_param HTTP_PROXY "";
+
location / {
+ # try to serve file directly, fallback to rewrite
try_files $uri @rewriteapp;
}
location @rewriteapp {
+ # rewrite all to index.php
rewrite ^(.*)$ /index.php$1 last;
}
\ No newline at end of file
diff --git a/public/css/firefly.css b/public/css/firefly.css
index 87489e2b14..b1224ebcdc 100644
--- a/public/css/firefly.css
+++ b/public/css/firefly.css
@@ -28,7 +28,7 @@
}
p.tagcloud .label {
- line-height:2;
+ line-height: 2;
}
.handle {
@@ -126,4 +126,10 @@ span.info-box-icon a {
span.info-box-text a:hover, span.info-box-number a:hover {
color: #000;
text-decoration: underline;
+}
+
+.dropdown-menu {
+ max-height: 300px;
+ overflow-y: auto;
+ overflow-x: hidden;
}
\ No newline at end of file
diff --git a/public/css/google-fonts.css b/public/css/google-fonts.css
index ad3e4c6983..3647aa35a3 100644
--- a/public/css/google-fonts.css
+++ b/public/css/google-fonts.css
@@ -26,6 +26,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
+
/* cyrillic */
@font-face {
font-family: 'Source Sans Pro';
@@ -34,6 +35,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
+
/* greek-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -42,6 +44,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF;
}
+
/* greek */
@font-face {
font-family: 'Source Sans Pro';
@@ -50,6 +53,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-greek.woff2') format('woff2');
unicode-range: U+0370-03FF;
}
+
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
@@ -58,6 +62,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
+
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -66,6 +71,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
+
/* latin */
@font-face {
font-family: 'Source Sans Pro';
@@ -74,6 +80,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
+
/* cyrillic-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -82,6 +89,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
+
/* cyrillic */
@font-face {
font-family: 'Source Sans Pro';
@@ -90,6 +98,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
+
/* greek-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -98,6 +107,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF;
}
+
/* greek */
@font-face {
font-family: 'Source Sans Pro';
@@ -106,6 +116,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-greek.woff2') format('woff2');
unicode-range: U+0370-03FF;
}
+
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
@@ -114,6 +125,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
+
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -122,6 +134,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
+
/* latin */
@font-face {
font-family: 'Source Sans Pro';
@@ -130,6 +143,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
+
/* cyrillic-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -138,6 +152,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
+
/* cyrillic */
@font-face {
font-family: 'Source Sans Pro';
@@ -146,6 +161,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
+
/* greek-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -154,6 +170,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF;
}
+
/* greek */
@font-face {
font-family: 'Source Sans Pro';
@@ -162,6 +179,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-greek.woff2') format('woff2');
unicode-range: U+0370-03FF;
}
+
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
@@ -170,6 +188,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
+
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -178,6 +197,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
+
/* latin */
@font-face {
font-family: 'Source Sans Pro';
@@ -186,6 +206,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
+
/* cyrillic-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -194,6 +215,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
+
/* cyrillic */
@font-face {
font-family: 'Source Sans Pro';
@@ -202,6 +224,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
+
/* greek-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -210,6 +233,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF;
}
+
/* greek */
@font-face {
font-family: 'Source Sans Pro';
@@ -218,6 +242,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-greek.woff2') format('woff2');
unicode-range: U+0370-03FF;
}
+
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
@@ -226,6 +251,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
+
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -234,6 +260,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
+
/* latin */
@font-face {
font-family: 'Source Sans Pro';
@@ -242,6 +269,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
+
/* cyrillic-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -250,6 +278,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
+
/* cyrillic */
@font-face {
font-family: 'Source Sans Pro';
@@ -258,6 +287,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
+
/* greek-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -266,6 +296,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF;
}
+
/* greek */
@font-face {
font-family: 'Source Sans Pro';
@@ -274,6 +305,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-greek.woff2') format('woff2');
unicode-range: U+0370-03FF;
}
+
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
@@ -282,6 +314,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
+
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -290,6 +323,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
+
/* latin */
@font-face {
font-family: 'Source Sans Pro';
@@ -298,6 +332,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
+
/* cyrillic-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -306,6 +341,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
+
/* cyrillic */
@font-face {
font-family: 'Source Sans Pro';
@@ -314,6 +350,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
+
/* greek-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -322,6 +359,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF;
}
+
/* greek */
@font-face {
font-family: 'Source Sans Pro';
@@ -330,6 +368,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-greek.woff2') format('woff2');
unicode-range: U+0370-03FF;
}
+
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
@@ -338,6 +377,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
+
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -346,6 +386,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
+
/* latin */
@font-face {
font-family: 'Source Sans Pro';
@@ -354,6 +395,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
+
/* cyrillic-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -362,6 +404,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
+
/* cyrillic */
@font-face {
font-family: 'Source Sans Pro';
@@ -370,6 +413,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
+
/* greek-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -378,6 +422,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF;
}
+
/* greek */
@font-face {
font-family: 'Source Sans Pro';
@@ -386,6 +431,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-greek.woff2') format('woff2');
unicode-range: U+0370-03FF;
}
+
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
@@ -394,6 +440,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
+
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
@@ -402,6 +449,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
+
/* latin */
@font-face {
font-family: 'Source Sans Pro';
diff --git a/public/index.php b/public/index.php
index fee61b0b1d..abea8072d8 100644
--- a/public/index.php
+++ b/public/index.php
@@ -40,7 +40,7 @@ define('LARAVEL_START', microtime(true));
|
*/
-require __DIR__.'/../vendor/autoload.php';
+require __DIR__ . '/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
@@ -54,7 +54,7 @@ require __DIR__.'/../vendor/autoload.php';
|
*/
-$app = require_once __DIR__.'/../bootstrap/app.php';
+$app = require_once __DIR__ . '/../bootstrap/app.php';
/*
|--------------------------------------------------------------------------
diff --git a/public/js/ff/accounts/edit-reconciliation.js b/public/js/ff/accounts/edit-reconciliation.js
new file mode 100644
index 0000000000..cbcbcd7e42
--- /dev/null
+++ b/public/js/ff/accounts/edit-reconciliation.js
@@ -0,0 +1,52 @@
+/*
+ * edit-reconciliation.js
+ * Copyright (c) 2017 thegrumpydictator@gmail.com
+ *
+ * This file is part of Firefly III.
+ *
+ * Firefly III is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Firefly III is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Firefly III. If not, see .
+ */
+
+/** global: what, Modernizr, selectsForeignCurrency, convertForeignToNative, validateCurrencyForTransfer, convertSourceToDestination, journalData, journal, accountInfo, exchangeRateInstructions, currencyInfo */
+
+$(document).ready(function () {
+ "use strict";
+ setAutocompletes();
+
+});
+
+/**
+ * Set the auto-complete JSON things.
+ */
+function setAutocompletes() {
+
+ $.getJSON('json/categories').done(function (data) {
+ $('input[name="category"]').typeahead({source: data});
+ });
+
+ $.getJSON('json/tags').done(function (data) {
+ var opt = {
+ typeahead: {
+ source: data,
+ afterSelect: function () {
+ this.$element.val("");
+ }
+ }
+ };
+ $('input[name="tags"]').tagsinput(
+ opt
+ );
+ });
+}
+
diff --git a/public/js/ff/accounts/reconcile.js b/public/js/ff/accounts/reconcile.js
new file mode 100644
index 0000000000..6609efd287
--- /dev/null
+++ b/public/js/ff/accounts/reconcile.js
@@ -0,0 +1,224 @@
+/*
+ * reconcile.js
+ * Copyright (c) 2017 thegrumpydictator@gmail.com
+ *
+ * This file is part of Firefly III.
+ *
+ * Firefly III is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Firefly III is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Firefly III. If not, see .
+ */
+
+/** global: overviewUri, transactionsUri, indexUri,accounting */
+
+var balanceDifference = 0;
+var difference = 0;
+var selectedAmount = 0;
+var reconcileStarted = false;
+var changedBalances = false;
+
+/**
+ *
+ */
+$(function () {
+ "use strict";
+
+ /*
+ Respond to changes in balance statements.
+ */
+ $('input[type="number"]').on('change', function () {
+ if (reconcileStarted) {
+ calculateBalanceDifference();
+ difference = balanceDifference - selectedAmount;
+ updateDifference();
+ }
+ changedBalances = true;
+ });
+
+ /*
+ Respond to changes in the date range.
+ */
+ $('input[type="date"]').on('change', function () {
+ if (reconcileStarted) {
+ // hide original instructions.
+ $('.select_transactions_instruction').hide();
+
+ // show date-change warning
+ $('.date_change_warning').show();
+
+ // show update button
+ $('.change_date_button').show();
+ }
+ });
+
+ $('.change_date_button').click(startReconcile);
+ $('.start_reconcile').click(startReconcile);
+ $('.store_reconcile').click(storeReconcile);
+
+});
+
+function storeReconcile() {
+ // get modal HTML:
+ var ids = [];
+ $.each($('.reconcile_checkbox:checked'), function (i, v) {
+ ids.push($(v).data('id'));
+ });
+ var cleared = [];
+ $.each($('input[class="cleared"]'), function (i, v) {
+ var obj = $(v);
+ cleared.push(obj.data('id'));
+ });
+
+ var variables = {
+ startBalance: parseFloat($('input[name="start_balance"]').val()),
+ endBalance: parseFloat($('input[name="end_balance"]').val()),
+ startDate: $('input[name="start_date"]').val(),
+ startEnd: $('input[name="end_date"]').val(),
+ transactions: ids,
+ cleared: cleared,
+ };
+ var uri = overviewUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val());
+
+
+ $.getJSON(uri, variables).done(function (data) {
+ if (data.is_zero === false) {
+ $('#defaultModal').empty().html(data.html).modal('show');
+ }
+ });
+}
+
+/**
+ * What happens when you check a checkbox:
+ * @param e
+ */
+function checkReconciledBox(e) {
+ var el = $(e.target);
+ var amount = parseFloat(el.val());
+ // if checked, add to selected amount
+ if (el.prop('checked') === true && el.data('younger') === false) {
+ selectedAmount = selectedAmount - amount;
+ }
+ if (el.prop('checked') === false && el.data('younger') === false) {
+ selectedAmount = selectedAmount + amount;
+ }
+ difference = balanceDifference - selectedAmount;
+ updateDifference();
+}
+
+
+/**
+ * Calculate the difference between given start and end balance
+ * and put it in balanceDifference.
+ */
+function calculateBalanceDifference() {
+ var startBalance = parseFloat($('input[name="start_balance"]').val());
+ var endBalance = parseFloat($('input[name="end_balance"]').val());
+ balanceDifference = startBalance - endBalance;
+ //if (balanceDifference < 0) {
+ // balanceDifference = balanceDifference * -1;
+ //}
+}
+
+/**
+ * Grab all transactions, update the URL and place the set of transactions in the box.
+ * This more or less resets the reconciliation.
+ */
+function getTransactionsForRange() {
+ // clear out the box:
+ $('#transactions_holder').empty().append($('').addClass('text-center').html(' '));
+ var uri = transactionsUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val());
+ var index = indexUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val());
+ window.history.pushState('object or string', "Reconcile account", index);
+
+ $.getJSON(uri).done(placeTransactions);
+}
+
+/**
+ * Loop over all transactions that have already been cleared (in the range) and add this to the selectedAmount.
+ *
+ */
+function includeClearedTransactions() {
+ $.each($('input[class="cleared"]'), function (i, v) {
+ var obj = $(v);
+ if (obj.data('younger') === false) {
+ selectedAmount = selectedAmount - parseFloat(obj.val());
+ }
+ });
+}
+
+/**
+ * Place the HTML for the transactions within the date range and update the balance difference.
+ * @param data
+ */
+function placeTransactions(data) {
+ $('#transactions_holder').empty().html(data.html);
+ selectedAmount = 0;
+ // update start + end balance when user has not touched them.
+ if (!changedBalances) {
+ $('input[name="start_balance"]').val(data.startBalance);
+ $('input[name="end_balance"]').val(data.endBalance);
+ }
+
+ // as long as the dates are equal, changing the balance does not matter.
+ calculateBalanceDifference();
+
+ // any already cleared transactions must be added to / removed from selectedAmount.
+ includeClearedTransactions();
+
+ difference = balanceDifference;
+ updateDifference();
+
+ // enable the check buttons:
+ $('.reconcile_checkbox').prop('disabled', false).unbind('change').change(checkReconciledBox);
+
+ // show the other instruction:
+ $('.select_transactions_instruction').show();
+
+ $('.store_reconcile').prop('disabled', false);
+}
+
+/**
+ *
+ * @returns {boolean}
+ */
+function startReconcile() {
+
+ reconcileStarted = true;
+
+ // hide the start button.
+ $('.start_reconcile').hide();
+
+ // hide the start instructions:
+ $('.update_balance_instruction').hide();
+
+ // hide date-change warning
+ $('.date_change_warning').hide();
+
+ // hide update button
+ $('.change_date_button').hide();
+
+ getTransactionsForRange();
+
+
+ return false;
+}
+
+function updateDifference() {
+ var addClass = 'text-info';
+ if (difference > 0) {
+ addClass = 'text-success';
+ }
+ if (difference < 0) {
+ addClass = 'text-danger';
+ }
+ $('#difference').addClass(addClass).text(accounting.formatMoney(difference));
+}
\ No newline at end of file
diff --git a/public/js/ff/budgets/index.js b/public/js/ff/budgets/index.js
index e4b31c615e..0fc5f64cc6 100644
--- a/public/js/ff/budgets/index.js
+++ b/public/js/ff/budgets/index.js
@@ -18,8 +18,7 @@
* along with Firefly III. If not, see .
*/
-/** global: spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */
-
+/** global: infoIncomeUri, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */
/**
*
*/
@@ -38,7 +37,7 @@ $(function () {
/*
When the input changes, update the percentages for the budgeted bar:
*/
- $('input[type="number"]').on('input', updateBudgetedAmounts);
+ $('input[type="number"]').on('change', updateBudgetedAmounts);
//
$('.selectPeriod').change(function (e) {
@@ -104,46 +103,52 @@ function updateBudgetedAmounts(e) {
"use strict";
var target = $(e.target);
var id = target.data('id');
-
+ var leftCell = $('td[class$="left"][data-id="' + id + '"]');
+ var link = $('a[data-id="'+id+'"][class="budget-link"]');
var value = target.val();
var original = target.data('original');
- var difference = value - original;
- var spentCell = $('td[class="spent"][data-id="' + id + '"]');
- var leftCell = $('td[class="left"][data-id="' + id + '"]');
- var spentAmount = parseFloat(spentCell.data('spent'));
- var newAmountLeft = spentAmount + parseFloat(value);
- var amountLeftString = accounting.formatMoney(newAmountLeft);
- if (newAmountLeft < 0) {
- leftCell.html('' + amountLeftString + ' ');
- }
- if (newAmountLeft > 0) {
- leftCell.html('' + amountLeftString + ' ');
- }
- if (newAmountLeft === 0.0) {
- leftCell.html('' + amountLeftString + ' ');
- }
+ // disable input
+ target.prop('disabled', true);
- if (difference !== 0) {
- // add difference to 'budgeted' var
+ // replace link (for now)
+ link.attr('href','#');
+
+ // replace "left" with spinner.
+ leftCell.empty().html(' ');
+
+ // send a post to Firefly to update the amount:
+ var newUri = budgetAmountUri.replace("REPLACE", id);
+
+ $.post(newUri, {amount: value, start: periodStart, end: periodEnd}).done(function (data) {
+
+ // difference between new value and original value
+ var difference = value - original;
+
+ // update budgeted value
budgeted = budgeted + difference;
- // update original:
- target.data('original', value);
+ // fill in "left" value:
+ leftCell.html(data.left);
+
+ // update "budgeted" input:
+ target.val(data.amount);
+
+ // enable thing again
+ target.prop('disabled', false);
+
+ // set new original value:
+ target.data('original', data.amount);
+
// run drawBudgetedBar() again:
drawBudgetedBar();
- // send a post to Firefly to update the amount:
- var newUri = budgetAmountUri.replace("REPLACE", id);
- $.post(newUri, {amount: value, start: periodStart, end: periodEnd}).done(function (data) {
- // update the link if relevant:
- if (data.repetition > 0) {
- $('.budget-link[data-id="' + id + '"]').attr('href', 'budgets/show/' + id + '/' + data.repetition);
- } else {
- $('.budget-link[data-id="' + id + '"]').attr('href', 'budgets/show/' + id);
- }
- });
- }
+ // update the link if relevant:
+ link.attr('href', 'budgets/show/' + id);
+ if (data.limit > 0) {
+ link.attr('href', 'budgets/show/' + id + '/' + data.limit);
+ }
+ });
}
/**
diff --git a/public/js/ff/charts.js b/public/js/ff/charts.js
index 9b59ab1db4..d69efc3f66 100644
--- a/public/js/ff/charts.js
+++ b/public/js/ff/charts.js
@@ -17,9 +17,10 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-/** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart */
+/** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart, todayText */
var allCharts = {};
+
/*
Make some colours:
*/
@@ -58,6 +59,42 @@ Chart.defaults.global.responsive = true;
Chart.defaults.global.maintainAspectRatio = false;
+/**
+ * Chart line thing
+ */
+const verticalLinePlugin = {
+ getLinePosition: function (chart, pointIndex) {
+ const meta = chart.getDatasetMeta(0); // first dataset is used to discover X coordinate of a point
+ const data = meta.data;
+ return data[pointIndex]._model.x;
+ },
+ renderVerticalLine: function (chartInstance, pointIndex) {
+ const lineLeftOffset = this.getLinePosition(chartInstance, pointIndex);
+ const scale = chartInstance.scales['y-axis-0'];
+ const context = chartInstance.chart.ctx;
+
+ // render vertical line
+ context.beginPath();
+ context.strokeStyle = fillColors[3];
+ context.moveTo(lineLeftOffset, scale.top);
+ context.lineTo(lineLeftOffset, scale.bottom);
+ context.stroke();
+
+ // write label
+ context.fillStyle = "#444444";
+ context.textAlign = 'left';
+ context.fillText(todayText, lineLeftOffset, scale.top * 3); // (scale.bottom - scale.top) / 2 + scale.top
+ },
+
+ afterDatasetsDraw: function (chart, easing) {
+ if (chart.config.lineAtIndex) {
+ chart.config.lineAtIndex.forEach(pointIndex => this.renderVerticalLine(chart, pointIndex));
+ }
+ }
+};
+
+Chart.plugins.register(verticalLinePlugin);
+
/**
*
* @param data
@@ -89,7 +126,16 @@ function lineChart(URI, container) {
var options = $.extend(true, {}, defaultChartOptions);
var chartType = 'line';
- drawAChart(URI, container, chartType, options, colorData);
+ drawAChart(URI, container, chartType, options, colorData, -1);
+}
+
+function lineChartWithDay(URI, container, today) {
+ "use strict";
+ var colorData = true;
+ var options = $.extend(true, {}, defaultChartOptions);
+ var chartType = 'line';
+
+ drawAChart(URI, container, chartType, options, colorData, today);
}
/**
@@ -248,8 +294,9 @@ function pieChart(URI, container) {
* @param chartType
* @param options
* @param colorData
+ * @param today
*/
-function drawAChart(URI, container, chartType, options, colorData) {
+function drawAChart(URI, container, chartType, options, colorData, today) {
var containerObj = $('#' + container);
if (containerObj.length === 0) {
return;
@@ -286,11 +333,16 @@ function drawAChart(URI, container, chartType, options, colorData) {
} else {
// new chart!
var ctx = document.getElementById(container).getContext("2d");
- allCharts[container] = new Chart(ctx, {
+ var chartOpts = {
type: chartType,
data: data,
- options: options
- });
+ options: options,
+ lineAtIndex: []
+ };
+ if (today >= 0) {
+ chartOpts.lineAtIndex.push(today - 1);
+ }
+ allCharts[container] = new Chart(ctx, chartOpts);
}
}).fail(function () {
diff --git a/public/js/ff/export/index.js b/public/js/ff/export/index.js
index 97bfd5bf67..b446b20f03 100644
--- a/public/js/ff/export/index.js
+++ b/public/js/ff/export/index.js
@@ -120,7 +120,7 @@ function callExport() {
var response = jqXHR.responseJSON;
var errorText = 'The export failed. Please check the log files to find out why.';
if (typeof response === 'object') {
- errorText =response.message;
+ errorText = response.message;
}
showError(errorText);
diff --git a/public/js/ff/firefly.js b/public/js/ff/firefly.js
index c852f35bf4..855ccff7d3 100644
--- a/public/js/ff/firefly.js
+++ b/public/js/ff/firefly.js
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see .
*/
-/** global: moment, dateRangeMeta,dateRangeConfig, accountingConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */
+/** global: moment, token, dateRangeMeta,dateRangeConfig, accountingConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */
$(function () {
diff --git a/public/js/ff/index.js b/public/js/ff/index.js
index 60b906cc0d..1d9ac6739d 100644
--- a/public/js/ff/index.js
+++ b/public/js/ff/index.js
@@ -18,7 +18,7 @@
* along with Firefly III. If not, see .
*/
-/** global: accountFrontpageUri, token, billCount, accountExpenseUri, accountRevenueUri */
+/** global: accountFrontpageUri, today, piggyInfoUri, token, billCount, accountExpenseUri, accountRevenueUri */
$(function () {
"use strict";
@@ -29,7 +29,12 @@ $(function () {
function drawChart() {
"use strict";
- lineChart(accountFrontpageUri, 'accounts-chart');
+ if (today >= 0) {
+ lineChartWithDay(accountFrontpageUri, 'accounts-chart', today);
+ } else {
+ lineChart(accountFrontpageUri, 'accounts-chart');
+ }
+
if (billCount > 0) {
pieChart('chart/bill/frontpage', 'bills-chart');
}
diff --git a/public/js/ff/intro/intro.js b/public/js/ff/intro/intro.js
index d4406076fa..65cd7cf005 100644
--- a/public/js/ff/intro/intro.js
+++ b/public/js/ff/intro/intro.js
@@ -18,7 +18,7 @@
* along with Firefly III. If not, see .
*/
-/** global: routeForTour, routeStepsUri, routeForFinishedTour, forceDemoOff */
+/** global: routeForTour, token, routeStepsUri, routeForFinishedTour, forceDemoOff */
$(function () {
"use strict";
@@ -42,5 +42,5 @@ function setupIntro(steps) {
}
function reportIntroFinished() {
- $.post(routeForFinishedTour, {_token:token});
+ $.post(routeForFinishedTour, {_token: token});
}
\ No newline at end of file
diff --git a/public/js/ff/rules/index.js b/public/js/ff/rules/index.js
index 3c975859ea..7e74c5edbc 100644
--- a/public/js/ff/rules/index.js
+++ b/public/js/ff/rules/index.js
@@ -58,7 +58,7 @@ function testRuleTriggers(e) {
var obj = $(e.target);
var ruleId = parseInt(obj.data('id'));
var icon = obj;
- if(obj.prop("tagName") === 'A') {
+ if (obj.prop("tagName") === 'A') {
icon = $('i', obj);
}
// change icon:
diff --git a/public/js/ff/tags/show.js b/public/js/ff/tags/show.js
index a8dffd046d..d51d3ef920 100644
--- a/public/js/ff/tags/show.js
+++ b/public/js/ff/tags/show.js
@@ -18,7 +18,7 @@
* along with Firefly III. If not, see .
*/
-/** global: zoomLevel, latitude, longitude, google, doPlaceMarker */
+/** global: zoomLevel, latitude, longitude, L, mapboxToken, doPlaceMarker */
/*
Some vars as prep for the map:
@@ -31,7 +31,14 @@ $(function () {
*/
// make map:
- var mymap = L.map('tag_location_map', {zoomControl: false, touchZoom: false, doubleClickZoom: false, scrollWheelZoom: false, boxZoom: false, dragging: false}).setView([latitude, longitude], zoomLevel);
+ var mymap = L.map('tag_location_map', {
+ zoomControl: false,
+ touchZoom: false,
+ doubleClickZoom: false,
+ scrollWheelZoom: false,
+ boxZoom: false,
+ dragging: false
+ }).setView([latitude, longitude], zoomLevel);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA , Imagery © Mapbox ',
@@ -40,7 +47,7 @@ $(function () {
accessToken: mapboxToken
}).addTo(mymap);
- if(doPlaceMarker) {
+ if (doPlaceMarker) {
var marker = L.marker([latitude, longitude]).addTo(mymap);
}
}
diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.js
index 58729480ef..8d6b67152c 100644
--- a/public/js/ff/transactions/list.js
+++ b/public/js/ff/transactions/list.js
@@ -20,6 +20,9 @@
/** global: edit_selected_txt, delete_selected_txt */
+/**
+ *
+ */
$(document).ready(function () {
"use strict";
$('.mass_edit_all').show();
@@ -44,8 +47,43 @@ $(document).ready(function () {
$('.mass_edit').click(goToMassEdit);
// click the delete button:
$('.mass_delete').click(goToMassDelete);
+ // click reconcile button
+ // $('.mass_reconcile').click(goToReconcile);
});
+/**
+ *
+ * @returns {boolean}
+ */
+function goToReconcile() {
+
+ var checked = $('.select_all_single:checked');
+ var ids = [];
+ $.each(checked, function (i, v) {
+ ids.push(parseInt($(v).data('transaction')));
+ });
+
+ // go to specially crafted URL:
+ var bases = document.getElementsByTagName('base');
+ var baseHref = null;
+
+ if (bases.length > 0) {
+ baseHref = bases[0].href;
+ }
+
+ $.post(baseHref + 'transactions/reconcile', {transactions: ids}).done(function () {
+ window.location.reload(true);
+ }).fail(function () {
+ alert('Could not reconcile transactions: please check the logs and try again later.');
+ });
+
+ return false;
+}
+
+/**
+ *
+ * @returns {boolean}
+ */
function goToMassEdit() {
"use strict";
var checkedArray = getCheckboxes();
@@ -62,6 +100,10 @@ function goToMassEdit() {
return false;
}
+/**
+ *
+ * @returns {boolean}
+ */
function goToMassDelete() {
"use strict";
var checkedArray = getCheckboxes();
@@ -77,6 +119,10 @@ function goToMassDelete() {
return false;
}
+/**
+ *
+ * @returns {Array}
+ */
function getCheckboxes() {
"use strict";
var list = [];
@@ -90,13 +136,19 @@ function getCheckboxes() {
return list;
}
-
+/**
+ *
+ */
function countChecked() {
"use strict";
var checked = $('.select_all_single:checked').length;
if (checked > 0) {
$('.mass_edit span').text(edit_selected_txt + ' (' + checked + ')');
$('.mass_delete span').text(delete_selected_txt + ' (' + checked + ')');
+
+ // get amount for the transactions:
+ //getAmounts();
+
$('.mass_button_options').show();
} else {
@@ -104,17 +156,26 @@ function countChecked() {
}
}
-
+/**
+ *
+ */
function checkAll() {
"use strict";
$('.select_all_single').prop('checked', true);
}
+/**
+ *
+ */
function uncheckAll() {
"use strict";
$('.select_all_single').prop('checked', false);
}
+/**
+ *
+ * @returns {boolean}
+ */
function stopMassSelect() {
"use strict";
@@ -142,9 +203,16 @@ function stopMassSelect() {
// hide the stop button
$('.mass_stop_select').hide();
+ // show reconcile account button, if present
+ $('.mass_reconcile').show();
+
return false;
}
+/**
+ *
+ * @returns {boolean}
+ */
function startMassSelect() {
"use strict";
// show "select all" box in table header.
@@ -165,5 +233,8 @@ function startMassSelect() {
// show the stop button
$('.mass_stop_select').show();
+ // hide reconcile account button, if present
+ $('.mass_reconcile').hide();
+
return false;
}
\ No newline at end of file
diff --git a/public/js/ff/transactions/show.js b/public/js/ff/transactions/show.js
index f3dfc8cb31..093703bcdb 100644
--- a/public/js/ff/transactions/show.js
+++ b/public/js/ff/transactions/show.js
@@ -30,7 +30,7 @@ $(function () {
source: data,
autoSelect: true
});
- $input.change(function() {
+ $input.change(function () {
var current = $input.typeahead("getActive");
if (current) {
// Some item from your model is active!
diff --git a/public/js/ff/transactions/single/common.js b/public/js/ff/transactions/single/common.js
index 61599512ad..eed4fbea7c 100644
--- a/public/js/ff/transactions/single/common.js
+++ b/public/js/ff/transactions/single/common.js
@@ -107,6 +107,10 @@ function selectsForeignCurrency() {
if (foreignCurrencyId === nativeCurrencyId) {
$('#exchange_rate_instruction_holder').hide();
$('#native_amount_holder').hide();
+
+ // make all other inputs empty
+ $('input[name="destination_amount"]').val("");
+ $('input[name="native_amount"]').val("");
}
return false;
diff --git a/public/lib/adminlte/css/AdminLTE.css b/public/lib/adminlte/css/AdminLTE.css
index c8158d0d10..1b9c78398d 100755
--- a/public/lib/adminlte/css/AdminLTE.css
+++ b/public/lib/adminlte/css/AdminLTE.css
@@ -1,178 +1,181 @@
-@import url('../../../css/google-fonts.css');
+/*
+ * AdminLTE.css
+ * Copyright (c) 2017 thegrumpydictator@gmail.com
+ *
+ * This file is part of Firefly III.
+ *
+ * Firefly III is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Firefly III is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Firefly III. If not, see .
+ */
/*!
- * AdminLTE v2.3.7
+ * AdminLTE v2.4.0
* Author: Almsaeed Studio
- * Website: Almsaeed Studio
+ * Website: Almsaeed Studio
* License: Open source - MIT
* Please visit http://opensource.org/licenses/MIT for more information
-!*/
+ */
/*
* Core: General Layout Style
* -------------------------
*/
+
+@import url('../../../css/google-fonts.css');
+
html,
body {
- min-height: 100%;
+ height: 100%;
}
-
.layout-boxed html,
.layout-boxed body {
- height: 100%;
+ height: 100%;
}
-
body {
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
- font-weight: 400;
- overflow-x: hidden;
- overflow-y: auto;
+ font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ font-weight: 400;
+ overflow-x: hidden;
+ overflow-y: auto;
}
-
/* Layout */
.wrapper {
- min-height: 100%;
- position: relative;
- overflow: hidden;
+ height: 100%;
+ position: relative;
+ overflow-x: hidden;
+ overflow-y: auto;
}
-
.wrapper:before,
.wrapper:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.wrapper:after {
- clear: both;
+ clear: both;
+}
+.wrapper:before,
+.wrapper:after {
+ content: " ";
+ display: table;
+}
+.wrapper:after {
+ clear: both;
}
-
.layout-boxed .wrapper {
- max-width: 1250px;
- margin: 0 auto;
- min-height: 100%;
- box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
- position: relative;
+ max-width: 1250px;
+ margin: 0 auto;
+ min-height: 100%;
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
+ position: relative;
}
-
.layout-boxed {
- background: url('../img/boxed-bg.jpg') repeat fixed;
+ background: url('../img/boxed-bg.jpg') repeat fixed;
}
-
/*
* Content Wrapper - contains the main content
- * ```.right-side has been deprecated as of v2.0.0 in favor of .content-wrapper ```
*/
.content-wrapper,
-.right-side,
.main-footer {
- -webkit-transition: -webkit-transform 0.3s ease-in-out, margin 0.3s ease-in-out;
- -moz-transition: -moz-transform 0.3s ease-in-out, margin 0.3s ease-in-out;
- -o-transition: -o-transform 0.3s ease-in-out, margin 0.3s ease-in-out;
- transition: transform 0.3s ease-in-out, margin 0.3s ease-in-out;
- margin-left: 230px;
- z-index: 820;
+ -webkit-transition: -webkit-transform 0.3s ease-in-out, margin 0.3s ease-in-out;
+ -moz-transition: -moz-transform 0.3s ease-in-out, margin 0.3s ease-in-out;
+ -o-transition: -o-transform 0.3s ease-in-out, margin 0.3s ease-in-out;
+ transition: transform 0.3s ease-in-out, margin 0.3s ease-in-out;
+ margin-left: 230px;
+ z-index: 820;
}
-
.layout-top-nav .content-wrapper,
-.layout-top-nav .right-side,
.layout-top-nav .main-footer {
+ margin-left: 0;
+}
+@media (max-width: 767px) {
+ .content-wrapper,
+ .main-footer {
margin-left: 0;
+ }
}
-
-@media (max-width: 767px) {
- .content-wrapper,
- .right-side,
- .main-footer {
- margin-left: 0;
- }
-}
-
@media (min-width: 768px) {
- .sidebar-collapse .content-wrapper,
- .sidebar-collapse .right-side,
- .sidebar-collapse .main-footer {
- margin-left: 0;
- }
+ .sidebar-collapse .content-wrapper,
+ .sidebar-collapse .main-footer {
+ margin-left: 0;
+ }
}
-
@media (max-width: 767px) {
- .sidebar-open .content-wrapper,
- .sidebar-open .right-side,
- .sidebar-open .main-footer {
- -webkit-transform: translate(230px, 0);
- -ms-transform: translate(230px, 0);
- -o-transform: translate(230px, 0);
- transform: translate(230px, 0);
- }
+ .sidebar-open .content-wrapper,
+ .sidebar-open .main-footer {
+ -webkit-transform: translate(230px, 0);
+ -ms-transform: translate(230px, 0);
+ -o-transform: translate(230px, 0);
+ transform: translate(230px, 0);
+ }
}
-
-.content-wrapper,
-.right-side {
- min-height: 100%;
- background-color: #ecf0f5;
- z-index: 800;
+.content-wrapper {
+ min-height: 100%;
+ background-color: #ecf0f5;
+ z-index: 800;
}
-
.main-footer {
- background: #fff;
- padding: 15px;
- color: #444;
- border-top: 1px solid #d2d6de;
+ background: #fff;
+ padding: 15px;
+ color: #444;
+ border-top: 1px solid #d2d6de;
}
-
/* Fixed layout */
.fixed .main-header,
.fixed .main-sidebar,
.fixed .left-side {
- position: fixed;
+ position: fixed;
}
-
.fixed .main-header {
- top: 0;
- right: 0;
- left: 0;
+ top: 0;
+ right: 0;
+ left: 0;
}
-
.fixed .content-wrapper,
.fixed .right-side {
- padding-top: 50px;
+ padding-top: 50px;
}
-
@media (max-width: 767px) {
- .fixed .content-wrapper,
- .fixed .right-side {
- padding-top: 100px;
- }
+ .fixed .content-wrapper,
+ .fixed .right-side {
+ padding-top: 100px;
+ }
}
-
.fixed.layout-boxed .wrapper {
- max-width: 100%;
+ max-width: 100%;
}
-
-body.hold-transition .content-wrapper,
-body.hold-transition .right-side,
-body.hold-transition .main-footer,
-body.hold-transition .main-sidebar,
-body.hold-transition .left-side,
-body.hold-transition .main-header .navbar,
-body.hold-transition .main-header .logo {
- /* Fix for IE */
- -webkit-transition: none;
- -o-transition: none;
- transition: none;
+.fixed .wrapper {
+ overflow: hidden;
+}
+.hold-transition .content-wrapper,
+.hold-transition .right-side,
+.hold-transition .main-footer,
+.hold-transition .main-sidebar,
+.hold-transition .left-side,
+.hold-transition .main-header .navbar,
+.hold-transition .main-header .logo,
+.hold-transition .menu-open .fa-angle-left {
+ /* Fix for IE */
+ -webkit-transition: none;
+ -o-transition: none;
+ transition: none;
}
-
/* Content */
.content {
- min-height: 250px;
- padding: 15px;
- margin-right: auto;
- margin-left: auto;
- padding-left: 15px;
- padding-right: 15px;
+ min-height: 250px;
+ padding: 15px;
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: 15px;
+ padding-right: 15px;
}
-
/* H1 - H6 font */
h1,
h2,
@@ -186,2710 +189,2373 @@ h6,
.h4,
.h5,
.h6 {
- font-family: 'Source Sans Pro', sans-serif;
+ font-family: 'Source Sans Pro', sans-serif;
}
-
/* General Links */
a {
- color: #3c8dbc;
+ color: #337ab7;
}
-
a:hover,
a:active,
a:focus {
- outline: none;
- text-decoration: none;
- color: #72afd2;
+ outline: none;
+ text-decoration: none;
+ color: #23527c;
}
-
/* Page Header */
.page-header {
- margin: 10px 0 20px 0;
- font-size: 22px;
+ margin: 10px 0 20px 0;
+ font-size: 22px;
}
-
.page-header > small {
- color: #666;
- display: block;
- margin-top: 5px;
+ color: #666;
+ display: block;
+ margin-top: 5px;
}
-
/*
* Component: Main Header
* ----------------------
*/
.main-header {
- position: relative;
- max-height: 100px;
- z-index: 1030;
+ position: relative;
+ max-height: 100px;
+ z-index: 1030;
}
-
.main-header .navbar {
- -webkit-transition: margin-left 0.3s ease-in-out;
- -o-transition: margin-left 0.3s ease-in-out;
- transition: margin-left 0.3s ease-in-out;
- margin-bottom: 0;
- margin-left: 230px;
- border: none;
- min-height: 50px;
- border-radius: 0;
+ -webkit-transition: margin-left 0.3s ease-in-out;
+ -o-transition: margin-left 0.3s ease-in-out;
+ transition: margin-left 0.3s ease-in-out;
+ margin-bottom: 0;
+ margin-left: 230px;
+ border: none;
+ min-height: 50px;
+ border-radius: 0;
}
-
.layout-top-nav .main-header .navbar {
- margin-left: 0;
+ margin-left: 0;
}
-
.main-header #navbar-search-input.form-control {
- background: rgba(255, 255, 255, 0.2);
- border-color: transparent;
+ background: rgba(255, 255, 255, 0.2);
+ border-color: transparent;
}
-
.main-header #navbar-search-input.form-control:focus,
.main-header #navbar-search-input.form-control:active {
- border-color: rgba(0, 0, 0, 0.1);
- background: rgba(255, 255, 255, 0.9);
+ border-color: rgba(0, 0, 0, 0.1);
+ background: rgba(255, 255, 255, 0.9);
}
-
.main-header #navbar-search-input.form-control::-moz-placeholder {
- color: #ccc;
- opacity: 1;
+ color: #ccc;
+ opacity: 1;
}
-
.main-header #navbar-search-input.form-control:-ms-input-placeholder {
- color: #ccc;
+ color: #ccc;
}
-
.main-header #navbar-search-input.form-control::-webkit-input-placeholder {
- color: #ccc;
+ color: #ccc;
}
-
.main-header .navbar-custom-menu,
.main-header .navbar-right {
- float: right;
+ float: right;
}
-
@media (max-width: 991px) {
- .main-header .navbar-custom-menu a,
- .main-header .navbar-right a {
- color: inherit;
- background: transparent;
- }
+ .main-header .navbar-custom-menu a,
+ .main-header .navbar-right a {
+ color: inherit;
+ background: transparent;
+ }
}
-
@media (max-width: 767px) {
- .main-header .navbar-right {
- float: none;
- }
-
- .navbar-collapse .main-header .navbar-right {
- margin: 7.5px -15px;
- }
-
- .main-header .navbar-right > li {
- color: inherit;
- border: 0;
- }
+ .main-header .navbar-right {
+ float: none;
+ }
+ .navbar-collapse .main-header .navbar-right {
+ margin: 7.5px -15px;
+ }
+ .main-header .navbar-right > li {
+ color: inherit;
+ border: 0;
+ }
}
-
.main-header .sidebar-toggle {
- float: left;
- background-color: transparent;
- background-image: none;
- padding: 15px 15px;
- font-family: fontAwesome;
+ float: left;
+ background-color: transparent;
+ background-image: none;
+ padding: 15px 15px;
+ font-family: fontAwesome;
}
-
.main-header .sidebar-toggle:before {
- content: "\f0c9";
+ content: "\f0c9";
}
-
.main-header .sidebar-toggle:hover {
- color: #fff;
+ color: #fff;
}
-
.main-header .sidebar-toggle:focus,
.main-header .sidebar-toggle:active {
- background: transparent;
+ background: transparent;
}
-
.main-header .sidebar-toggle .icon-bar {
- display: none;
+ display: none;
}
-
.main-header .navbar .nav > li.user > a > .fa,
.main-header .navbar .nav > li.user > a > .glyphicon,
.main-header .navbar .nav > li.user > a > .ion {
- margin-right: 5px;
+ margin-right: 5px;
}
-
.main-header .navbar .nav > li > a > .label {
- position: absolute;
- top: 9px;
- right: 7px;
- text-align: center;
- font-size: 9px;
- padding: 2px 3px;
- line-height: .9;
+ position: absolute;
+ top: 9px;
+ right: 7px;
+ text-align: center;
+ font-size: 9px;
+ padding: 2px 3px;
+ line-height: .9;
}
-
.main-header .logo {
- -webkit-transition: width 0.3s ease-in-out;
- -o-transition: width 0.3s ease-in-out;
- transition: width 0.3s ease-in-out;
- display: block;
- float: left;
- height: 50px;
- font-size: 20px;
- line-height: 50px;
- text-align: center;
- width: 230px;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- padding: 0 15px;
- font-weight: 300;
- overflow: hidden;
+ -webkit-transition: width 0.3s ease-in-out;
+ -o-transition: width 0.3s ease-in-out;
+ transition: width 0.3s ease-in-out;
+ display: block;
+ float: left;
+ height: 50px;
+ font-size: 20px;
+ line-height: 50px;
+ text-align: center;
+ width: 230px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ padding: 0 15px;
+ font-weight: 300;
+ overflow: hidden;
}
-
.main-header .logo .logo-lg {
- display: block;
+ display: block;
}
-
.main-header .logo .logo-mini {
- display: none;
+ display: none;
}
-
.main-header .navbar-brand {
- color: #fff;
+ color: #fff;
}
-
.content-header {
- position: relative;
- padding: 15px 15px 0 15px;
+ position: relative;
+ padding: 15px 15px 0 15px;
}
-
.content-header > h1 {
- margin: 0;
- font-size: 24px;
+ margin: 0;
+ font-size: 24px;
}
-
.content-header > h1 > small {
- font-size: 15px;
- display: inline-block;
- padding-left: 4px;
- font-weight: 300;
+ font-size: 15px;
+ display: inline-block;
+ padding-left: 4px;
+ font-weight: 300;
}
-
.content-header > .breadcrumb {
- float: right;
- background: transparent;
- margin-top: 0;
- margin-bottom: 0;
- font-size: 12px;
- padding: 7px 5px;
- position: absolute;
- top: 15px;
- right: 10px;
- border-radius: 2px;
+ float: right;
+ background: transparent;
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: 12px;
+ padding: 7px 5px;
+ position: absolute;
+ top: 15px;
+ right: 10px;
+ border-radius: 2px;
}
-
.content-header > .breadcrumb > li > a {
- color: #444;
- text-decoration: none;
- display: inline-block;
+ color: #444;
+ text-decoration: none;
+ display: inline-block;
}
-
.content-header > .breadcrumb > li > a > .fa,
.content-header > .breadcrumb > li > a > .glyphicon,
.content-header > .breadcrumb > li > a > .ion {
- margin-right: 5px;
+ margin-right: 5px;
}
-
.content-header > .breadcrumb > li + li:before {
- content: '>\00a0';
+ content: '>\00a0';
}
-
@media (max-width: 991px) {
- .content-header > .breadcrumb {
- position: relative;
- margin-top: 5px;
- top: 0;
- right: 0;
- float: none;
- background: #d2d6de;
- padding-left: 10px;
- }
-
- .content-header > .breadcrumb li:before {
- color: #97a0b3;
- }
+ .content-header > .breadcrumb {
+ position: relative;
+ margin-top: 5px;
+ top: 0;
+ right: 0;
+ float: none;
+ background: #d2d6de;
+ padding-left: 10px;
+ }
+ .content-header > .breadcrumb li:before {
+ color: #97a0b3;
+ }
}
-
.navbar-toggle {
- color: #fff;
- border: 0;
+ color: #fff;
+ border: 0;
+ margin: 0;
+ padding: 15px 15px;
+}
+@media (max-width: 991px) {
+ .navbar-custom-menu .navbar-nav > li {
+ float: left;
+ }
+ .navbar-custom-menu .navbar-nav {
margin: 0;
- padding: 15px 15px;
+ float: left;
+ }
+ .navbar-custom-menu .navbar-nav > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ line-height: 20px;
+ }
}
-
-@media (max-width: 991px) {
- .navbar-custom-menu .navbar-nav > li {
- float: left;
- }
-
- .navbar-custom-menu .navbar-nav {
- margin: 0;
- float: left;
- }
-
- .navbar-custom-menu .navbar-nav > li > a {
- padding-top: 15px;
- padding-bottom: 15px;
- line-height: 20px;
- }
-}
-
@media (max-width: 767px) {
- .main-header {
- position: relative;
- }
-
- .main-header .logo,
- .main-header .navbar {
- width: 100%;
- float: none;
- }
-
- .main-header .navbar {
- margin: 0;
- }
-
- .main-header .navbar-custom-menu {
- float: right;
- }
+ .main-header {
+ position: relative;
+ }
+ .main-header .logo,
+ .main-header .navbar {
+ width: 100%;
+ float: none;
+ }
+ .main-header .navbar {
+ margin: 0;
+ }
+ .main-header .navbar-custom-menu {
+ float: right;
+ }
}
-
@media (max-width: 991px) {
- .navbar-collapse.pull-left {
- float: none !important;
- }
-
- .navbar-collapse.pull-left + .navbar-custom-menu {
- display: block;
- position: absolute;
- top: 0;
- right: 40px;
- }
+ .navbar-collapse.pull-left {
+ float: none !important;
+ }
+ .navbar-collapse.pull-left + .navbar-custom-menu {
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 40px;
+ }
}
-
/*
* Component: Sidebar
* ------------------
*/
-.main-sidebar,
-.left-side {
- position: absolute;
- top: 0;
- left: 0;
- padding-top: 50px;
- min-height: 100%;
- width: 230px;
- z-index: 810;
- -webkit-transition: -webkit-transform 0.3s ease-in-out, width 0.3s ease-in-out;
- -moz-transition: -moz-transform 0.3s ease-in-out, width 0.3s ease-in-out;
- -o-transition: -o-transform 0.3s ease-in-out, width 0.3s ease-in-out;
- transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
+.main-sidebar {
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding-top: 50px;
+ min-height: 100%;
+ width: 230px;
+ z-index: 810;
+ -webkit-transition: -webkit-transform 0.3s ease-in-out, width 0.3s ease-in-out;
+ -moz-transition: -moz-transform 0.3s ease-in-out, width 0.3s ease-in-out;
+ -o-transition: -o-transform 0.3s ease-in-out, width 0.3s ease-in-out;
+ transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
}
-
@media (max-width: 767px) {
- .main-sidebar,
- .left-side {
- padding-top: 100px;
- }
+ .main-sidebar {
+ padding-top: 100px;
+ }
}
-
@media (max-width: 767px) {
- .main-sidebar,
- .left-side {
- -webkit-transform: translate(-230px, 0);
- -ms-transform: translate(-230px, 0);
- -o-transform: translate(-230px, 0);
- transform: translate(-230px, 0);
- }
+ .main-sidebar {
+ -webkit-transform: translate(-230px, 0);
+ -ms-transform: translate(-230px, 0);
+ -o-transform: translate(-230px, 0);
+ transform: translate(-230px, 0);
+ }
}
-
@media (min-width: 768px) {
- .sidebar-collapse .main-sidebar,
- .sidebar-collapse .left-side {
- -webkit-transform: translate(-230px, 0);
- -ms-transform: translate(-230px, 0);
- -o-transform: translate(-230px, 0);
- transform: translate(-230px, 0);
- }
+ .sidebar-collapse .main-sidebar {
+ -webkit-transform: translate(-230px, 0);
+ -ms-transform: translate(-230px, 0);
+ -o-transform: translate(-230px, 0);
+ transform: translate(-230px, 0);
+ }
}
-
@media (max-width: 767px) {
- .sidebar-open .main-sidebar,
- .sidebar-open .left-side {
- -webkit-transform: translate(0, 0);
- -ms-transform: translate(0, 0);
- -o-transform: translate(0, 0);
- transform: translate(0, 0);
- }
+ .sidebar-open .main-sidebar {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ -o-transform: translate(0, 0);
+ transform: translate(0, 0);
+ }
}
-
.sidebar {
- padding-bottom: 10px;
+ padding-bottom: 10px;
}
-
.sidebar-form input:focus {
- border-color: transparent;
+ border-color: transparent;
}
-
.user-panel {
- position: relative;
- width: 100%;
- padding: 10px;
- overflow: hidden;
+ position: relative;
+ width: 100%;
+ padding: 10px;
+ overflow: hidden;
}
-
.user-panel:before,
.user-panel:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.user-panel:after {
- clear: both;
+ clear: both;
+}
+.user-panel:before,
+.user-panel:after {
+ content: " ";
+ display: table;
+}
+.user-panel:after {
+ clear: both;
}
-
.user-panel > .image > img {
- width: 100%;
- max-width: 45px;
- height: auto;
+ width: 100%;
+ max-width: 45px;
+ height: auto;
}
-
.user-panel > .info {
- padding: 5px 5px 5px 15px;
- line-height: 1;
- position: absolute;
- left: 55px;
+ padding: 5px 5px 5px 15px;
+ line-height: 1;
+ position: absolute;
+ left: 55px;
}
-
.user-panel > .info > p {
- font-weight: 600;
- margin-bottom: 9px;
+ font-weight: 600;
+ margin-bottom: 9px;
}
-
.user-panel > .info > a {
- text-decoration: none;
- padding-right: 5px;
- margin-top: 3px;
- font-size: 11px;
+ text-decoration: none;
+ padding-right: 5px;
+ margin-top: 3px;
+ font-size: 11px;
}
-
.user-panel > .info > a > .fa,
.user-panel > .info > a > .ion,
.user-panel > .info > a > .glyphicon {
- margin-right: 3px;
+ margin-right: 3px;
}
-
.sidebar-menu {
- list-style: none;
- margin: 0;
- padding: 0;
+ list-style: none;
+ margin: 0;
+ padding: 0;
}
-
.sidebar-menu > li {
- position: relative;
- margin: 0;
- padding: 0;
+ position: relative;
+ margin: 0;
+ padding: 0;
}
-
.sidebar-menu > li > a {
- padding: 12px 5px 12px 15px;
- display: block;
+ padding: 12px 5px 12px 15px;
+ display: block;
}
-
.sidebar-menu > li > a > .fa,
.sidebar-menu > li > a > .glyphicon,
.sidebar-menu > li > a > .ion {
- width: 20px;
+ width: 20px;
}
-
.sidebar-menu > li .label,
.sidebar-menu > li .badge {
- margin-right: 5px;
+ margin-right: 5px;
}
-
.sidebar-menu > li .badge {
- margin-top: 3px;
+ margin-top: 3px;
}
-
.sidebar-menu li.header {
- padding: 10px 25px 10px 15px;
- font-size: 12px;
+ padding: 10px 25px 10px 15px;
+ font-size: 12px;
}
-
.sidebar-menu li > a > .fa-angle-left,
.sidebar-menu li > a > .pull-right-container > .fa-angle-left {
- width: auto;
- height: auto;
- padding: 0;
- margin-right: 10px;
+ width: auto;
+ height: auto;
+ padding: 0;
+ margin-right: 10px;
+ -webkit-transition: transform 0.5s ease;
+ -o-transition: transform 0.5s ease;
+ transition: transform 0.5s ease;
}
-
-.sidebar-menu li.active > a > .fa-angle-left,
-.sidebar-menu li.active > a > .pull-right-container > .fa-angle-left {
- -webkit-transform: rotate(-90deg);
- -ms-transform: rotate(-90deg);
- -o-transform: rotate(-90deg);
- transform: rotate(-90deg);
+.sidebar-menu li > a > .fa-angle-left {
+ position: absolute;
+ top: 50%;
+ right: 10px;
+ margin-top: -8px;
}
-
-.sidebar-menu li.active > .treeview-menu {
- display: block;
+.sidebar-menu .menu-open > a > .fa-angle-left,
+.sidebar-menu .menu-open > a > .pull-right-container > .fa-angle-left {
+ -webkit-transform: rotate(-90deg);
+ -ms-transform: rotate(-90deg);
+ -o-transform: rotate(-90deg);
+ transform: rotate(-90deg);
}
-
-.sidebar-menu .treeview-menu {
- display: none;
- list-style: none;
- padding: 0;
- margin: 0;
- padding-left: 5px;
+.sidebar-menu .active > .treeview-menu {
+ display: block;
}
-
-.sidebar-menu .treeview-menu .treeview-menu {
- padding-left: 20px;
-}
-
-.sidebar-menu .treeview-menu > li {
- margin: 0;
-}
-
-.sidebar-menu .treeview-menu > li > a {
- padding: 5px 5px 5px 15px;
- display: block;
- font-size: 14px;
-}
-
-.sidebar-menu .treeview-menu > li > a > .fa,
-.sidebar-menu .treeview-menu > li > a > .glyphicon,
-.sidebar-menu .treeview-menu > li > a > .ion {
- width: 20px;
-}
-
-.sidebar-menu .treeview-menu > li > a > .pull-right-container > .fa-angle-left,
-.sidebar-menu .treeview-menu > li > a > .pull-right-container > .fa-angle-down,
-.sidebar-menu .treeview-menu > li > a > .fa-angle-left,
-.sidebar-menu .treeview-menu > li > a > .fa-angle-down {
- width: auto;
-}
-
/*
* Component: Sidebar Mini
*/
@media (min-width: 768px) {
- .sidebar-mini.sidebar-collapse .content-wrapper,
- .sidebar-mini.sidebar-collapse .right-side,
- .sidebar-mini.sidebar-collapse .main-footer {
- margin-left: 50px !important;
- z-index: 840;
- }
-
- .sidebar-mini.sidebar-collapse .main-sidebar {
- -webkit-transform: translate(0, 0);
- -ms-transform: translate(0, 0);
- -o-transform: translate(0, 0);
- transform: translate(0, 0);
- width: 50px !important;
- z-index: 850;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li {
- position: relative;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li > a {
- margin-right: 0;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span {
- border-top-right-radius: 4px;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li:not(.treeview) > a > span {
- border-bottom-right-radius: 4px;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {
- padding-top: 5px;
- padding-bottom: 5px;
- border-bottom-right-radius: 4px;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
- .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
- display: block !important;
- position: absolute;
- width: 180px;
- left: 50px;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span {
- top: 0;
- margin-left: -3px;
- padding: 12px 5px 12px 20px;
- background-color: inherit;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > .pull-right-container {
- float: right;
- width: auto !important;
- left: 200px !important;
- top: 10px !important;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > .pull-right-container > .label:not(:first-of-type) {
- display: none;
- }
-
- .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
- top: 44px;
- margin-left: 0;
- }
-
- .sidebar-mini.sidebar-collapse .main-sidebar .user-panel > .info,
- .sidebar-mini.sidebar-collapse .sidebar-form,
- .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span,
- .sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu,
- .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > .pull-right,
- .sidebar-mini.sidebar-collapse .sidebar-menu li.header {
- display: none !important;
- -webkit-transform: translateZ(0);
- }
-
- .sidebar-mini.sidebar-collapse .main-header .logo {
- width: 50px;
- }
-
- .sidebar-mini.sidebar-collapse .main-header .logo > .logo-mini {
- display: block;
- margin-left: -15px;
- margin-right: -15px;
- font-size: 18px;
- }
-
- .sidebar-mini.sidebar-collapse .main-header .logo > .logo-lg {
- display: none;
- }
-
- .sidebar-mini.sidebar-collapse .main-header .navbar {
- margin-left: 50px;
- }
+ .sidebar-mini.sidebar-collapse .content-wrapper,
+ .sidebar-mini.sidebar-collapse .right-side,
+ .sidebar-mini.sidebar-collapse .main-footer {
+ margin-left: 50px !important;
+ z-index: 840;
+ }
+ .sidebar-mini.sidebar-collapse .main-sidebar {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ -o-transform: translate(0, 0);
+ transform: translate(0, 0);
+ width: 50px !important;
+ z-index: 850;
+ }
+ .sidebar-mini.sidebar-collapse .sidebar-menu > li {
+ position: relative;
+ }
+ .sidebar-mini.sidebar-collapse .sidebar-menu > li > a {
+ margin-right: 0;
+ }
+ .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span {
+ border-top-right-radius: 4px;
+ }
+ .sidebar-mini.sidebar-collapse .sidebar-menu > li:not(.treeview) > a > span {
+ border-bottom-right-radius: 4px;
+ }
+ .sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {
+ padding-top: 5px;
+ padding-bottom: 5px;
+ border-bottom-right-radius: 4px;
+ }
+ .sidebar-mini.sidebar-collapse .main-sidebar .user-panel > .info,
+ .sidebar-mini.sidebar-collapse .sidebar-form,
+ .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span,
+ .sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu,
+ .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > .pull-right,
+ .sidebar-mini.sidebar-collapse .sidebar-menu li.header {
+ display: none !important;
+ -webkit-transform: translateZ(0);
+ }
+ .sidebar-mini.sidebar-collapse .main-header .logo {
+ width: 50px;
+ }
+ .sidebar-mini.sidebar-collapse .main-header .logo > .logo-mini {
+ display: block;
+ margin-left: -15px;
+ margin-right: -15px;
+ font-size: 18px;
+ }
+ .sidebar-mini.sidebar-collapse .main-header .logo > .logo-lg {
+ display: none;
+ }
+ .sidebar-mini.sidebar-collapse .main-header .navbar {
+ margin-left: 50px;
+ }
+}
+.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
+.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
+ display: block !important;
+ position: absolute;
+ width: 180px;
+ left: 50px;
+}
+.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > a > span {
+ top: 0;
+ margin-left: -3px;
+ padding: 12px 5px 12px 20px;
+ background-color: inherit;
+}
+.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > a > .pull-right-container {
+ position: relative !important;
+ float: right;
+ width: auto !important;
+ left: 180px !important;
+ top: -22px !important;
+ z-index: 900;
+}
+.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > a > .pull-right-container > .label:not(:first-of-type) {
+ display: none;
+}
+.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
+ top: 44px;
+ margin-left: 0;
+}
+.sidebar-expanded-on-hover .main-footer,
+.sidebar-expanded-on-hover .content-wrapper {
+ margin-left: 50px;
+}
+.sidebar-expanded-on-hover .main-sidebar {
+ box-shadow: 3px 0 8px rgba(0, 0, 0, 0.125);
}
-
.sidebar-menu,
.main-sidebar .user-panel,
.sidebar-menu > li.header {
- white-space: nowrap;
- overflow: hidden;
+ white-space: nowrap;
+ overflow: hidden;
}
-
.sidebar-menu:hover {
- overflow: visible;
+ overflow: visible;
}
-
.sidebar-form,
.sidebar-menu > li.header {
- overflow: hidden;
- text-overflow: clip;
+ overflow: hidden;
+ text-overflow: clip;
}
-
.sidebar-menu li > a {
- position: relative;
+ position: relative;
}
-
.sidebar-menu li > a > .pull-right-container {
- position: absolute;
- right: 10px;
- top: 50%;
- margin-top: -7px;
+ position: absolute;
+ right: 10px;
+ top: 50%;
+ margin-top: -7px;
}
-
/*
* Component: Control sidebar. By default, this is the right sidebar.
*/
.control-sidebar-bg {
- position: fixed;
- z-index: 1000;
- bottom: 0;
+ position: fixed;
+ z-index: 1000;
+ bottom: 0;
}
-
.control-sidebar-bg,
.control-sidebar {
- top: 0;
- right: -230px;
- width: 230px;
- -webkit-transition: right 0.3s ease-in-out;
- -o-transition: right 0.3s ease-in-out;
- transition: right 0.3s ease-in-out;
+ top: 0;
+ right: -230px;
+ width: 230px;
+ -webkit-transition: right 0.3s ease-in-out;
+ -o-transition: right 0.3s ease-in-out;
+ transition: right 0.3s ease-in-out;
}
-
.control-sidebar {
- position: absolute;
- padding-top: 50px;
- z-index: 1010;
+ position: absolute;
+ padding-top: 50px;
+ z-index: 1010;
}
-
@media (max-width: 768px) {
- .control-sidebar {
- padding-top: 100px;
- }
+ .control-sidebar {
+ padding-top: 100px;
+ }
}
-
.control-sidebar > .tab-content {
- padding: 10px 15px;
+ padding: 10px 15px;
}
-
.control-sidebar.control-sidebar-open,
.control-sidebar.control-sidebar-open + .control-sidebar-bg {
- right: 0;
+ right: 0;
}
-
.control-sidebar-open .control-sidebar-bg,
.control-sidebar-open .control-sidebar {
- right: 0;
+ right: 0;
}
-
@media (min-width: 768px) {
- .control-sidebar-open .content-wrapper,
- .control-sidebar-open .right-side,
- .control-sidebar-open .main-footer {
- margin-right: 230px;
- }
+ .control-sidebar-open .content-wrapper,
+ .control-sidebar-open .right-side,
+ .control-sidebar-open .main-footer {
+ margin-right: 230px;
+ }
+}
+.fixed .control-sidebar {
+ position: fixed;
+ height: 100%;
+ overflow-y: auto;
+ padding-bottom: 50px;
}
-
.nav-tabs.control-sidebar-tabs > li:first-of-type > a,
.nav-tabs.control-sidebar-tabs > li:first-of-type > a:hover,
.nav-tabs.control-sidebar-tabs > li:first-of-type > a:focus {
- border-left-width: 0;
+ border-left-width: 0;
}
-
.nav-tabs.control-sidebar-tabs > li > a {
- border-radius: 0;
+ border-radius: 0;
}
-
.nav-tabs.control-sidebar-tabs > li > a,
.nav-tabs.control-sidebar-tabs > li > a:hover {
- border-top: none;
- border-right: none;
- border-left: 1px solid transparent;
- border-bottom: 1px solid transparent;
+ border-top: none;
+ border-right: none;
+ border-left: 1px solid transparent;
+ border-bottom: 1px solid transparent;
}
-
.nav-tabs.control-sidebar-tabs > li > a .icon {
- font-size: 16px;
+ font-size: 16px;
}
-
.nav-tabs.control-sidebar-tabs > li.active > a,
.nav-tabs.control-sidebar-tabs > li.active > a:hover,
.nav-tabs.control-sidebar-tabs > li.active > a:focus,
.nav-tabs.control-sidebar-tabs > li.active > a:active {
- border-top: none;
- border-right: none;
- border-bottom: none;
+ border-top: none;
+ border-right: none;
+ border-bottom: none;
}
-
@media (max-width: 768px) {
- .nav-tabs.control-sidebar-tabs {
- display: table;
- }
-
- .nav-tabs.control-sidebar-tabs > li {
- display: table-cell;
- }
+ .nav-tabs.control-sidebar-tabs {
+ display: table;
+ }
+ .nav-tabs.control-sidebar-tabs > li {
+ display: table-cell;
+ }
}
-
.control-sidebar-heading {
- font-weight: 400;
- font-size: 16px;
- padding: 10px 0;
- margin-bottom: 10px;
+ font-weight: 400;
+ font-size: 16px;
+ padding: 10px 0;
+ margin-bottom: 10px;
}
-
.control-sidebar-subheading {
- display: block;
- font-weight: 400;
- font-size: 14px;
+ display: block;
+ font-weight: 400;
+ font-size: 14px;
}
-
.control-sidebar-menu {
- list-style: none;
- padding: 0;
- margin: 0 -15px;
+ list-style: none;
+ padding: 0;
+ margin: 0 -15px;
}
-
.control-sidebar-menu > li > a {
- display: block;
- padding: 10px 15px;
+ display: block;
+ padding: 10px 15px;
}
-
.control-sidebar-menu > li > a:before,
.control-sidebar-menu > li > a:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.control-sidebar-menu > li > a:after {
- clear: both;
+ clear: both;
+}
+.control-sidebar-menu > li > a:before,
+.control-sidebar-menu > li > a:after {
+ content: " ";
+ display: table;
+}
+.control-sidebar-menu > li > a:after {
+ clear: both;
}
-
.control-sidebar-menu > li > a > .control-sidebar-subheading {
- margin-top: 0;
+ margin-top: 0;
}
-
.control-sidebar-menu .menu-icon {
- float: left;
- width: 35px;
- height: 35px;
- border-radius: 50%;
- text-align: center;
- line-height: 35px;
+ float: left;
+ width: 35px;
+ height: 35px;
+ border-radius: 50%;
+ text-align: center;
+ line-height: 35px;
}
-
.control-sidebar-menu .menu-info {
- margin-left: 45px;
- margin-top: 3px;
+ margin-left: 45px;
+ margin-top: 3px;
}
-
.control-sidebar-menu .menu-info > .control-sidebar-subheading {
- margin: 0;
+ margin: 0;
}
-
.control-sidebar-menu .menu-info > p {
- margin: 0;
- font-size: 11px;
+ margin: 0;
+ font-size: 11px;
}
-
.control-sidebar-menu .progress {
- margin: 0;
+ margin: 0;
}
-
.control-sidebar-dark {
- color: #b8c7ce;
+ color: #b8c7ce;
}
-
.control-sidebar-dark,
.control-sidebar-dark + .control-sidebar-bg {
- background: #222d32;
+ background: #222d32;
}
-
.control-sidebar-dark .nav-tabs.control-sidebar-tabs {
- border-bottom: #1c2529;
+ border-bottom: #1c2529;
}
-
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a {
- background: #181f23;
- color: #b8c7ce;
+ background: #181f23;
+ color: #b8c7ce;
}
-
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a,
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover,
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:focus {
- border-left-color: #141a1d;
- border-bottom-color: #141a1d;
+ border-left-color: #141a1d;
+ border-bottom-color: #141a1d;
}
-
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover,
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:focus,
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:active {
- background: #1c2529;
+ background: #1c2529;
}
-
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover {
- color: #fff;
+ color: #fff;
}
-
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a,
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:hover,
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:focus,
.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:active {
- background: #222d32;
- color: #fff;
+ background: #222d32;
+ color: #fff;
}
-
.control-sidebar-dark .control-sidebar-heading,
.control-sidebar-dark .control-sidebar-subheading {
- color: #fff;
+ color: #fff;
}
-
.control-sidebar-dark .control-sidebar-menu > li > a:hover {
- background: #1e282c;
+ background: #1e282c;
}
-
.control-sidebar-dark .control-sidebar-menu > li > a .menu-info > p {
- color: #b8c7ce;
+ color: #b8c7ce;
}
-
.control-sidebar-light {
- color: #5e5e5e;
+ color: #5e5e5e;
}
-
.control-sidebar-light,
.control-sidebar-light + .control-sidebar-bg {
- background: #f9fafc;
- border-left: 1px solid #d2d6de;
+ background: #f9fafc;
+ border-left: 1px solid #d2d6de;
}
-
.control-sidebar-light .nav-tabs.control-sidebar-tabs {
- border-bottom: #d2d6de;
+ border-bottom: #d2d6de;
}
-
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a {
- background: #e8ecf4;
- color: #444444;
+ background: #e8ecf4;
+ color: #444444;
}
-
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a,
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:hover,
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:focus {
- border-left-color: #d2d6de;
- border-bottom-color: #d2d6de;
+ border-left-color: #d2d6de;
+ border-bottom-color: #d2d6de;
}
-
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:hover,
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:focus,
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:active {
- background: #eff1f7;
+ background: #eff1f7;
}
-
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a,
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:hover,
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:focus,
.control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:active {
- background: #f9fafc;
- color: #111;
+ background: #f9fafc;
+ color: #111;
}
-
.control-sidebar-light .control-sidebar-heading,
.control-sidebar-light .control-sidebar-subheading {
- color: #111;
+ color: #111;
}
-
.control-sidebar-light .control-sidebar-menu {
- margin-left: -14px;
+ margin-left: -14px;
}
-
.control-sidebar-light .control-sidebar-menu > li > a:hover {
- background: #f4f4f5;
+ background: #f4f4f5;
}
-
.control-sidebar-light .control-sidebar-menu > li > a .menu-info > p {
- color: #5e5e5e;
+ color: #5e5e5e;
}
-
/*
* Component: Dropdown menus
* -------------------------
*/
/*Dropdowns in general*/
.dropdown-menu {
- box-shadow: none;
- border-color: #eee;
+ box-shadow: none;
+ border-color: #eee;
}
-
.dropdown-menu > li > a {
- color: #777;
+ color: #777;
}
-
.dropdown-menu > li > a > .glyphicon,
.dropdown-menu > li > a > .fa,
.dropdown-menu > li > a > .ion {
- margin-right: 10px;
+ margin-right: 10px;
}
-
.dropdown-menu > li > a:hover {
- background-color: #e1e3e9;
- color: #333;
+ background-color: #e1e3e9;
+ color: #333;
}
-
.dropdown-menu > .divider {
- background-color: #eee;
+ background-color: #eee;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu,
.navbar-nav > .messages-menu > .dropdown-menu,
.navbar-nav > .tasks-menu > .dropdown-menu {
- width: 280px;
- padding: 0 0 0 0;
- margin: 0;
- top: 100%;
+ width: 280px;
+ padding: 0 0 0 0;
+ margin: 0;
+ top: 100%;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li,
.navbar-nav > .messages-menu > .dropdown-menu > li,
.navbar-nav > .tasks-menu > .dropdown-menu > li {
- position: relative;
+ position: relative;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li.header,
.navbar-nav > .messages-menu > .dropdown-menu > li.header,
.navbar-nav > .tasks-menu > .dropdown-menu > li.header {
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- background-color: #ffffff;
- padding: 7px 10px;
- border-bottom: 1px solid #f4f4f4;
- color: #444444;
- font-size: 14px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ background-color: #ffffff;
+ padding: 7px 10px;
+ border-bottom: 1px solid #f4f4f4;
+ color: #444444;
+ font-size: 14px;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a,
.navbar-nav > .messages-menu > .dropdown-menu > li.footer > a,
.navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 4px;
- border-bottom-left-radius: 4px;
- font-size: 12px;
- background-color: #fff;
- padding: 7px 10px;
- border-bottom: 1px solid #eeeeee;
- color: #444 !important;
- text-align: center;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+ font-size: 12px;
+ background-color: #fff;
+ padding: 7px 10px;
+ border-bottom: 1px solid #eeeeee;
+ color: #444 !important;
+ text-align: center;
}
-
@media (max-width: 991px) {
- .navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a,
- .navbar-nav > .messages-menu > .dropdown-menu > li.footer > a,
- .navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a {
- background: #fff !important;
- color: #444 !important;
- }
+ .navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a,
+ .navbar-nav > .messages-menu > .dropdown-menu > li.footer > a,
+ .navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a {
+ background: #fff !important;
+ color: #444 !important;
+ }
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a:hover,
.navbar-nav > .messages-menu > .dropdown-menu > li.footer > a:hover,
.navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a:hover {
- text-decoration: none;
- font-weight: normal;
+ text-decoration: none;
+ font-weight: normal;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li .menu,
.navbar-nav > .messages-menu > .dropdown-menu > li .menu,
.navbar-nav > .tasks-menu > .dropdown-menu > li .menu {
- max-height: 200px;
- margin: 0;
- padding: 0;
- list-style: none;
- overflow-x: hidden;
+ max-height: 200px;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ overflow-x: hidden;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a,
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a,
.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a {
- display: block;
- white-space: nowrap;
- /* Prevent text from breaking */
- border-bottom: 1px solid #f4f4f4;
+ display: block;
+ white-space: nowrap;
+ /* Prevent text from breaking */
+ border-bottom: 1px solid #f4f4f4;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a:hover,
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:hover,
.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a:hover {
- background: #f4f4f4;
- text-decoration: none;
+ background: #f4f4f4;
+ text-decoration: none;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a {
- color: #444444;
- overflow: hidden;
- text-overflow: ellipsis;
- padding: 10px;
+ color: #444444;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ padding: 10px;
}
-
.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .glyphicon,
.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa,
.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .ion {
- width: 20px;
+ width: 20px;
}
-
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a {
- margin: 0;
- padding: 10px 10px;
+ margin: 0;
+ padding: 10px 10px;
}
-
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > div > img {
- margin: auto 10px auto auto;
- width: 40px;
- height: 40px;
+ margin: auto 10px auto auto;
+ width: 40px;
+ height: 40px;
}
-
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > h4 {
- padding: 0;
- margin: 0 0 0 45px;
- color: #444444;
- font-size: 15px;
- position: relative;
+ padding: 0;
+ margin: 0 0 0 45px;
+ color: #444444;
+ font-size: 15px;
+ position: relative;
}
-
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > h4 > small {
- color: #999999;
- font-size: 10px;
- position: absolute;
- top: 0;
- right: 0;
+ color: #999999;
+ font-size: 10px;
+ position: absolute;
+ top: 0;
+ right: 0;
}
-
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > p {
- margin: 0 0 0 45px;
- font-size: 12px;
- color: #888888;
+ margin: 0 0 0 45px;
+ font-size: 12px;
+ color: #888888;
}
-
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:before,
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after {
- clear: both;
+ clear: both;
+}
+.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:before,
+.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after {
+ content: " ";
+ display: table;
+}
+.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after {
+ clear: both;
}
-
.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a {
- padding: 10px;
+ padding: 10px;
}
-
.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > h3 {
- font-size: 14px;
- padding: 0;
- margin: 0 0 10px 0;
- color: #666666;
+ font-size: 14px;
+ padding: 0;
+ margin: 0 0 10px 0;
+ color: #666666;
}
-
.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > .progress {
- padding: 0;
- margin: 0;
+ padding: 0;
+ margin: 0;
}
-
.navbar-nav > .user-menu > .dropdown-menu {
- border-top-right-radius: 0;
- border-top-left-radius: 0;
- padding: 1px 0 0 0;
- border-top-width: 0;
- width: 280px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+ padding: 1px 0 0 0;
+ border-top-width: 0;
+ width: 280px;
}
-
.navbar-nav > .user-menu > .dropdown-menu,
.navbar-nav > .user-menu > .dropdown-menu > .user-body {
- border-bottom-right-radius: 4px;
- border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
}
-
.navbar-nav > .user-menu > .dropdown-menu > li.user-header {
- height: 175px;
- padding: 10px;
- text-align: center;
+ height: 175px;
+ padding: 10px;
+ text-align: center;
}
-
.navbar-nav > .user-menu > .dropdown-menu > li.user-header > img {
- z-index: 5;
- height: 90px;
- width: 90px;
- border: 3px solid;
- border-color: transparent;
- border-color: rgba(255, 255, 255, 0.2);
+ z-index: 5;
+ height: 90px;
+ width: 90px;
+ border: 3px solid;
+ border-color: transparent;
+ border-color: rgba(255, 255, 255, 0.2);
}
-
.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p {
- z-index: 5;
- color: #fff;
- color: rgba(255, 255, 255, 0.8);
- font-size: 17px;
- margin-top: 10px;
+ z-index: 5;
+ color: #fff;
+ color: rgba(255, 255, 255, 0.8);
+ font-size: 17px;
+ margin-top: 10px;
}
-
.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p > small {
- display: block;
- font-size: 12px;
+ display: block;
+ font-size: 12px;
}
-
.navbar-nav > .user-menu > .dropdown-menu > .user-body {
- padding: 15px;
- border-bottom: 1px solid #f4f4f4;
- border-top: 1px solid #dddddd;
+ padding: 15px;
+ border-bottom: 1px solid #f4f4f4;
+ border-top: 1px solid #dddddd;
}
-
.navbar-nav > .user-menu > .dropdown-menu > .user-body:before,
.navbar-nav > .user-menu > .dropdown-menu > .user-body:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.navbar-nav > .user-menu > .dropdown-menu > .user-body:after {
- clear: both;
+ clear: both;
+}
+.navbar-nav > .user-menu > .dropdown-menu > .user-body:before,
+.navbar-nav > .user-menu > .dropdown-menu > .user-body:after {
+ content: " ";
+ display: table;
+}
+.navbar-nav > .user-menu > .dropdown-menu > .user-body:after {
+ clear: both;
}
-
.navbar-nav > .user-menu > .dropdown-menu > .user-body a {
- color: #444 !important;
+ color: #444 !important;
}
-
@media (max-width: 991px) {
- .navbar-nav > .user-menu > .dropdown-menu > .user-body a {
- background: #fff !important;
- color: #444 !important;
- }
+ .navbar-nav > .user-menu > .dropdown-menu > .user-body a {
+ background: #fff !important;
+ color: #444 !important;
+ }
}
-
.navbar-nav > .user-menu > .dropdown-menu > .user-footer {
- background-color: #f9f9f9;
- padding: 10px;
+ background-color: #f9f9f9;
+ padding: 10px;
}
-
.navbar-nav > .user-menu > .dropdown-menu > .user-footer:before,
.navbar-nav > .user-menu > .dropdown-menu > .user-footer:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.navbar-nav > .user-menu > .dropdown-menu > .user-footer:after {
- clear: both;
+ clear: both;
+}
+.navbar-nav > .user-menu > .dropdown-menu > .user-footer:before,
+.navbar-nav > .user-menu > .dropdown-menu > .user-footer:after {
+ content: " ";
+ display: table;
+}
+.navbar-nav > .user-menu > .dropdown-menu > .user-footer:after {
+ clear: both;
}
-
.navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default {
- color: #666666;
+ color: #666666;
}
-
@media (max-width: 991px) {
- .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default:hover {
- background-color: #f9f9f9;
- }
+ .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default:hover {
+ background-color: #f9f9f9;
+ }
}
-
.navbar-nav > .user-menu .user-image {
- float: left;
- width: 25px;
- height: 25px;
- border-radius: 50%;
- margin-right: 10px;
- margin-top: -2px;
+ float: left;
+ width: 25px;
+ height: 25px;
+ border-radius: 50%;
+ margin-right: 10px;
+ margin-top: -2px;
}
-
@media (max-width: 767px) {
- .navbar-nav > .user-menu .user-image {
- float: none;
- margin-right: 0;
- margin-top: -8px;
- line-height: 10px;
- }
+ .navbar-nav > .user-menu .user-image {
+ float: none;
+ margin-right: 0;
+ margin-top: -8px;
+ line-height: 10px;
+ }
}
-
/* Add fade animation to dropdown menus by appending
the class .animated-dropdown-menu to the .dropdown-menu ul (or ol)*/
.open:not(.dropup) > .animated-dropdown-menu {
- backface-visibility: visible !important;
- -webkit-animation: flipInX 0.7s both;
- -o-animation: flipInX 0.7s both;
- animation: flipInX 0.7s both;
+ backface-visibility: visible !important;
+ -webkit-animation: flipInX 0.7s both;
+ -o-animation: flipInX 0.7s both;
+ animation: flipInX 0.7s both;
}
-
@keyframes flipInX {
- 0% {
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- transition-timing-function: ease-in;
- opacity: 0;
- }
- 40% {
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- transition-timing-function: ease-in;
- }
- 60% {
- transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
- opacity: 1;
- }
- 80% {
- transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
- }
- 100% {
- transform: perspective(400px);
- }
+ 0% {
+ transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
+ transition-timing-function: ease-in;
+ opacity: 0;
+ }
+ 40% {
+ transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
+ transition-timing-function: ease-in;
+ }
+ 60% {
+ transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
+ opacity: 1;
+ }
+ 80% {
+ transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
+ }
+ 100% {
+ transform: perspective(400px);
+ }
}
-
@-webkit-keyframes flipInX {
- 0% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- -webkit-transition-timing-function: ease-in;
- opacity: 0;
- }
- 40% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- -webkit-transition-timing-function: ease-in;
- }
- 60% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
- opacity: 1;
- }
- 80% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
- }
- 100% {
- -webkit-transform: perspective(400px);
- }
+ 0% {
+ -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
+ -webkit-transition-timing-function: ease-in;
+ opacity: 0;
+ }
+ 40% {
+ -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
+ -webkit-transition-timing-function: ease-in;
+ }
+ 60% {
+ -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
+ opacity: 1;
+ }
+ 80% {
+ -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
+ }
+ 100% {
+ -webkit-transform: perspective(400px);
+ }
}
-
/* Fix dropdown menu in navbars */
.navbar-custom-menu > .navbar-nav > li {
- position: relative;
+ position: relative;
}
-
.navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
- position: absolute;
- right: 0;
- left: auto;
+ position: absolute;
+ right: 0;
+ left: auto;
}
-
@media (max-width: 991px) {
- .navbar-custom-menu > .navbar-nav {
- float: right;
- }
-
- .navbar-custom-menu > .navbar-nav > li {
- position: static;
- }
-
- .navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
- position: absolute;
- right: 5%;
- left: auto;
- border: 1px solid #ddd;
- background: #fff;
- }
+ .navbar-custom-menu > .navbar-nav {
+ float: right;
+ }
+ .navbar-custom-menu > .navbar-nav > li {
+ position: static;
+ }
+ .navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
+ position: absolute;
+ right: 5%;
+ left: auto;
+ border: 1px solid #ddd;
+ background: #fff;
+ }
}
-
/*
* Component: Form
* ---------------
*/
.form-control {
- border-radius: 0;
- box-shadow: none;
- border-color: #d2d6de;
+ border-radius: 0;
+ box-shadow: none;
+ border-color: #d2d6de;
}
-
.form-control:focus {
- border-color: #3c8dbc;
- box-shadow: none;
+ border-color: #3c8dbc;
+ box-shadow: none;
}
-
.form-control::-moz-placeholder,
.form-control:-ms-input-placeholder,
.form-control::-webkit-input-placeholder {
- color: #bbb;
- opacity: 1;
+ color: #bbb;
+ opacity: 1;
}
-
.form-control:not(select) {
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
}
-
.form-group.has-success label {
- color: #00a65a;
+ color: #00a65a;
}
-
.form-group.has-success .form-control,
.form-group.has-success .input-group-addon {
- border-color: #00a65a;
- box-shadow: none;
+ border-color: #00a65a;
+ box-shadow: none;
}
-
.form-group.has-success .help-block {
- color: #00a65a;
+ color: #00a65a;
}
-
.form-group.has-warning label {
- color: #f39c12;
+ color: #f39c12;
}
-
.form-group.has-warning .form-control,
.form-group.has-warning .input-group-addon {
- border-color: #f39c12;
- box-shadow: none;
+ border-color: #f39c12;
+ box-shadow: none;
}
-
.form-group.has-warning .help-block {
- color: #f39c12;
+ color: #f39c12;
}
-
.form-group.has-error label {
- color: #dd4b39;
+ color: #dd4b39;
}
-
.form-group.has-error .form-control,
.form-group.has-error .input-group-addon {
- border-color: #dd4b39;
- box-shadow: none;
+ border-color: #dd4b39;
+ box-shadow: none;
}
-
.form-group.has-error .help-block {
- color: #dd4b39;
+ color: #dd4b39;
}
-
/* Input group */
.input-group .input-group-addon {
- border-radius: 0;
- border-color: #d2d6de;
- background-color: #fff;
+ border-radius: 0;
+ border-color: #d2d6de;
+ background-color: #fff;
}
-
/* button groups */
.btn-group-vertical .btn.btn-flat:first-of-type,
.btn-group-vertical .btn.btn-flat:last-of-type {
- border-radius: 0;
+ border-radius: 0;
}
-
.icheck > label {
- padding-left: 0;
+ padding-left: 0;
}
-
/* support Font Awesome icons in form-control */
.form-control-feedback.fa {
- line-height: 34px;
+ line-height: 34px;
}
-
.input-lg + .form-control-feedback.fa,
.input-group-lg + .form-control-feedback.fa,
.form-group-lg .form-control + .form-control-feedback.fa {
- line-height: 46px;
+ line-height: 46px;
}
-
.input-sm + .form-control-feedback.fa,
.input-group-sm + .form-control-feedback.fa,
.form-group-sm .form-control + .form-control-feedback.fa {
- line-height: 30px;
+ line-height: 30px;
}
-
/*
* Component: Progress Bar
* -----------------------
*/
.progress,
.progress > .progress-bar {
- -webkit-box-shadow: none;
- box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
}
-
.progress,
.progress > .progress-bar,
.progress .progress-bar,
.progress > .progress-bar .progress-bar {
- border-radius: 1px;
+ border-radius: 1px;
}
-
/* size variation */
.progress.sm,
.progress-sm {
- height: 10px;
+ height: 10px;
}
-
.progress.sm,
.progress-sm,
.progress.sm .progress-bar,
.progress-sm .progress-bar {
- border-radius: 1px;
+ border-radius: 1px;
}
-
.progress.xs,
.progress-xs {
- height: 7px;
+ height: 7px;
}
-
.progress.xs,
.progress-xs,
.progress.xs .progress-bar,
.progress-xs .progress-bar {
- border-radius: 1px;
+ border-radius: 1px;
}
-
.progress.xxs,
.progress-xxs {
- height: 3px;
+ height: 3px;
}
-
.progress.xxs,
.progress-xxs,
.progress.xxs .progress-bar,
.progress-xxs .progress-bar {
- border-radius: 1px;
+ border-radius: 1px;
}
-
/* Vertical bars */
.progress.vertical {
- position: relative;
- width: 30px;
- height: 200px;
- display: inline-block;
- margin-right: 10px;
+ position: relative;
+ width: 30px;
+ height: 200px;
+ display: inline-block;
+ margin-right: 10px;
}
-
.progress.vertical > .progress-bar {
- width: 100%;
- position: absolute;
- bottom: 0;
+ width: 100%;
+ position: absolute;
+ bottom: 0;
}
-
.progress.vertical.sm,
.progress.vertical.progress-sm {
- width: 20px;
+ width: 20px;
}
-
.progress.vertical.xs,
.progress.vertical.progress-xs {
- width: 10px;
+ width: 10px;
}
-
.progress.vertical.xxs,
.progress.vertical.progress-xxs {
- width: 3px;
+ width: 3px;
}
-
.progress-group .progress-text {
- font-weight: 600;
+ font-weight: 600;
}
-
.progress-group .progress-number {
- float: right;
+ float: right;
}
-
/* Remove margins from progress bars when put in a table */
.table tr > td .progress {
- margin: 0;
+ margin: 0;
}
-
.progress-bar-light-blue,
.progress-bar-primary {
- background-color: #3c8dbc;
+ background-color: #3c8dbc;
}
-
.progress-striped .progress-bar-light-blue,
.progress-striped .progress-bar-primary {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-striped .progress-bar-light-blue,
+.progress-striped .progress-bar-primary {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
-
.progress-bar-green,
.progress-bar-success {
- background-color: #00a65a;
+ background-color: #00a65a;
}
-
.progress-striped .progress-bar-green,
.progress-striped .progress-bar-success {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-striped .progress-bar-green,
+.progress-striped .progress-bar-success {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
-
.progress-bar-aqua,
.progress-bar-info {
- background-color: #00c0ef;
+ background-color: #00c0ef;
}
-
.progress-striped .progress-bar-aqua,
.progress-striped .progress-bar-info {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-striped .progress-bar-aqua,
+.progress-striped .progress-bar-info {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
-
.progress-bar-yellow,
.progress-bar-warning {
- background-color: #f39c12;
+ background-color: #f39c12;
}
-
.progress-striped .progress-bar-yellow,
.progress-striped .progress-bar-warning {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-striped .progress-bar-yellow,
+.progress-striped .progress-bar-warning {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
-
.progress-bar-red,
.progress-bar-danger {
- background-color: #dd4b39;
+ background-color: #dd4b39;
}
-
.progress-striped .progress-bar-red,
.progress-striped .progress-bar-danger {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-striped .progress-bar-red,
+.progress-striped .progress-bar-danger {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
-
/*
* Component: Small Box
* --------------------
*/
.small-box {
- border-radius: 2px;
- position: relative;
- display: block;
- margin-bottom: 20px;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ border-radius: 2px;
+ position: relative;
+ display: block;
+ margin-bottom: 20px;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
-
.small-box > .inner {
- padding: 10px;
+ padding: 10px;
}
-
.small-box > .small-box-footer {
- position: relative;
- text-align: center;
- padding: 3px 0;
- color: #fff;
- color: rgba(255, 255, 255, 0.8);
- display: block;
- z-index: 10;
- background: rgba(0, 0, 0, 0.1);
- text-decoration: none;
+ position: relative;
+ text-align: center;
+ padding: 3px 0;
+ color: #fff;
+ color: rgba(255, 255, 255, 0.8);
+ display: block;
+ z-index: 10;
+ background: rgba(0, 0, 0, 0.1);
+ text-decoration: none;
}
-
.small-box > .small-box-footer:hover {
- color: #fff;
- background: rgba(0, 0, 0, 0.15);
+ color: #fff;
+ background: rgba(0, 0, 0, 0.15);
}
-
.small-box h3 {
- font-size: 38px;
- font-weight: bold;
- margin: 0 0 10px 0;
- white-space: nowrap;
- padding: 0;
+ font-size: 38px;
+ font-weight: bold;
+ margin: 0 0 10px 0;
+ white-space: nowrap;
+ padding: 0;
}
-
.small-box p {
- font-size: 15px;
+ font-size: 15px;
}
-
.small-box p > small {
- display: block;
- color: #f9f9f9;
- font-size: 13px;
- margin-top: 5px;
+ display: block;
+ color: #f9f9f9;
+ font-size: 13px;
+ margin-top: 5px;
}
-
.small-box h3,
.small-box p {
- z-index: 5;
+ z-index: 5;
}
-
.small-box .icon {
- -webkit-transition: all 0.3s linear;
- -o-transition: all 0.3s linear;
- transition: all 0.3s linear;
- position: absolute;
- top: -10px;
- right: 10px;
- z-index: 0;
- font-size: 90px;
- color: rgba(0, 0, 0, 0.15);
+ -webkit-transition: all 0.3s linear;
+ -o-transition: all 0.3s linear;
+ transition: all 0.3s linear;
+ position: absolute;
+ top: -10px;
+ right: 10px;
+ z-index: 0;
+ font-size: 90px;
+ color: rgba(0, 0, 0, 0.15);
}
-
.small-box:hover {
- text-decoration: none;
- color: #f9f9f9;
+ text-decoration: none;
+ color: #f9f9f9;
}
-
.small-box:hover .icon {
- font-size: 95px;
+ font-size: 95px;
}
-
@media (max-width: 767px) {
- .small-box {
- text-align: center;
- }
-
- .small-box .icon {
- display: none;
- }
-
- .small-box p {
- font-size: 12px;
- }
+ .small-box {
+ text-align: center;
+ }
+ .small-box .icon {
+ display: none;
+ }
+ .small-box p {
+ font-size: 12px;
+ }
}
-
/*
* Component: Box
* --------------
*/
.box {
- position: relative;
- border-radius: 3px;
- background: #ffffff;
- border-top: 3px solid #d2d6de;
- margin-bottom: 20px;
- width: 100%;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ position: relative;
+ border-radius: 3px;
+ background: #ffffff;
+ border-top: 3px solid #d2d6de;
+ margin-bottom: 20px;
+ width: 100%;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
-
.box.box-primary {
- border-top-color: #3c8dbc;
+ border-top-color: #3c8dbc;
}
-
.box.box-info {
- border-top-color: #00c0ef;
+ border-top-color: #00c0ef;
}
-
.box.box-danger {
- border-top-color: #dd4b39;
+ border-top-color: #dd4b39;
}
-
.box.box-warning {
- border-top-color: #f39c12;
+ border-top-color: #f39c12;
}
-
.box.box-success {
- border-top-color: #00a65a;
+ border-top-color: #00a65a;
}
-
.box.box-default {
- border-top-color: #d2d6de;
+ border-top-color: #d2d6de;
}
-
.box.collapsed-box .box-body,
.box.collapsed-box .box-footer {
- display: none;
+ display: none;
}
-
.box .nav-stacked > li {
- border-bottom: 1px solid #f4f4f4;
- margin: 0;
+ border-bottom: 1px solid #f4f4f4;
+ margin: 0;
}
-
.box .nav-stacked > li:last-of-type {
- border-bottom: none;
+ border-bottom: none;
}
-
.box.height-control .box-body {
- max-height: 300px;
- overflow: auto;
+ max-height: 300px;
+ overflow: auto;
}
-
.box .border-right {
- border-right: 1px solid #f4f4f4;
+ border-right: 1px solid #f4f4f4;
}
-
.box .border-left {
- border-left: 1px solid #f4f4f4;
+ border-left: 1px solid #f4f4f4;
}
-
.box.box-solid {
- border-top: 0;
+ border-top: 0;
}
-
.box.box-solid > .box-header .btn.btn-default {
- background: transparent;
+ background: transparent;
}
-
.box.box-solid > .box-header .btn:hover,
.box.box-solid > .box-header a:hover {
- background: rgba(0, 0, 0, 0.1);
+ background: rgba(0, 0, 0, 0.1);
}
-
.box.box-solid.box-default {
- border: 1px solid #d2d6de;
+ border: 1px solid #d2d6de;
}
-
.box.box-solid.box-default > .box-header {
- color: #444444;
- background: #d2d6de;
- background-color: #d2d6de;
+ color: #444444;
+ background: #d2d6de;
+ background-color: #d2d6de;
}
-
.box.box-solid.box-default > .box-header a,
.box.box-solid.box-default > .box-header .btn {
- color: #444444;
+ color: #444444;
}
-
.box.box-solid.box-primary {
- border: 1px solid #3c8dbc;
+ border: 1px solid #3c8dbc;
}
-
.box.box-solid.box-primary > .box-header {
- color: #ffffff;
- background: #3c8dbc;
- background-color: #3c8dbc;
+ color: #ffffff;
+ background: #3c8dbc;
+ background-color: #3c8dbc;
}
-
.box.box-solid.box-primary > .box-header a,
.box.box-solid.box-primary > .box-header .btn {
- color: #ffffff;
+ color: #ffffff;
}
-
.box.box-solid.box-info {
- border: 1px solid #00c0ef;
+ border: 1px solid #00c0ef;
}
-
.box.box-solid.box-info > .box-header {
- color: #ffffff;
- background: #00c0ef;
- background-color: #00c0ef;
+ color: #ffffff;
+ background: #00c0ef;
+ background-color: #00c0ef;
}
-
.box.box-solid.box-info > .box-header a,
.box.box-solid.box-info > .box-header .btn {
- color: #ffffff;
+ color: #ffffff;
}
-
.box.box-solid.box-danger {
- border: 1px solid #dd4b39;
+ border: 1px solid #dd4b39;
}
-
.box.box-solid.box-danger > .box-header {
- color: #ffffff;
- background: #dd4b39;
- background-color: #dd4b39;
+ color: #ffffff;
+ background: #dd4b39;
+ background-color: #dd4b39;
}
-
.box.box-solid.box-danger > .box-header a,
.box.box-solid.box-danger > .box-header .btn {
- color: #ffffff;
+ color: #ffffff;
}
-
.box.box-solid.box-warning {
- border: 1px solid #f39c12;
+ border: 1px solid #f39c12;
}
-
.box.box-solid.box-warning > .box-header {
- color: #ffffff;
- background: #f39c12;
- background-color: #f39c12;
+ color: #ffffff;
+ background: #f39c12;
+ background-color: #f39c12;
}
-
.box.box-solid.box-warning > .box-header a,
.box.box-solid.box-warning > .box-header .btn {
- color: #ffffff;
+ color: #ffffff;
}
-
.box.box-solid.box-success {
- border: 1px solid #00a65a;
+ border: 1px solid #00a65a;
}
-
.box.box-solid.box-success > .box-header {
- color: #ffffff;
- background: #00a65a;
- background-color: #00a65a;
+ color: #ffffff;
+ background: #00a65a;
+ background-color: #00a65a;
}
-
.box.box-solid.box-success > .box-header a,
.box.box-solid.box-success > .box-header .btn {
- color: #ffffff;
+ color: #ffffff;
}
-
.box.box-solid > .box-header > .box-tools .btn {
- border: 0;
- box-shadow: none;
+ border: 0;
+ box-shadow: none;
}
-
.box.box-solid[class*='bg'] > .box-header {
- color: #fff;
+ color: #fff;
}
-
.box .box-group > .box {
- margin-bottom: 5px;
+ margin-bottom: 5px;
}
-
.box .knob-label {
- text-align: center;
- color: #333;
- font-weight: 100;
- font-size: 12px;
- margin-bottom: 0.3em;
+ text-align: center;
+ color: #333;
+ font-weight: 100;
+ font-size: 12px;
+ margin-bottom: 0.3em;
}
-
.box > .overlay,
.overlay-wrapper > .overlay,
.box > .loading-img,
.overlay-wrapper > .loading-img {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
}
-
.box .overlay,
.overlay-wrapper .overlay {
- z-index: 50;
- background: rgba(255, 255, 255, 0.7);
- border-radius: 3px;
+ z-index: 50;
+ background: rgba(255, 255, 255, 0.7);
+ border-radius: 3px;
}
-
.box .overlay > .fa,
.overlay-wrapper .overlay > .fa {
- position: absolute;
- top: 50%;
- left: 50%;
- margin-left: -15px;
- margin-top: -15px;
- color: #000;
- font-size: 30px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin-left: -15px;
+ margin-top: -15px;
+ color: #000;
+ font-size: 30px;
}
-
.box .overlay.dark,
.overlay-wrapper .overlay.dark {
- background: rgba(0, 0, 0, 0.5);
+ background: rgba(0, 0, 0, 0.5);
}
-
.box-header:before,
.box-body:before,
.box-footer:before,
.box-header:after,
.box-body:after,
.box-footer:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.box-header:after,
.box-body:after,
.box-footer:after {
- clear: both;
+ clear: both;
+}
+.box-header:before,
+.box-body:before,
+.box-footer:before,
+.box-header:after,
+.box-body:after,
+.box-footer:after {
+ content: " ";
+ display: table;
+}
+.box-header:after,
+.box-body:after,
+.box-footer:after {
+ clear: both;
}
-
.box-header {
- color: #444;
- display: block;
- padding: 10px;
- position: relative;
+ color: #444;
+ display: block;
+ padding: 10px;
+ position: relative;
}
-
.box-header.with-border {
- border-bottom: 1px solid #f4f4f4;
+ border-bottom: 1px solid #f4f4f4;
}
-
.collapsed-box .box-header.with-border {
- border-bottom: none;
+ border-bottom: none;
}
-
.box-header > .fa,
.box-header > .glyphicon,
.box-header > .ion,
.box-header .box-title {
- display: inline-block;
- font-size: 18px;
- margin: 0;
- line-height: 1;
+ display: inline-block;
+ font-size: 18px;
+ margin: 0;
+ line-height: 1;
}
-
.box-header > .fa,
.box-header > .glyphicon,
.box-header > .ion {
- margin-right: 5px;
+ margin-right: 5px;
}
-
.box-header > .box-tools {
- position: absolute;
- right: 10px;
- top: 5px;
+ position: absolute;
+ right: 10px;
+ top: 5px;
}
-
.box-header > .box-tools [data-toggle="tooltip"] {
- position: relative;
+ position: relative;
}
-
.box-header > .box-tools.pull-right .dropdown-menu {
- right: 0;
- left: auto;
+ right: 0;
+ left: auto;
+}
+.box-header > .box-tools .dropdown-menu > li > a {
+ color: #444!important;
}
-
.btn-box-tool {
- padding: 5px;
- font-size: 12px;
- background: transparent;
- color: #97a0b3;
+ padding: 5px;
+ font-size: 12px;
+ background: transparent;
+ color: #97a0b3;
}
-
.open .btn-box-tool,
.btn-box-tool:hover {
- color: #606c84;
+ color: #606c84;
}
-
.btn-box-tool.btn:active {
- box-shadow: none;
+ box-shadow: none;
}
-
.box-body {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
- padding: 10px;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+ padding: 10px;
}
-
.no-header .box-body {
- border-top-right-radius: 3px;
- border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
}
-
.box-body > .table {
- margin-bottom: 0;
+ margin-bottom: 0;
}
-
.box-body .fc {
- margin-top: 5px;
+ margin-top: 5px;
}
-
.box-body .full-width-chart {
- margin: -19px;
+ margin: -19px;
}
-
.box-body.no-padding .full-width-chart {
- margin: -9px;
+ margin: -9px;
}
-
.box-body .box-pane {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 3px;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 3px;
}
-
.box-body .box-pane-right {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 0;
}
-
.box-footer {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
- border-top: 1px solid #f4f4f4;
- padding: 10px;
- background-color: #ffffff;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top: 1px solid #f4f4f4;
+ padding: 10px;
+ background-color: #ffffff;
}
-
.chart-legend {
- margin: 10px 0;
+ margin: 10px 0;
}
-
@media (max-width: 991px) {
- .chart-legend > li {
- float: left;
- margin-right: 10px;
- }
+ .chart-legend > li {
+ float: left;
+ margin-right: 10px;
+ }
}
-
.box-comments {
- background: #f7f7f7;
+ background: #f7f7f7;
}
-
.box-comments .box-comment {
- padding: 8px 0;
- border-bottom: 1px solid #eee;
+ padding: 8px 0;
+ border-bottom: 1px solid #eee;
}
-
.box-comments .box-comment:before,
.box-comments .box-comment:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.box-comments .box-comment:after {
- clear: both;
+ clear: both;
+}
+.box-comments .box-comment:before,
+.box-comments .box-comment:after {
+ content: " ";
+ display: table;
+}
+.box-comments .box-comment:after {
+ clear: both;
}
-
.box-comments .box-comment:last-of-type {
- border-bottom: 0;
+ border-bottom: 0;
}
-
.box-comments .box-comment:first-of-type {
- padding-top: 0;
+ padding-top: 0;
}
-
.box-comments .box-comment img {
- float: left;
+ float: left;
}
-
.box-comments .comment-text {
- margin-left: 40px;
- color: #555;
+ margin-left: 40px;
+ color: #555;
}
-
.box-comments .username {
- color: #444;
- display: block;
- font-weight: 600;
+ color: #444;
+ display: block;
+ font-weight: 600;
}
-
.box-comments .text-muted {
- font-weight: 400;
- font-size: 12px;
+ font-weight: 400;
+ font-size: 12px;
}
-
/* Widget: TODO LIST */
.todo-list {
- margin: 0;
- padding: 0;
- list-style: none;
- overflow: auto;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ overflow: auto;
}
-
.todo-list > li {
- border-radius: 2px;
- padding: 10px;
- background: #f4f4f4;
- margin-bottom: 2px;
- border-left: 2px solid #e6e7e8;
- color: #444;
+ border-radius: 2px;
+ padding: 10px;
+ background: #f4f4f4;
+ margin-bottom: 2px;
+ border-left: 2px solid #e6e7e8;
+ color: #444;
}
-
.todo-list > li:last-of-type {
- margin-bottom: 0;
+ margin-bottom: 0;
}
-
.todo-list > li > input[type='checkbox'] {
- margin: 0 10px 0 5px;
+ margin: 0 10px 0 5px;
}
-
.todo-list > li .text {
- display: inline-block;
- margin-left: 5px;
- font-weight: 600;
+ display: inline-block;
+ margin-left: 5px;
+ font-weight: 600;
}
-
.todo-list > li .label {
- margin-left: 10px;
- font-size: 9px;
+ margin-left: 10px;
+ font-size: 9px;
}
-
.todo-list > li .tools {
- display: none;
- float: right;
- color: #dd4b39;
+ display: none;
+ float: right;
+ color: #dd4b39;
}
-
.todo-list > li .tools > .fa,
.todo-list > li .tools > .glyphicon,
.todo-list > li .tools > .ion {
- margin-right: 5px;
- cursor: pointer;
+ margin-right: 5px;
+ cursor: pointer;
}
-
.todo-list > li:hover .tools {
- display: inline-block;
+ display: inline-block;
}
-
.todo-list > li.done {
- color: #999;
+ color: #999;
}
-
.todo-list > li.done .text {
- text-decoration: line-through;
- font-weight: 500;
+ text-decoration: line-through;
+ font-weight: 500;
}
-
.todo-list > li.done .label {
- background: #d2d6de !important;
+ background: #d2d6de !important;
}
-
.todo-list .danger {
- border-left-color: #dd4b39;
+ border-left-color: #dd4b39;
}
-
.todo-list .warning {
- border-left-color: #f39c12;
+ border-left-color: #f39c12;
}
-
.todo-list .info {
- border-left-color: #00c0ef;
+ border-left-color: #00c0ef;
}
-
.todo-list .success {
- border-left-color: #00a65a;
+ border-left-color: #00a65a;
}
-
.todo-list .primary {
- border-left-color: #3c8dbc;
+ border-left-color: #3c8dbc;
}
-
.todo-list .handle {
- display: inline-block;
- cursor: move;
- margin: 0 5px;
+ display: inline-block;
+ cursor: move;
+ margin: 0 5px;
}
-
/* Chat widget (DEPRECATED - this will be removed in the next major release. Use Direct Chat instead)*/
.chat {
- padding: 5px 20px 5px 10px;
+ padding: 5px 20px 5px 10px;
}
-
.chat .item {
- margin-bottom: 10px;
+ margin-bottom: 10px;
}
-
.chat .item:before,
.chat .item:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.chat .item:after {
- clear: both;
+ clear: both;
+}
+.chat .item:before,
+.chat .item:after {
+ content: " ";
+ display: table;
+}
+.chat .item:after {
+ clear: both;
}
-
.chat .item > img {
- width: 40px;
- height: 40px;
- border: 2px solid transparent;
- border-radius: 50%;
+ width: 40px;
+ height: 40px;
+ border: 2px solid transparent;
+ border-radius: 50%;
}
-
.chat .item > .online {
- border: 2px solid #00a65a;
+ border: 2px solid #00a65a;
}
-
.chat .item > .offline {
- border: 2px solid #dd4b39;
+ border: 2px solid #dd4b39;
}
-
.chat .item > .message {
- margin-left: 55px;
- margin-top: -40px;
+ margin-left: 55px;
+ margin-top: -40px;
}
-
.chat .item > .message > .name {
- display: block;
- font-weight: 600;
+ display: block;
+ font-weight: 600;
}
-
.chat .item > .attachment {
- border-radius: 3px;
- background: #f4f4f4;
- margin-left: 65px;
- margin-right: 15px;
- padding: 10px;
+ border-radius: 3px;
+ background: #f4f4f4;
+ margin-left: 65px;
+ margin-right: 15px;
+ padding: 10px;
}
-
.chat .item > .attachment > h4 {
- margin: 0 0 5px 0;
- font-weight: 600;
- font-size: 14px;
+ margin: 0 0 5px 0;
+ font-weight: 600;
+ font-size: 14px;
}
-
.chat .item > .attachment > p,
.chat .item > .attachment > .filename {
- font-weight: 600;
- font-size: 13px;
- font-style: italic;
- margin: 0;
+ font-weight: 600;
+ font-size: 13px;
+ font-style: italic;
+ margin: 0;
}
-
.chat .item > .attachment:before,
.chat .item > .attachment:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.chat .item > .attachment:after {
- clear: both;
+ clear: both;
+}
+.chat .item > .attachment:before,
+.chat .item > .attachment:after {
+ content: " ";
+ display: table;
+}
+.chat .item > .attachment:after {
+ clear: both;
}
-
.box-input {
- max-width: 200px;
+ max-width: 200px;
}
-
.modal .panel-body {
- color: #444;
+ color: #444;
}
-
/*
* Component: Info Box
* -------------------
*/
.info-box {
- display: block;
- min-height: 90px;
- background: #fff;
- width: 100%;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- border-radius: 2px;
- margin-bottom: 15px;
+ display: block;
+ min-height: 90px;
+ background: #fff;
+ width: 100%;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ border-radius: 2px;
+ margin-bottom: 15px;
}
-
.info-box small {
- font-size: 14px;
+ font-size: 14px;
}
-
.info-box .progress {
- background: rgba(0, 0, 0, 0.2);
- margin: 5px -10px 5px -10px;
- height: 2px;
+ background: rgba(0, 0, 0, 0.2);
+ margin: 5px -10px 5px -10px;
+ height: 2px;
}
-
.info-box .progress,
.info-box .progress .progress-bar {
- border-radius: 0;
+ border-radius: 0;
}
-
.info-box .progress .progress-bar {
- background: #fff;
+ background: #fff;
}
-
.info-box-icon {
- border-top-left-radius: 2px;
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 2px;
- display: block;
- float: left;
- height: 90px;
- width: 90px;
- text-align: center;
- font-size: 45px;
- line-height: 90px;
- background: rgba(0, 0, 0, 0.2);
+ border-top-left-radius: 2px;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 2px;
+ display: block;
+ float: left;
+ height: 90px;
+ width: 90px;
+ text-align: center;
+ font-size: 45px;
+ line-height: 90px;
+ background: rgba(0, 0, 0, 0.2);
}
-
.info-box-icon > img {
- max-width: 100%;
+ max-width: 100%;
}
-
.info-box-content {
- padding: 5px 10px;
- margin-left: 90px;
+ padding: 5px 10px;
+ margin-left: 90px;
}
-
.info-box-number {
- display: block;
- font-weight: bold;
- font-size: 18px;
+ display: block;
+ font-weight: bold;
+ font-size: 18px;
}
-
.progress-description,
.info-box-text {
- display: block;
- font-size: 14px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ display: block;
+ font-size: 14px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
-
.info-box-text {
- text-transform: uppercase;
+ text-transform: uppercase;
}
-
.info-box-more {
- display: block;
+ display: block;
}
-
.progress-description {
- margin: 0;
+ margin: 0;
}
-
/*
* Component: Timeline
* -------------------
*/
.timeline {
- position: relative;
- margin: 0 0 30px 0;
- padding: 0;
- list-style: none;
+ position: relative;
+ margin: 0 0 30px 0;
+ padding: 0;
+ list-style: none;
}
-
.timeline:before {
- content: '';
- position: absolute;
- top: 0;
- bottom: 0;
- width: 4px;
- background: #ddd;
- left: 31px;
- margin: 0;
- border-radius: 2px;
+ content: '';
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ width: 4px;
+ background: #ddd;
+ left: 31px;
+ margin: 0;
+ border-radius: 2px;
}
-
.timeline > li {
- position: relative;
- margin-right: 10px;
- margin-bottom: 15px;
+ position: relative;
+ margin-right: 10px;
+ margin-bottom: 15px;
}
-
.timeline > li:before,
.timeline > li:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.timeline > li:after {
- clear: both;
+ clear: both;
+}
+.timeline > li:before,
+.timeline > li:after {
+ content: " ";
+ display: table;
+}
+.timeline > li:after {
+ clear: both;
}
-
.timeline > li > .timeline-item {
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- border-radius: 3px;
- margin-top: 0;
- background: #fff;
- color: #444;
- margin-left: 60px;
- margin-right: 15px;
- padding: 0;
- position: relative;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ border-radius: 3px;
+ margin-top: 0;
+ background: #fff;
+ color: #444;
+ margin-left: 60px;
+ margin-right: 15px;
+ padding: 0;
+ position: relative;
}
-
.timeline > li > .timeline-item > .time {
- color: #999;
- float: right;
- padding: 10px;
- font-size: 12px;
+ color: #999;
+ float: right;
+ padding: 10px;
+ font-size: 12px;
}
-
.timeline > li > .timeline-item > .timeline-header {
- margin: 0;
- color: #555;
- border-bottom: 1px solid #f4f4f4;
- padding: 10px;
- font-size: 16px;
- line-height: 1.1;
+ margin: 0;
+ color: #555;
+ border-bottom: 1px solid #f4f4f4;
+ padding: 10px;
+ font-size: 16px;
+ line-height: 1.1;
}
-
.timeline > li > .timeline-item > .timeline-header > a {
- font-weight: 600;
+ font-weight: 600;
}
-
.timeline > li > .timeline-item > .timeline-body,
.timeline > li > .timeline-item > .timeline-footer {
- padding: 10px;
+ padding: 10px;
}
-
.timeline > li > .fa,
.timeline > li > .glyphicon,
.timeline > li > .ion {
- width: 30px;
- height: 30px;
- font-size: 15px;
- line-height: 30px;
- position: absolute;
- color: #666;
- background: #d2d6de;
- border-radius: 50%;
- text-align: center;
- left: 18px;
- top: 0;
+ width: 30px;
+ height: 30px;
+ font-size: 15px;
+ line-height: 30px;
+ position: absolute;
+ color: #666;
+ background: #d2d6de;
+ border-radius: 50%;
+ text-align: center;
+ left: 18px;
+ top: 0;
}
-
.timeline > .time-label > span {
- font-weight: 600;
- padding: 5px;
- display: inline-block;
- background-color: #fff;
- border-radius: 4px;
+ font-weight: 600;
+ padding: 5px;
+ display: inline-block;
+ background-color: #fff;
+ border-radius: 4px;
}
-
.timeline-inverse > li > .timeline-item {
- background: #f0f0f0;
- border: 1px solid #ddd;
- -webkit-box-shadow: none;
- box-shadow: none;
+ background: #f0f0f0;
+ border: 1px solid #ddd;
+ -webkit-box-shadow: none;
+ box-shadow: none;
}
-
.timeline-inverse > li > .timeline-item > .timeline-header {
- border-bottom-color: #ddd;
+ border-bottom-color: #ddd;
}
-
/*
* Component: Button
* -----------------
*/
.btn {
- border-radius: 3px;
- -webkit-box-shadow: none;
- box-shadow: none;
- border: 1px solid transparent;
+ border-radius: 3px;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ border: 1px solid transparent;
}
-
.btn.uppercase {
- text-transform: uppercase;
+ text-transform: uppercase;
}
-
.btn.btn-flat {
- border-radius: 0;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- border-width: 1px;
+ border-radius: 0;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ border-width: 1px;
}
-
.btn:active {
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
-
.btn:focus {
- outline: none;
+ outline: none;
}
-
.btn.btn-file {
- position: relative;
- overflow: hidden;
+ position: relative;
+ overflow: hidden;
}
-
.btn.btn-file > input[type='file'] {
- position: absolute;
- top: 0;
- right: 0;
- min-width: 100%;
- min-height: 100%;
- font-size: 100px;
- text-align: right;
- opacity: 0;
- filter: alpha(opacity=0);
- outline: none;
- background: white;
- cursor: inherit;
- display: block;
+ position: absolute;
+ top: 0;
+ right: 0;
+ min-width: 100%;
+ min-height: 100%;
+ font-size: 100px;
+ text-align: right;
+ opacity: 0;
+ filter: alpha(opacity=0);
+ outline: none;
+ background: white;
+ cursor: inherit;
+ display: block;
}
-
.btn-default {
- background-color: #f4f4f4;
- color: #444;
- border-color: #ddd;
+ background-color: #f4f4f4;
+ color: #444;
+ border-color: #ddd;
}
-
.btn-default:hover,
.btn-default:active,
.btn-default.hover {
- background-color: #e7e7e7;
+ background-color: #e7e7e7;
}
-
.btn-primary {
- background-color: #3c8dbc;
- border-color: #367fa9;
+ background-color: #3c8dbc;
+ border-color: #367fa9;
}
-
.btn-primary:hover,
.btn-primary:active,
.btn-primary.hover {
- background-color: #367fa9;
+ background-color: #367fa9;
}
-
.btn-success {
- background-color: #00a65a;
- border-color: #008d4c;
+ background-color: #00a65a;
+ border-color: #008d4c;
}
-
.btn-success:hover,
.btn-success:active,
.btn-success.hover {
- background-color: #008d4c;
+ background-color: #008d4c;
}
-
.btn-info {
- background-color: #00c0ef;
- border-color: #00acd6;
+ background-color: #00c0ef;
+ border-color: #00acd6;
}
-
.btn-info:hover,
.btn-info:active,
.btn-info.hover {
- background-color: #00acd6;
+ background-color: #00acd6;
}
-
.btn-danger {
- background-color: #dd4b39;
- border-color: #d73925;
+ background-color: #dd4b39;
+ border-color: #d73925;
}
-
.btn-danger:hover,
.btn-danger:active,
.btn-danger.hover {
- background-color: #d73925;
+ background-color: #d73925;
}
-
.btn-warning {
- background-color: #f39c12;
- border-color: #e08e0b;
+ background-color: #f39c12;
+ border-color: #e08e0b;
}
-
.btn-warning:hover,
.btn-warning:active,
.btn-warning.hover {
- background-color: #e08e0b;
+ background-color: #e08e0b;
}
-
.btn-outline {
- border: 1px solid #fff;
- background: transparent;
- color: #fff;
+ border: 1px solid #fff;
+ background: transparent;
+ color: #fff;
}
-
.btn-outline:hover,
.btn-outline:focus,
.btn-outline:active {
- color: rgba(255, 255, 255, 0.7);
- border-color: rgba(255, 255, 255, 0.7);
+ color: rgba(255, 255, 255, 0.7);
+ border-color: rgba(255, 255, 255, 0.7);
}
-
.btn-link {
- -webkit-box-shadow: none;
- box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
}
-
.btn[class*='bg-']:hover {
- -webkit-box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);
- box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);
}
-
.btn-app {
- border-radius: 3px;
- position: relative;
- padding: 15px 5px;
- margin: 0 0 10px 10px;
- min-width: 80px;
- height: 60px;
- text-align: center;
- color: #666;
- border: 1px solid #ddd;
- background-color: #f4f4f4;
- font-size: 12px;
+ border-radius: 3px;
+ position: relative;
+ padding: 15px 5px;
+ margin: 0 0 10px 10px;
+ min-width: 80px;
+ height: 60px;
+ text-align: center;
+ color: #666;
+ border: 1px solid #ddd;
+ background-color: #f4f4f4;
+ font-size: 12px;
}
-
.btn-app > .fa,
.btn-app > .glyphicon,
.btn-app > .ion {
- font-size: 20px;
- display: block;
+ font-size: 20px;
+ display: block;
}
-
.btn-app:hover {
- background: #f4f4f4;
- color: #444;
- border-color: #aaa;
+ background: #f4f4f4;
+ color: #444;
+ border-color: #aaa;
}
-
.btn-app:active,
.btn-app:focus {
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
-
.btn-app > .badge {
- position: absolute;
- top: -3px;
- right: -10px;
- font-size: 10px;
- font-weight: 400;
+ position: absolute;
+ top: -3px;
+ right: -10px;
+ font-size: 10px;
+ font-weight: 400;
}
-
/*
* Component: Callout
* ------------------
*/
.callout {
- border-radius: 3px;
- margin: 0 0 20px 0;
- padding: 15px 30px 15px 15px;
- border-left: 5px solid #eee;
+ border-radius: 3px;
+ margin: 0 0 20px 0;
+ padding: 15px 30px 15px 15px;
+ border-left: 5px solid #eee;
}
-
.callout a {
- color: #fff;
- text-decoration: underline;
+ color: #fff;
+ text-decoration: underline;
}
-
.callout a:hover {
- color: #eee;
+ color: #eee;
}
-
.callout h4 {
- margin-top: 0;
- font-weight: 600;
+ margin-top: 0;
+ font-weight: 600;
}
-
.callout p:last-child {
- margin-bottom: 0;
+ margin-bottom: 0;
}
-
.callout code,
.callout .highlight {
- background-color: #fff;
+ background-color: #fff;
}
-
.callout.callout-danger {
- border-color: #c23321;
+ border-color: #c23321;
}
-
.callout.callout-warning {
- border-color: #c87f0a;
+ border-color: #c87f0a;
}
-
.callout.callout-info {
- border-color: #0097bc;
+ border-color: #0097bc;
}
-
.callout.callout-success {
- border-color: #00733e;
+ border-color: #00733e;
}
-
/*
* Component: alert
* ----------------
*/
.alert {
- border-radius: 3px;
+ border-radius: 3px;
}
-
.alert h4 {
- font-weight: 600;
+ font-weight: 600;
}
-
.alert .icon {
- margin-right: 10px;
+ margin-right: 10px;
}
-
.alert .close {
- color: #000;
- opacity: 0.2;
- filter: alpha(opacity=20);
+ color: #000;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
}
-
.alert .close:hover {
- opacity: 0.5;
- filter: alpha(opacity=50);
+ opacity: 0.5;
+ filter: alpha(opacity=50);
}
-
.alert a {
- color: #fff;
- text-decoration: underline;
+ color: #fff;
+ text-decoration: underline;
}
-
.alert-success {
- border-color: #008d4c;
+ border-color: #008d4c;
}
-
.alert-danger,
.alert-error {
- border-color: #d73925;
+ border-color: #d73925;
}
-
.alert-warning {
- border-color: #e08e0b;
+ border-color: #e08e0b;
}
-
.alert-info {
- border-color: #00acd6;
+ border-color: #00acd6;
}
-
/*
* Component: Nav
* --------------
@@ -2897,272 +2563,234 @@ a:focus {
.nav > li > a:hover,
.nav > li > a:active,
.nav > li > a:focus {
- color: #444;
- background: #f7f7f7;
+ color: #444;
+ background: #f7f7f7;
}
-
/* NAV PILLS */
.nav-pills > li > a {
- border-radius: 0;
- border-top: 3px solid transparent;
- color: #444;
+ border-radius: 0;
+ border-top: 3px solid transparent;
+ color: #444;
}
-
.nav-pills > li > a > .fa,
.nav-pills > li > a > .glyphicon,
.nav-pills > li > a > .ion {
- margin-right: 5px;
+ margin-right: 5px;
}
-
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
- border-top-color: #3c8dbc;
+ border-top-color: #3c8dbc;
}
-
.nav-pills > li.active > a {
- font-weight: 600;
+ font-weight: 600;
}
-
/* NAV STACKED */
.nav-stacked > li > a {
- border-radius: 0;
- border-top: 0;
- border-left: 3px solid transparent;
- color: #444;
+ border-radius: 0;
+ border-top: 0;
+ border-left: 3px solid transparent;
+ color: #444;
}
-
.nav-stacked > li.active > a,
.nav-stacked > li.active > a:hover {
- background: transparent;
- color: #444;
- border-top: 0;
- border-left-color: #3c8dbc;
+ background: transparent;
+ color: #444;
+ border-top: 0;
+ border-left-color: #3c8dbc;
}
-
.nav-stacked > li.header {
- border-bottom: 1px solid #ddd;
- color: #777;
- margin-bottom: 10px;
- padding: 5px 10px;
- text-transform: uppercase;
+ border-bottom: 1px solid #ddd;
+ color: #777;
+ margin-bottom: 10px;
+ padding: 5px 10px;
+ text-transform: uppercase;
}
-
/* NAV TABS */
.nav-tabs-custom {
- margin-bottom: 20px;
- background: #fff;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- border-radius: 3px;
+ margin-bottom: 20px;
+ background: #fff;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ border-radius: 3px;
}
-
.nav-tabs-custom > .nav-tabs {
- margin: 0;
- border-bottom-color: #f4f4f4;
- border-top-right-radius: 3px;
- border-top-left-radius: 3px;
+ margin: 0;
+ border-bottom-color: #f4f4f4;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
}
-
.nav-tabs-custom > .nav-tabs > li {
- border-top: 3px solid transparent;
- margin-bottom: -2px;
- margin-right: 5px;
+ border-top: 3px solid transparent;
+ margin-bottom: -2px;
+ margin-right: 5px;
+}
+.nav-tabs-custom > .nav-tabs > li.disabled > a {
+ color: #777;
}
-
.nav-tabs-custom > .nav-tabs > li > a {
- color: #444;
- border-radius: 0;
+ color: #444;
+ border-radius: 0;
}
-
.nav-tabs-custom > .nav-tabs > li > a.text-muted {
- color: #999;
+ color: #999;
}
-
.nav-tabs-custom > .nav-tabs > li > a,
.nav-tabs-custom > .nav-tabs > li > a:hover {
- background: transparent;
- margin: 0;
+ background: transparent;
+ margin: 0;
}
-
.nav-tabs-custom > .nav-tabs > li > a:hover {
- color: #999;
+ color: #999;
}
-
.nav-tabs-custom > .nav-tabs > li:not(.active) > a:hover,
.nav-tabs-custom > .nav-tabs > li:not(.active) > a:focus,
.nav-tabs-custom > .nav-tabs > li:not(.active) > a:active {
- border-color: transparent;
+ border-color: transparent;
}
-
.nav-tabs-custom > .nav-tabs > li.active {
- border-top-color: #3c8dbc;
+ border-top-color: #3c8dbc;
}
-
.nav-tabs-custom > .nav-tabs > li.active > a,
.nav-tabs-custom > .nav-tabs > li.active:hover > a {
- background-color: #fff;
- color: #444;
+ background-color: #fff;
+ color: #444;
}
-
.nav-tabs-custom > .nav-tabs > li.active > a {
- border-top-color: transparent;
- border-left-color: #f4f4f4;
- border-right-color: #f4f4f4;
+ border-top-color: transparent;
+ border-left-color: #f4f4f4;
+ border-right-color: #f4f4f4;
}
-
.nav-tabs-custom > .nav-tabs > li:first-of-type {
- margin-left: 0;
+ margin-left: 0;
}
-
.nav-tabs-custom > .nav-tabs > li:first-of-type.active > a {
- border-left-color: transparent;
+ border-left-color: transparent;
}
-
.nav-tabs-custom > .nav-tabs.pull-right {
- float: none !important;
+ float: none !important;
}
-
.nav-tabs-custom > .nav-tabs.pull-right > li {
- float: right;
+ float: right;
}
-
.nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type {
- margin-right: 0;
+ margin-right: 0;
}
-
.nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type > a {
- border-left-width: 1px;
+ border-left-width: 1px;
}
-
.nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type.active > a {
- border-left-color: #f4f4f4;
- border-right-color: transparent;
+ border-left-color: #f4f4f4;
+ border-right-color: transparent;
}
-
.nav-tabs-custom > .nav-tabs > li.header {
- line-height: 35px;
- padding: 0 10px;
- font-size: 20px;
- color: #444;
+ line-height: 35px;
+ padding: 0 10px;
+ font-size: 20px;
+ color: #444;
}
-
.nav-tabs-custom > .nav-tabs > li.header > .fa,
.nav-tabs-custom > .nav-tabs > li.header > .glyphicon,
.nav-tabs-custom > .nav-tabs > li.header > .ion {
- margin-right: 5px;
+ margin-right: 5px;
}
-
.nav-tabs-custom > .tab-content {
- background: #fff;
- padding: 10px;
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
+ background: #fff;
+ padding: 10px;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
}
-
.nav-tabs-custom .dropdown.open > a:active,
.nav-tabs-custom .dropdown.open > a:focus {
- background: transparent;
- color: #999;
+ background: transparent;
+ color: #999;
}
-
.nav-tabs-custom.tab-primary > .nav-tabs > li.active {
- border-top-color: #3c8dbc;
+ border-top-color: #3c8dbc;
}
-
.nav-tabs-custom.tab-info > .nav-tabs > li.active {
- border-top-color: #00c0ef;
+ border-top-color: #00c0ef;
}
-
.nav-tabs-custom.tab-danger > .nav-tabs > li.active {
- border-top-color: #dd4b39;
+ border-top-color: #dd4b39;
}
-
.nav-tabs-custom.tab-warning > .nav-tabs > li.active {
- border-top-color: #f39c12;
+ border-top-color: #f39c12;
}
-
.nav-tabs-custom.tab-success > .nav-tabs > li.active {
- border-top-color: #00a65a;
+ border-top-color: #00a65a;
}
-
.nav-tabs-custom.tab-default > .nav-tabs > li.active {
- border-top-color: #d2d6de;
+ border-top-color: #d2d6de;
}
-
/* PAGINATION */
.pagination > li > a {
- background: #fafafa;
- color: #666;
+ background: #fafafa;
+ color: #666;
}
-
.pagination.pagination-flat > li > a {
- border-radius: 0 !important;
+ border-radius: 0 !important;
}
-
/*
* Component: Products List
* ------------------------
*/
.products-list {
- list-style: none;
- margin: 0;
- padding: 0;
+ list-style: none;
+ margin: 0;
+ padding: 0;
}
-
.products-list > .item {
- border-radius: 3px;
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- padding: 10px 0;
- background: #fff;
+ border-radius: 3px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ padding: 10px 0;
+ background: #fff;
}
-
.products-list > .item:before,
.products-list > .item:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.products-list > .item:after {
- clear: both;
+ clear: both;
+}
+.products-list > .item:before,
+.products-list > .item:after {
+ content: " ";
+ display: table;
+}
+.products-list > .item:after {
+ clear: both;
}
-
.products-list .product-img {
- float: left;
+ float: left;
}
-
.products-list .product-img img {
- width: 50px;
- height: 50px;
+ width: 50px;
+ height: 50px;
}
-
.products-list .product-info {
- margin-left: 60px;
+ margin-left: 60px;
}
-
.products-list .product-title {
- font-weight: 600;
+ font-weight: 600;
}
-
.products-list .product-description {
- display: block;
- color: #999;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
+ display: block;
+ color: #999;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
-
.product-list-in-box > .item {
- -webkit-box-shadow: none;
- box-shadow: none;
- border-radius: 0;
- border-bottom: 1px solid #f4f4f4;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ border-radius: 0;
+ border-bottom: 1px solid #f4f4f4;
}
-
.product-list-in-box > .item:last-of-type {
- border-bottom-width: 0;
+ border-bottom-width: 0;
}
-
/*
* Component: Table
* ----------------
@@ -3173,1841 +2801,2125 @@ a:focus {
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
- border-top: 1px solid #f4f4f4;
+ border-top: 1px solid #f4f4f4;
}
-
.table > thead > tr > th {
- border-bottom: 2px solid #f4f4f4;
+ border-bottom: 2px solid #f4f4f4;
}
-
.table tr td .progress {
- margin-top: 5px;
+ margin-top: 5px;
}
-
.table-bordered {
- border: 1px solid #f4f4f4;
+ border: 1px solid #f4f4f4;
}
-
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
- border: 1px solid #f4f4f4;
+ border: 1px solid #f4f4f4;
}
-
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
- border-bottom-width: 2px;
+ border-bottom-width: 2px;
}
-
.table.no-border,
.table.no-border td,
.table.no-border th {
- border: 0;
+ border: 0;
}
-
/* .text-center in tables */
table.text-center,
table.text-center td,
table.text-center th {
- text-align: center;
+ text-align: center;
}
-
.table.align th {
- text-align: left;
+ text-align: left;
}
-
.table.align td {
- text-align: right;
+ text-align: right;
}
-
/*
* Component: Label
* ----------------
*/
.label-default {
- background-color: #d2d6de;
- color: #444;
+ background-color: #d2d6de;
+ color: #444;
}
-
/*
* Component: Direct Chat
* ----------------------
*/
.direct-chat .box-body {
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- position: relative;
- overflow-x: hidden;
- padding: 0;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ position: relative;
+ overflow-x: hidden;
+ padding: 0;
}
-
.direct-chat.chat-pane-open .direct-chat-contacts {
- -webkit-transform: translate(0, 0);
- -ms-transform: translate(0, 0);
- -o-transform: translate(0, 0);
- transform: translate(0, 0);
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ -o-transform: translate(0, 0);
+ transform: translate(0, 0);
}
-
.direct-chat-messages {
- -webkit-transform: translate(0, 0);
- -ms-transform: translate(0, 0);
- -o-transform: translate(0, 0);
- transform: translate(0, 0);
- padding: 10px;
- height: 250px;
- overflow: auto;
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ -o-transform: translate(0, 0);
+ transform: translate(0, 0);
+ padding: 10px;
+ height: 250px;
+ overflow: auto;
}
-
.direct-chat-msg,
.direct-chat-text {
- display: block;
+ display: block;
}
-
.direct-chat-msg {
- margin-bottom: 10px;
+ margin-bottom: 10px;
}
-
.direct-chat-msg:before,
.direct-chat-msg:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.direct-chat-msg:after {
- clear: both;
+ clear: both;
+}
+.direct-chat-msg:before,
+.direct-chat-msg:after {
+ content: " ";
+ display: table;
+}
+.direct-chat-msg:after {
+ clear: both;
}
-
.direct-chat-messages,
.direct-chat-contacts {
- -webkit-transition: -webkit-transform 0.5s ease-in-out;
- -moz-transition: -moz-transform 0.5s ease-in-out;
- -o-transition: -o-transform 0.5s ease-in-out;
- transition: transform 0.5s ease-in-out;
+ -webkit-transition: -webkit-transform 0.5s ease-in-out;
+ -moz-transition: -moz-transform 0.5s ease-in-out;
+ -o-transition: -o-transform 0.5s ease-in-out;
+ transition: transform 0.5s ease-in-out;
}
-
.direct-chat-text {
- border-radius: 5px;
- position: relative;
- padding: 5px 10px;
- background: #d2d6de;
- border: 1px solid #d2d6de;
- margin: 5px 0 0 50px;
- color: #444444;
+ border-radius: 5px;
+ position: relative;
+ padding: 5px 10px;
+ background: #d2d6de;
+ border: 1px solid #d2d6de;
+ margin: 5px 0 0 50px;
+ color: #444444;
}
-
.direct-chat-text:after,
.direct-chat-text:before {
- position: absolute;
- right: 100%;
- top: 15px;
- border: solid transparent;
- border-right-color: #d2d6de;
- content: ' ';
- height: 0;
- width: 0;
- pointer-events: none;
+ position: absolute;
+ right: 100%;
+ top: 15px;
+ border: solid transparent;
+ border-right-color: #d2d6de;
+ content: ' ';
+ height: 0;
+ width: 0;
+ pointer-events: none;
}
-
.direct-chat-text:after {
- border-width: 5px;
- margin-top: -5px;
+ border-width: 5px;
+ margin-top: -5px;
}
-
.direct-chat-text:before {
- border-width: 6px;
- margin-top: -6px;
+ border-width: 6px;
+ margin-top: -6px;
}
-
.right .direct-chat-text {
- margin-right: 50px;
- margin-left: 0;
+ margin-right: 50px;
+ margin-left: 0;
}
-
.right .direct-chat-text:after,
.right .direct-chat-text:before {
- right: auto;
- left: 100%;
- border-right-color: transparent;
- border-left-color: #d2d6de;
+ right: auto;
+ left: 100%;
+ border-right-color: transparent;
+ border-left-color: #d2d6de;
}
-
.direct-chat-img {
- border-radius: 50%;
- float: left;
- width: 40px;
- height: 40px;
+ border-radius: 50%;
+ float: left;
+ width: 40px;
+ height: 40px;
}
-
.right .direct-chat-img {
- float: right;
+ float: right;
}
-
.direct-chat-info {
- display: block;
- margin-bottom: 2px;
- font-size: 12px;
+ display: block;
+ margin-bottom: 2px;
+ font-size: 12px;
}
-
.direct-chat-name {
- font-weight: 600;
+ font-weight: 600;
}
-
.direct-chat-timestamp {
- color: #999;
+ color: #999;
}
-
.direct-chat-contacts-open .direct-chat-contacts {
- -webkit-transform: translate(0, 0);
- -ms-transform: translate(0, 0);
- -o-transform: translate(0, 0);
- transform: translate(0, 0);
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ -o-transform: translate(0, 0);
+ transform: translate(0, 0);
}
-
.direct-chat-contacts {
- -webkit-transform: translate(101%, 0);
- -ms-transform: translate(101%, 0);
- -o-transform: translate(101%, 0);
- transform: translate(101%, 0);
- position: absolute;
- top: 0;
- bottom: 0;
- height: 250px;
- width: 100%;
- background: #222d32;
- color: #fff;
- overflow: auto;
+ -webkit-transform: translate(101%, 0);
+ -ms-transform: translate(101%, 0);
+ -o-transform: translate(101%, 0);
+ transform: translate(101%, 0);
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ height: 250px;
+ width: 100%;
+ background: #222d32;
+ color: #fff;
+ overflow: auto;
}
-
.contacts-list > li {
- border-bottom: 1px solid rgba(0, 0, 0, 0.2);
- padding: 10px;
- margin: 0;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.2);
+ padding: 10px;
+ margin: 0;
}
-
.contacts-list > li:before,
.contacts-list > li:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.contacts-list > li:after {
- clear: both;
+ clear: both;
+}
+.contacts-list > li:before,
+.contacts-list > li:after {
+ content: " ";
+ display: table;
+}
+.contacts-list > li:after {
+ clear: both;
}
-
.contacts-list > li:last-of-type {
- border-bottom: none;
+ border-bottom: none;
}
-
.contacts-list-img {
- border-radius: 50%;
- width: 40px;
- float: left;
+ border-radius: 50%;
+ width: 40px;
+ float: left;
}
-
.contacts-list-info {
- margin-left: 45px;
- color: #fff;
+ margin-left: 45px;
+ color: #fff;
}
-
.contacts-list-name,
.contacts-list-status {
- display: block;
+ display: block;
}
-
.contacts-list-name {
- font-weight: 600;
+ font-weight: 600;
}
-
.contacts-list-status {
- font-size: 12px;
+ font-size: 12px;
}
-
.contacts-list-date {
- color: #aaa;
- font-weight: normal;
+ color: #aaa;
+ font-weight: normal;
}
-
.contacts-list-msg {
- color: #999;
+ color: #999;
}
-
.direct-chat-danger .right > .direct-chat-text {
- background: #dd4b39;
- border-color: #dd4b39;
- color: #ffffff;
+ background: #dd4b39;
+ border-color: #dd4b39;
+ color: #ffffff;
}
-
.direct-chat-danger .right > .direct-chat-text:after,
.direct-chat-danger .right > .direct-chat-text:before {
- border-left-color: #dd4b39;
+ border-left-color: #dd4b39;
}
-
.direct-chat-primary .right > .direct-chat-text {
- background: #3c8dbc;
- border-color: #3c8dbc;
- color: #ffffff;
+ background: #3c8dbc;
+ border-color: #3c8dbc;
+ color: #ffffff;
}
-
.direct-chat-primary .right > .direct-chat-text:after,
.direct-chat-primary .right > .direct-chat-text:before {
- border-left-color: #3c8dbc;
+ border-left-color: #3c8dbc;
}
-
.direct-chat-warning .right > .direct-chat-text {
- background: #f39c12;
- border-color: #f39c12;
- color: #ffffff;
+ background: #f39c12;
+ border-color: #f39c12;
+ color: #ffffff;
}
-
.direct-chat-warning .right > .direct-chat-text:after,
.direct-chat-warning .right > .direct-chat-text:before {
- border-left-color: #f39c12;
+ border-left-color: #f39c12;
}
-
.direct-chat-info .right > .direct-chat-text {
- background: #00c0ef;
- border-color: #00c0ef;
- color: #ffffff;
+ background: #00c0ef;
+ border-color: #00c0ef;
+ color: #ffffff;
}
-
.direct-chat-info .right > .direct-chat-text:after,
.direct-chat-info .right > .direct-chat-text:before {
- border-left-color: #00c0ef;
+ border-left-color: #00c0ef;
}
-
.direct-chat-success .right > .direct-chat-text {
- background: #00a65a;
- border-color: #00a65a;
- color: #ffffff;
+ background: #00a65a;
+ border-color: #00a65a;
+ color: #ffffff;
}
-
.direct-chat-success .right > .direct-chat-text:after,
.direct-chat-success .right > .direct-chat-text:before {
- border-left-color: #00a65a;
+ border-left-color: #00a65a;
}
-
/*
* Component: Users List
* ---------------------
*/
.users-list > li {
- width: 25%;
- float: left;
- padding: 10px;
- text-align: center;
+ width: 25%;
+ float: left;
+ padding: 10px;
+ text-align: center;
}
-
.users-list > li img {
- border-radius: 50%;
- max-width: 100%;
- height: auto;
+ border-radius: 50%;
+ max-width: 100%;
+ height: auto;
}
-
.users-list > li > a:hover,
.users-list > li > a:hover .users-list-name {
- color: #999;
+ color: #999;
}
-
.users-list-name,
.users-list-date {
- display: block;
+ display: block;
}
-
.users-list-name {
- font-weight: 600;
- color: #444;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
+ font-weight: 600;
+ color: #444;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
-
.users-list-date {
- color: #999;
- font-size: 12px;
+ color: #999;
+ font-size: 12px;
}
-
/*
* Component: Carousel
* -------------------
*/
.carousel-control.left,
.carousel-control.right {
- background-image: none;
+ background-image: none;
}
-
.carousel-control > .fa {
- font-size: 40px;
- position: absolute;
- top: 50%;
- z-index: 5;
- display: inline-block;
- margin-top: -20px;
+ font-size: 40px;
+ position: absolute;
+ top: 50%;
+ z-index: 5;
+ display: inline-block;
+ margin-top: -20px;
}
-
/*
* Component: modal
* ----------------
*/
.modal {
- background: rgba(0, 0, 0, 0.3);
+ background: rgba(0, 0, 0, 0.3);
}
-
.modal-content {
- border-radius: 0;
+ border-radius: 0;
+ -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);
+ box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);
+ border: 0;
+}
+@media (min-width: 768px) {
+ .modal-content {
-webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);
- border: 0;
+ }
}
-
-@media (min-width: 768px) {
- .modal-content {
- -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);
- box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);
- }
-}
-
.modal-header {
- border-bottom-color: #f4f4f4;
+ border-bottom-color: #f4f4f4;
}
-
.modal-footer {
- border-top-color: #f4f4f4;
+ border-top-color: #f4f4f4;
}
-
.modal-primary .modal-header,
.modal-primary .modal-footer {
- border-color: #307095;
+ border-color: #307095;
}
-
.modal-warning .modal-header,
.modal-warning .modal-footer {
- border-color: #c87f0a;
+ border-color: #c87f0a;
}
-
.modal-info .modal-header,
.modal-info .modal-footer {
- border-color: #0097bc;
+ border-color: #0097bc;
}
-
.modal-success .modal-header,
.modal-success .modal-footer {
- border-color: #00733e;
+ border-color: #00733e;
}
-
.modal-danger .modal-header,
.modal-danger .modal-footer {
- border-color: #c23321;
+ border-color: #c23321;
}
-
/*
* Component: Social Widgets
* -------------------------
*/
.box-widget {
- border: none;
- position: relative;
+ border: none;
+ position: relative;
}
-
.widget-user .widget-user-header {
- padding: 20px;
- height: 120px;
- border-top-right-radius: 3px;
- border-top-left-radius: 3px;
+ padding: 20px;
+ height: 120px;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
}
-
.widget-user .widget-user-username {
- margin-top: 0;
- margin-bottom: 5px;
- font-size: 25px;
- font-weight: 300;
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ margin-top: 0;
+ margin-bottom: 5px;
+ font-size: 25px;
+ font-weight: 300;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
-
.widget-user .widget-user-desc {
- margin-top: 0;
+ margin-top: 0;
}
-
.widget-user .widget-user-image {
- position: absolute;
- top: 65px;
- left: 50%;
- margin-left: -45px;
+ position: absolute;
+ top: 65px;
+ left: 50%;
+ margin-left: -45px;
}
-
.widget-user .widget-user-image > img {
- width: 90px;
- height: auto;
- border: 3px solid #fff;
+ width: 90px;
+ height: auto;
+ border: 3px solid #fff;
}
-
.widget-user .box-footer {
- padding-top: 30px;
+ padding-top: 30px;
}
-
.widget-user-2 .widget-user-header {
- padding: 20px;
- border-top-right-radius: 3px;
- border-top-left-radius: 3px;
+ padding: 20px;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
}
-
.widget-user-2 .widget-user-username {
- margin-top: 5px;
- margin-bottom: 5px;
- font-size: 25px;
- font-weight: 300;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ font-size: 25px;
+ font-weight: 300;
}
-
.widget-user-2 .widget-user-desc {
- margin-top: 0;
+ margin-top: 0;
}
-
.widget-user-2 .widget-user-username,
.widget-user-2 .widget-user-desc {
- margin-left: 75px;
+ margin-left: 75px;
}
-
.widget-user-2 .widget-user-image > img {
- width: 65px;
- height: auto;
- float: left;
+ width: 65px;
+ height: auto;
+ float: left;
+}
+.treeview-menu {
+ display: none;
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ padding-left: 5px;
+}
+.treeview-menu .treeview-menu {
+ padding-left: 20px;
+}
+.treeview-menu > li {
+ margin: 0;
+}
+.treeview-menu > li > a {
+ padding: 5px 5px 5px 15px;
+ display: block;
+ font-size: 14px;
+}
+.treeview-menu > li > a > .fa,
+.treeview-menu > li > a > .glyphicon,
+.treeview-menu > li > a > .ion {
+ width: 20px;
+}
+.treeview-menu > li > a > .pull-right-container > .fa-angle-left,
+.treeview-menu > li > a > .pull-right-container > .fa-angle-down,
+.treeview-menu > li > a > .fa-angle-left,
+.treeview-menu > li > a > .fa-angle-down {
+ width: auto;
}
-
/*
* Page: Mailbox
* -------------
*/
.mailbox-messages > .table {
- margin: 0;
+ margin: 0;
}
-
.mailbox-controls {
- padding: 5px;
+ padding: 5px;
}
-
.mailbox-controls.with-border {
- border-bottom: 1px solid #f4f4f4;
+ border-bottom: 1px solid #f4f4f4;
}
-
.mailbox-read-info {
- border-bottom: 1px solid #f4f4f4;
- padding: 10px;
+ border-bottom: 1px solid #f4f4f4;
+ padding: 10px;
}
-
.mailbox-read-info h3 {
- font-size: 20px;
- margin: 0;
+ font-size: 20px;
+ margin: 0;
}
-
.mailbox-read-info h5 {
- margin: 0;
- padding: 5px 0 0 0;
+ margin: 0;
+ padding: 5px 0 0 0;
}
-
.mailbox-read-time {
- color: #999;
- font-size: 13px;
+ color: #999;
+ font-size: 13px;
}
-
.mailbox-read-message {
- padding: 10px;
+ padding: 10px;
}
-
.mailbox-attachments li {
- float: left;
- width: 200px;
- border: 1px solid #eee;
- margin-bottom: 10px;
- margin-right: 10px;
+ float: left;
+ width: 200px;
+ border: 1px solid #eee;
+ margin-bottom: 10px;
+ margin-right: 10px;
}
-
.mailbox-attachment-name {
- font-weight: bold;
- color: #666;
+ font-weight: bold;
+ color: #666;
}
-
.mailbox-attachment-icon,
.mailbox-attachment-info,
.mailbox-attachment-size {
- display: block;
+ display: block;
}
-
.mailbox-attachment-info {
- padding: 10px;
- background: #f4f4f4;
+ padding: 10px;
+ background: #f4f4f4;
}
-
.mailbox-attachment-size {
- color: #999;
- font-size: 12px;
+ color: #999;
+ font-size: 12px;
}
-
.mailbox-attachment-icon {
- text-align: center;
- font-size: 65px;
- color: #666;
- padding: 20px 10px;
+ text-align: center;
+ font-size: 65px;
+ color: #666;
+ padding: 20px 10px;
}
-
.mailbox-attachment-icon.has-img {
- padding: 0;
+ padding: 0;
}
-
.mailbox-attachment-icon.has-img > img {
- max-width: 100%;
- height: auto;
+ max-width: 100%;
+ height: auto;
}
-
/*
* Page: Lock Screen
* -----------------
*/
/* ADD THIS CLASS TO THE TAG */
.lockscreen {
- background: #d2d6de;
+ background: #d2d6de;
}
-
.lockscreen-logo {
- font-size: 35px;
- text-align: center;
- margin-bottom: 25px;
- font-weight: 300;
+ font-size: 35px;
+ text-align: center;
+ margin-bottom: 25px;
+ font-weight: 300;
}
-
.lockscreen-logo a {
- color: #444;
+ color: #444;
}
-
.lockscreen-wrapper {
- max-width: 400px;
- margin: 0 auto;
- margin-top: 10%;
+ max-width: 400px;
+ margin: 0 auto;
+ margin-top: 10%;
}
-
/* User name [optional] */
.lockscreen .lockscreen-name {
- text-align: center;
- font-weight: 600;
+ text-align: center;
+ font-weight: 600;
}
-
/* Will contain the image and the sign in form */
.lockscreen-item {
- border-radius: 4px;
- padding: 0;
- background: #fff;
- position: relative;
- margin: 10px auto 30px auto;
- width: 290px;
+ border-radius: 4px;
+ padding: 0;
+ background: #fff;
+ position: relative;
+ margin: 10px auto 30px auto;
+ width: 290px;
}
-
/* User image */
.lockscreen-image {
- border-radius: 50%;
- position: absolute;
- left: -10px;
- top: -25px;
- background: #fff;
- padding: 5px;
- z-index: 10;
+ border-radius: 50%;
+ position: absolute;
+ left: -10px;
+ top: -25px;
+ background: #fff;
+ padding: 5px;
+ z-index: 10;
}
-
.lockscreen-image > img {
- border-radius: 50%;
- width: 70px;
- height: 70px;
+ border-radius: 50%;
+ width: 70px;
+ height: 70px;
}
-
/* Contains the password input and the login button */
.lockscreen-credentials {
- margin-left: 70px;
+ margin-left: 70px;
}
-
.lockscreen-credentials .form-control {
- border: 0;
+ border: 0;
}
-
.lockscreen-credentials .btn {
- background-color: #fff;
- border: 0;
- padding: 0 10px;
+ background-color: #fff;
+ border: 0;
+ padding: 0 10px;
}
-
.lockscreen-footer {
- margin-top: 10px;
+ margin-top: 10px;
}
-
/*
* Page: Login & Register
* ----------------------
*/
.login-logo,
.register-logo {
- font-size: 35px;
- text-align: center;
- margin-bottom: 25px;
- font-weight: 300;
+ font-size: 35px;
+ text-align: center;
+ margin-bottom: 25px;
+ font-weight: 300;
}
-
.login-logo a,
.register-logo a {
- color: #444;
+ color: #444;
}
-
.login-page,
.register-page {
- background: #d2d6de;
+ background: #d2d6de;
}
-
.login-box,
.register-box {
- width: 360px;
- margin: 7% auto;
+ width: 360px;
+ margin: 7% auto;
}
-
@media (max-width: 768px) {
- .login-box,
- .register-box {
- width: 90%;
- margin-top: 20px;
- }
+ .login-box,
+ .register-box {
+ width: 90%;
+ margin-top: 20px;
+ }
}
-
.login-box-body,
.register-box-body {
- background: #fff;
- padding: 20px;
- border-top: 0;
- color: #666;
+ background: #fff;
+ padding: 20px;
+ border-top: 0;
+ color: #666;
}
-
.login-box-body .form-control-feedback,
.register-box-body .form-control-feedback {
- color: #777;
+ color: #777;
}
-
.login-box-msg,
.register-box-msg {
- margin: 0;
- text-align: center;
- padding: 0 20px 20px 20px;
+ margin: 0;
+ text-align: center;
+ padding: 0 20px 20px 20px;
}
-
.social-auth-links {
- margin: 10px 0;
+ margin: 10px 0;
}
-
/*
* Page: 400 and 500 error pages
* ------------------------------
*/
.error-page {
- width: 600px;
- margin: 20px auto 0 auto;
+ width: 600px;
+ margin: 20px auto 0 auto;
}
-
@media (max-width: 991px) {
- .error-page {
- width: 100%;
- }
+ .error-page {
+ width: 100%;
+ }
}
-
.error-page > .headline {
- float: left;
- font-size: 100px;
- font-weight: 300;
+ float: left;
+ font-size: 100px;
+ font-weight: 300;
}
-
@media (max-width: 991px) {
- .error-page > .headline {
- float: none;
- text-align: center;
- }
+ .error-page > .headline {
+ float: none;
+ text-align: center;
+ }
}
-
.error-page > .error-content {
- margin-left: 190px;
- display: block;
+ margin-left: 190px;
+ display: block;
}
-
@media (max-width: 991px) {
- .error-page > .error-content {
- margin-left: 0;
- }
+ .error-page > .error-content {
+ margin-left: 0;
+ }
}
-
.error-page > .error-content > h3 {
- font-weight: 300;
- font-size: 25px;
+ font-weight: 300;
+ font-size: 25px;
}
-
@media (max-width: 991px) {
- .error-page > .error-content > h3 {
- text-align: center;
- }
+ .error-page > .error-content > h3 {
+ text-align: center;
+ }
}
-
/*
* Page: Invoice
* -------------
*/
.invoice {
- position: relative;
- background: #fff;
- border: 1px solid #f4f4f4;
- padding: 20px;
- margin: 10px 25px;
+ position: relative;
+ background: #fff;
+ border: 1px solid #f4f4f4;
+ padding: 20px;
+ margin: 10px 25px;
}
-
.invoice-title {
- margin-top: 0;
+ margin-top: 0;
}
-
/*
* Page: Profile
* -------------
*/
.profile-user-img {
- margin: 0 auto;
- width: 100px;
- padding: 3px;
- border: 3px solid #d2d6de;
+ margin: 0 auto;
+ width: 100px;
+ padding: 3px;
+ border: 3px solid #d2d6de;
}
-
.profile-username {
- font-size: 21px;
- margin-top: 5px;
+ font-size: 21px;
+ margin-top: 5px;
}
-
.post {
- border-bottom: 1px solid #d2d6de;
- margin-bottom: 15px;
- padding-bottom: 15px;
- color: #666;
+ border-bottom: 1px solid #d2d6de;
+ margin-bottom: 15px;
+ padding-bottom: 15px;
+ color: #666;
}
-
.post:last-of-type {
- border-bottom: 0;
- margin-bottom: 0;
- padding-bottom: 0;
+ border-bottom: 0;
+ margin-bottom: 0;
+ padding-bottom: 0;
}
-
.post .user-block {
- margin-bottom: 15px;
+ margin-bottom: 15px;
}
-
-/*
- * Social Buttons for Bootstrap
- *
- * Copyright 2013-2015 Panayiotis Lipiridis
- * Licensed under the MIT License
- *
- * https://github.com/lipis/bootstrap-social
- */
.btn-social {
- position: relative;
- padding-left: 44px;
- text-align: left;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ position: relative;
+ padding-left: 44px;
+ text-align: left;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
-
.btn-social > :first-child {
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- width: 32px;
- line-height: 34px;
- font-size: 1.6em;
- text-align: center;
- border-right: 1px solid rgba(0, 0, 0, 0.2);
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ width: 32px;
+ line-height: 34px;
+ font-size: 1.6em;
+ text-align: center;
+ border-right: 1px solid rgba(0, 0, 0, 0.2);
}
-
.btn-social.btn-lg {
- padding-left: 61px;
+ padding-left: 61px;
}
-
.btn-social.btn-lg > :first-child {
- line-height: 45px;
- width: 45px;
- font-size: 1.8em;
+ line-height: 45px;
+ width: 45px;
+ font-size: 1.8em;
}
-
.btn-social.btn-sm {
- padding-left: 38px;
+ padding-left: 38px;
}
-
.btn-social.btn-sm > :first-child {
- line-height: 28px;
- width: 28px;
- font-size: 1.4em;
+ line-height: 28px;
+ width: 28px;
+ font-size: 1.4em;
}
-
.btn-social.btn-xs {
- padding-left: 30px;
+ padding-left: 30px;
}
-
.btn-social.btn-xs > :first-child {
- line-height: 20px;
- width: 20px;
- font-size: 1.2em;
+ line-height: 20px;
+ width: 20px;
+ font-size: 1.2em;
}
-
.btn-social-icon {
- position: relative;
- padding-left: 44px;
- text-align: left;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- height: 34px;
- width: 34px;
- padding: 0;
+ position: relative;
+ padding-left: 44px;
+ text-align: left;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ height: 34px;
+ width: 34px;
+ padding: 0;
}
-
.btn-social-icon > :first-child {
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- width: 32px;
- line-height: 34px;
- font-size: 1.6em;
- text-align: center;
- border-right: 1px solid rgba(0, 0, 0, 0.2);
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ width: 32px;
+ line-height: 34px;
+ font-size: 1.6em;
+ text-align: center;
+ border-right: 1px solid rgba(0, 0, 0, 0.2);
}
-
.btn-social-icon.btn-lg {
- padding-left: 61px;
+ padding-left: 61px;
}
-
.btn-social-icon.btn-lg > :first-child {
- line-height: 45px;
- width: 45px;
- font-size: 1.8em;
+ line-height: 45px;
+ width: 45px;
+ font-size: 1.8em;
}
-
.btn-social-icon.btn-sm {
- padding-left: 38px;
+ padding-left: 38px;
}
-
.btn-social-icon.btn-sm > :first-child {
- line-height: 28px;
- width: 28px;
- font-size: 1.4em;
+ line-height: 28px;
+ width: 28px;
+ font-size: 1.4em;
}
-
.btn-social-icon.btn-xs {
- padding-left: 30px;
+ padding-left: 30px;
}
-
.btn-social-icon.btn-xs > :first-child {
- line-height: 20px;
- width: 20px;
- font-size: 1.2em;
+ line-height: 20px;
+ width: 20px;
+ font-size: 1.2em;
}
-
.btn-social-icon > :first-child {
- border: none;
- text-align: center;
- width: 100%;
+ border: none;
+ text-align: center;
+ width: 100%;
}
-
.btn-social-icon.btn-lg {
- height: 45px;
- width: 45px;
- padding-left: 0;
- padding-right: 0;
+ height: 45px;
+ width: 45px;
+ padding-left: 0;
+ padding-right: 0;
}
-
.btn-social-icon.btn-sm {
- height: 30px;
- width: 30px;
- padding-left: 0;
- padding-right: 0;
+ height: 30px;
+ width: 30px;
+ padding-left: 0;
+ padding-right: 0;
}
-
.btn-social-icon.btn-xs {
- height: 22px;
- width: 22px;
- padding-left: 0;
- padding-right: 0;
+ height: 22px;
+ width: 22px;
+ padding-left: 0;
+ padding-right: 0;
}
-
.btn-adn {
- color: #ffffff;
- background-color: #d87a68;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #d87a68;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-adn:focus,
.btn-adn.focus {
- color: #ffffff;
- background-color: #ce563f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #ce563f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-adn:hover {
- color: #ffffff;
- background-color: #ce563f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #ce563f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-adn:active,
.btn-adn.active,
.open > .dropdown-toggle.btn-adn {
- color: #ffffff;
- background-color: #ce563f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #ce563f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-adn:active,
.btn-adn.active,
.open > .dropdown-toggle.btn-adn {
- background-image: none;
+ background-image: none;
}
-
.btn-adn .badge {
- color: #d87a68;
- background-color: #ffffff;
+ color: #d87a68;
+ background-color: #ffffff;
+}
+.btn-adn:focus,
+.btn-adn.focus {
+ color: #ffffff;
+ background-color: #ce563f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-adn:hover {
+ color: #ffffff;
+ background-color: #ce563f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-adn:active,
+.btn-adn.active,
+.open > .dropdown-toggle.btn-adn {
+ color: #ffffff;
+ background-color: #ce563f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-adn:active,
+.btn-adn.active,
+.open > .dropdown-toggle.btn-adn {
+ background-image: none;
+}
+.btn-adn .badge {
+ color: #d87a68;
+ background-color: #ffffff;
}
-
.btn-bitbucket {
- color: #ffffff;
- background-color: #205081;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #205081;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-bitbucket:focus,
.btn-bitbucket.focus {
- color: #ffffff;
- background-color: #163758;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #163758;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-bitbucket:hover {
- color: #ffffff;
- background-color: #163758;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #163758;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-bitbucket:active,
.btn-bitbucket.active,
.open > .dropdown-toggle.btn-bitbucket {
- color: #ffffff;
- background-color: #163758;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #163758;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-bitbucket:active,
.btn-bitbucket.active,
.open > .dropdown-toggle.btn-bitbucket {
- background-image: none;
+ background-image: none;
}
-
.btn-bitbucket .badge {
- color: #205081;
- background-color: #ffffff;
+ color: #205081;
+ background-color: #ffffff;
+}
+.btn-bitbucket:focus,
+.btn-bitbucket.focus {
+ color: #ffffff;
+ background-color: #163758;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-bitbucket:hover {
+ color: #ffffff;
+ background-color: #163758;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-bitbucket:active,
+.btn-bitbucket.active,
+.open > .dropdown-toggle.btn-bitbucket {
+ color: #ffffff;
+ background-color: #163758;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-bitbucket:active,
+.btn-bitbucket.active,
+.open > .dropdown-toggle.btn-bitbucket {
+ background-image: none;
+}
+.btn-bitbucket .badge {
+ color: #205081;
+ background-color: #ffffff;
}
-
.btn-dropbox {
- color: #ffffff;
- background-color: #1087dd;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #1087dd;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-dropbox:focus,
.btn-dropbox.focus {
- color: #ffffff;
- background-color: #0d6aad;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #0d6aad;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-dropbox:hover {
- color: #ffffff;
- background-color: #0d6aad;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #0d6aad;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-dropbox:active,
.btn-dropbox.active,
.open > .dropdown-toggle.btn-dropbox {
- color: #ffffff;
- background-color: #0d6aad;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #0d6aad;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-dropbox:active,
.btn-dropbox.active,
.open > .dropdown-toggle.btn-dropbox {
- background-image: none;
+ background-image: none;
}
-
.btn-dropbox .badge {
- color: #1087dd;
- background-color: #ffffff;
+ color: #1087dd;
+ background-color: #ffffff;
+}
+.btn-dropbox:focus,
+.btn-dropbox.focus {
+ color: #ffffff;
+ background-color: #0d6aad;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-dropbox:hover {
+ color: #ffffff;
+ background-color: #0d6aad;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-dropbox:active,
+.btn-dropbox.active,
+.open > .dropdown-toggle.btn-dropbox {
+ color: #ffffff;
+ background-color: #0d6aad;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-dropbox:active,
+.btn-dropbox.active,
+.open > .dropdown-toggle.btn-dropbox {
+ background-image: none;
+}
+.btn-dropbox .badge {
+ color: #1087dd;
+ background-color: #ffffff;
}
-
.btn-facebook {
- color: #ffffff;
- background-color: #3b5998;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #3b5998;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-facebook:focus,
.btn-facebook.focus {
- color: #ffffff;
- background-color: #2d4373;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2d4373;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-facebook:hover {
- color: #ffffff;
- background-color: #2d4373;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2d4373;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-facebook:active,
.btn-facebook.active,
.open > .dropdown-toggle.btn-facebook {
- color: #ffffff;
- background-color: #2d4373;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2d4373;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-facebook:active,
.btn-facebook.active,
.open > .dropdown-toggle.btn-facebook {
- background-image: none;
+ background-image: none;
}
-
.btn-facebook .badge {
- color: #3b5998;
- background-color: #ffffff;
+ color: #3b5998;
+ background-color: #ffffff;
+}
+.btn-facebook:focus,
+.btn-facebook.focus {
+ color: #ffffff;
+ background-color: #2d4373;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-facebook:hover {
+ color: #ffffff;
+ background-color: #2d4373;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-facebook:active,
+.btn-facebook.active,
+.open > .dropdown-toggle.btn-facebook {
+ color: #ffffff;
+ background-color: #2d4373;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-facebook:active,
+.btn-facebook.active,
+.open > .dropdown-toggle.btn-facebook {
+ background-image: none;
+}
+.btn-facebook .badge {
+ color: #3b5998;
+ background-color: #ffffff;
}
-
.btn-flickr {
- color: #ffffff;
- background-color: #ff0084;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #ff0084;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-flickr:focus,
.btn-flickr.focus {
- color: #ffffff;
- background-color: #cc006a;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #cc006a;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-flickr:hover {
- color: #ffffff;
- background-color: #cc006a;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #cc006a;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-flickr:active,
.btn-flickr.active,
.open > .dropdown-toggle.btn-flickr {
- color: #ffffff;
- background-color: #cc006a;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #cc006a;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-flickr:active,
.btn-flickr.active,
.open > .dropdown-toggle.btn-flickr {
- background-image: none;
+ background-image: none;
}
-
.btn-flickr .badge {
- color: #ff0084;
- background-color: #ffffff;
+ color: #ff0084;
+ background-color: #ffffff;
+}
+.btn-flickr:focus,
+.btn-flickr.focus {
+ color: #ffffff;
+ background-color: #cc006a;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-flickr:hover {
+ color: #ffffff;
+ background-color: #cc006a;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-flickr:active,
+.btn-flickr.active,
+.open > .dropdown-toggle.btn-flickr {
+ color: #ffffff;
+ background-color: #cc006a;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-flickr:active,
+.btn-flickr.active,
+.open > .dropdown-toggle.btn-flickr {
+ background-image: none;
+}
+.btn-flickr .badge {
+ color: #ff0084;
+ background-color: #ffffff;
}
-
.btn-foursquare {
- color: #ffffff;
- background-color: #f94877;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #f94877;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-foursquare:focus,
.btn-foursquare.focus {
- color: #ffffff;
- background-color: #f71752;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #f71752;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-foursquare:hover {
- color: #ffffff;
- background-color: #f71752;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #f71752;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-foursquare:active,
.btn-foursquare.active,
.open > .dropdown-toggle.btn-foursquare {
- color: #ffffff;
- background-color: #f71752;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #f71752;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-foursquare:active,
.btn-foursquare.active,
.open > .dropdown-toggle.btn-foursquare {
- background-image: none;
+ background-image: none;
}
-
.btn-foursquare .badge {
- color: #f94877;
- background-color: #ffffff;
+ color: #f94877;
+ background-color: #ffffff;
+}
+.btn-foursquare:focus,
+.btn-foursquare.focus {
+ color: #ffffff;
+ background-color: #f71752;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-foursquare:hover {
+ color: #ffffff;
+ background-color: #f71752;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-foursquare:active,
+.btn-foursquare.active,
+.open > .dropdown-toggle.btn-foursquare {
+ color: #ffffff;
+ background-color: #f71752;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-foursquare:active,
+.btn-foursquare.active,
+.open > .dropdown-toggle.btn-foursquare {
+ background-image: none;
+}
+.btn-foursquare .badge {
+ color: #f94877;
+ background-color: #ffffff;
}
-
.btn-github {
- color: #ffffff;
- background-color: #444444;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #444444;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-github:focus,
.btn-github.focus {
- color: #ffffff;
- background-color: #2b2b2b;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2b2b2b;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-github:hover {
- color: #ffffff;
- background-color: #2b2b2b;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2b2b2b;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-github:active,
.btn-github.active,
.open > .dropdown-toggle.btn-github {
- color: #ffffff;
- background-color: #2b2b2b;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2b2b2b;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-github:active,
.btn-github.active,
.open > .dropdown-toggle.btn-github {
- background-image: none;
+ background-image: none;
}
-
.btn-github .badge {
- color: #444444;
- background-color: #ffffff;
+ color: #444444;
+ background-color: #ffffff;
+}
+.btn-github:focus,
+.btn-github.focus {
+ color: #ffffff;
+ background-color: #2b2b2b;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-github:hover {
+ color: #ffffff;
+ background-color: #2b2b2b;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-github:active,
+.btn-github.active,
+.open > .dropdown-toggle.btn-github {
+ color: #ffffff;
+ background-color: #2b2b2b;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-github:active,
+.btn-github.active,
+.open > .dropdown-toggle.btn-github {
+ background-image: none;
+}
+.btn-github .badge {
+ color: #444444;
+ background-color: #ffffff;
}
-
.btn-google {
- color: #ffffff;
- background-color: #dd4b39;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #dd4b39;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-google:focus,
.btn-google.focus {
- color: #ffffff;
- background-color: #c23321;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #c23321;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-google:hover {
- color: #ffffff;
- background-color: #c23321;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #c23321;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-google:active,
.btn-google.active,
.open > .dropdown-toggle.btn-google {
- color: #ffffff;
- background-color: #c23321;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #c23321;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-google:active,
.btn-google.active,
.open > .dropdown-toggle.btn-google {
- background-image: none;
+ background-image: none;
}
-
.btn-google .badge {
- color: #dd4b39;
- background-color: #ffffff;
+ color: #dd4b39;
+ background-color: #ffffff;
+}
+.btn-google:focus,
+.btn-google.focus {
+ color: #ffffff;
+ background-color: #c23321;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-google:hover {
+ color: #ffffff;
+ background-color: #c23321;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-google:active,
+.btn-google.active,
+.open > .dropdown-toggle.btn-google {
+ color: #ffffff;
+ background-color: #c23321;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-google:active,
+.btn-google.active,
+.open > .dropdown-toggle.btn-google {
+ background-image: none;
+}
+.btn-google .badge {
+ color: #dd4b39;
+ background-color: #ffffff;
}
-
.btn-instagram {
- color: #ffffff;
- background-color: #3f729b;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #3f729b;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-instagram:focus,
.btn-instagram.focus {
- color: #ffffff;
- background-color: #305777;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #305777;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-instagram:hover {
- color: #ffffff;
- background-color: #305777;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #305777;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-instagram:active,
.btn-instagram.active,
.open > .dropdown-toggle.btn-instagram {
- color: #ffffff;
- background-color: #305777;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #305777;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-instagram:active,
.btn-instagram.active,
.open > .dropdown-toggle.btn-instagram {
- background-image: none;
+ background-image: none;
}
-
.btn-instagram .badge {
- color: #3f729b;
- background-color: #ffffff;
+ color: #3f729b;
+ background-color: #ffffff;
+}
+.btn-instagram:focus,
+.btn-instagram.focus {
+ color: #ffffff;
+ background-color: #305777;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-instagram:hover {
+ color: #ffffff;
+ background-color: #305777;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-instagram:active,
+.btn-instagram.active,
+.open > .dropdown-toggle.btn-instagram {
+ color: #ffffff;
+ background-color: #305777;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-instagram:active,
+.btn-instagram.active,
+.open > .dropdown-toggle.btn-instagram {
+ background-image: none;
+}
+.btn-instagram .badge {
+ color: #3f729b;
+ background-color: #ffffff;
}
-
.btn-linkedin {
- color: #ffffff;
- background-color: #007bb6;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #007bb6;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-linkedin:focus,
.btn-linkedin.focus {
- color: #ffffff;
- background-color: #005983;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #005983;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-linkedin:hover {
- color: #ffffff;
- background-color: #005983;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #005983;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-linkedin:active,
.btn-linkedin.active,
.open > .dropdown-toggle.btn-linkedin {
- color: #ffffff;
- background-color: #005983;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #005983;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-linkedin:active,
.btn-linkedin.active,
.open > .dropdown-toggle.btn-linkedin {
- background-image: none;
+ background-image: none;
}
-
.btn-linkedin .badge {
- color: #007bb6;
- background-color: #ffffff;
+ color: #007bb6;
+ background-color: #ffffff;
+}
+.btn-linkedin:focus,
+.btn-linkedin.focus {
+ color: #ffffff;
+ background-color: #005983;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-linkedin:hover {
+ color: #ffffff;
+ background-color: #005983;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-linkedin:active,
+.btn-linkedin.active,
+.open > .dropdown-toggle.btn-linkedin {
+ color: #ffffff;
+ background-color: #005983;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-linkedin:active,
+.btn-linkedin.active,
+.open > .dropdown-toggle.btn-linkedin {
+ background-image: none;
+}
+.btn-linkedin .badge {
+ color: #007bb6;
+ background-color: #ffffff;
}
-
.btn-microsoft {
- color: #ffffff;
- background-color: #2672ec;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2672ec;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-microsoft:focus,
.btn-microsoft.focus {
- color: #ffffff;
- background-color: #125acd;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #125acd;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-microsoft:hover {
- color: #ffffff;
- background-color: #125acd;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #125acd;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-microsoft:active,
.btn-microsoft.active,
.open > .dropdown-toggle.btn-microsoft {
- color: #ffffff;
- background-color: #125acd;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #125acd;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-microsoft:active,
.btn-microsoft.active,
.open > .dropdown-toggle.btn-microsoft {
- background-image: none;
+ background-image: none;
}
-
.btn-microsoft .badge {
- color: #2672ec;
- background-color: #ffffff;
+ color: #2672ec;
+ background-color: #ffffff;
+}
+.btn-microsoft:focus,
+.btn-microsoft.focus {
+ color: #ffffff;
+ background-color: #125acd;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-microsoft:hover {
+ color: #ffffff;
+ background-color: #125acd;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-microsoft:active,
+.btn-microsoft.active,
+.open > .dropdown-toggle.btn-microsoft {
+ color: #ffffff;
+ background-color: #125acd;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-microsoft:active,
+.btn-microsoft.active,
+.open > .dropdown-toggle.btn-microsoft {
+ background-image: none;
+}
+.btn-microsoft .badge {
+ color: #2672ec;
+ background-color: #ffffff;
}
-
.btn-openid {
- color: #ffffff;
- background-color: #f7931e;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #f7931e;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-openid:focus,
.btn-openid.focus {
- color: #ffffff;
- background-color: #da7908;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #da7908;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-openid:hover {
- color: #ffffff;
- background-color: #da7908;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #da7908;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-openid:active,
.btn-openid.active,
.open > .dropdown-toggle.btn-openid {
- color: #ffffff;
- background-color: #da7908;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #da7908;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-openid:active,
.btn-openid.active,
.open > .dropdown-toggle.btn-openid {
- background-image: none;
+ background-image: none;
}
-
.btn-openid .badge {
- color: #f7931e;
- background-color: #ffffff;
+ color: #f7931e;
+ background-color: #ffffff;
+}
+.btn-openid:focus,
+.btn-openid.focus {
+ color: #ffffff;
+ background-color: #da7908;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-openid:hover {
+ color: #ffffff;
+ background-color: #da7908;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-openid:active,
+.btn-openid.active,
+.open > .dropdown-toggle.btn-openid {
+ color: #ffffff;
+ background-color: #da7908;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-openid:active,
+.btn-openid.active,
+.open > .dropdown-toggle.btn-openid {
+ background-image: none;
+}
+.btn-openid .badge {
+ color: #f7931e;
+ background-color: #ffffff;
}
-
.btn-pinterest {
- color: #ffffff;
- background-color: #cb2027;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #cb2027;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-pinterest:focus,
.btn-pinterest.focus {
- color: #ffffff;
- background-color: #9f191f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #9f191f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-pinterest:hover {
- color: #ffffff;
- background-color: #9f191f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #9f191f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-pinterest:active,
.btn-pinterest.active,
.open > .dropdown-toggle.btn-pinterest {
- color: #ffffff;
- background-color: #9f191f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #9f191f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-pinterest:active,
.btn-pinterest.active,
.open > .dropdown-toggle.btn-pinterest {
- background-image: none;
+ background-image: none;
}
-
.btn-pinterest .badge {
- color: #cb2027;
- background-color: #ffffff;
+ color: #cb2027;
+ background-color: #ffffff;
+}
+.btn-pinterest:focus,
+.btn-pinterest.focus {
+ color: #ffffff;
+ background-color: #9f191f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-pinterest:hover {
+ color: #ffffff;
+ background-color: #9f191f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-pinterest:active,
+.btn-pinterest.active,
+.open > .dropdown-toggle.btn-pinterest {
+ color: #ffffff;
+ background-color: #9f191f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-pinterest:active,
+.btn-pinterest.active,
+.open > .dropdown-toggle.btn-pinterest {
+ background-image: none;
+}
+.btn-pinterest .badge {
+ color: #cb2027;
+ background-color: #ffffff;
}
-
.btn-reddit {
- color: #000000;
- background-color: #eff7ff;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #000000;
+ background-color: #eff7ff;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-reddit:focus,
.btn-reddit.focus {
- color: #000000;
- background-color: #bcddff;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #000000;
+ background-color: #bcddff;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-reddit:hover {
- color: #000000;
- background-color: #bcddff;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #000000;
+ background-color: #bcddff;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-reddit:active,
.btn-reddit.active,
.open > .dropdown-toggle.btn-reddit {
- color: #000000;
- background-color: #bcddff;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #000000;
+ background-color: #bcddff;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-reddit:active,
.btn-reddit.active,
.open > .dropdown-toggle.btn-reddit {
- background-image: none;
+ background-image: none;
}
-
.btn-reddit .badge {
- color: #eff7ff;
- background-color: #000000;
+ color: #eff7ff;
+ background-color: #000000;
+}
+.btn-reddit:focus,
+.btn-reddit.focus {
+ color: #000000;
+ background-color: #bcddff;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-reddit:hover {
+ color: #000000;
+ background-color: #bcddff;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-reddit:active,
+.btn-reddit.active,
+.open > .dropdown-toggle.btn-reddit {
+ color: #000000;
+ background-color: #bcddff;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-reddit:active,
+.btn-reddit.active,
+.open > .dropdown-toggle.btn-reddit {
+ background-image: none;
+}
+.btn-reddit .badge {
+ color: #eff7ff;
+ background-color: #000000;
}
-
.btn-soundcloud {
- color: #ffffff;
- background-color: #ff5500;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #ff5500;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-soundcloud:focus,
.btn-soundcloud.focus {
- color: #ffffff;
- background-color: #cc4400;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #cc4400;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-soundcloud:hover {
- color: #ffffff;
- background-color: #cc4400;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #cc4400;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-soundcloud:active,
.btn-soundcloud.active,
.open > .dropdown-toggle.btn-soundcloud {
- color: #ffffff;
- background-color: #cc4400;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #cc4400;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-soundcloud:active,
.btn-soundcloud.active,
.open > .dropdown-toggle.btn-soundcloud {
- background-image: none;
+ background-image: none;
}
-
.btn-soundcloud .badge {
- color: #ff5500;
- background-color: #ffffff;
+ color: #ff5500;
+ background-color: #ffffff;
+}
+.btn-soundcloud:focus,
+.btn-soundcloud.focus {
+ color: #ffffff;
+ background-color: #cc4400;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-soundcloud:hover {
+ color: #ffffff;
+ background-color: #cc4400;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-soundcloud:active,
+.btn-soundcloud.active,
+.open > .dropdown-toggle.btn-soundcloud {
+ color: #ffffff;
+ background-color: #cc4400;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-soundcloud:active,
+.btn-soundcloud.active,
+.open > .dropdown-toggle.btn-soundcloud {
+ background-image: none;
+}
+.btn-soundcloud .badge {
+ color: #ff5500;
+ background-color: #ffffff;
}
-
.btn-tumblr {
- color: #ffffff;
- background-color: #2c4762;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2c4762;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-tumblr:focus,
.btn-tumblr.focus {
- color: #ffffff;
- background-color: #1c2d3f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #1c2d3f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-tumblr:hover {
- color: #ffffff;
- background-color: #1c2d3f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #1c2d3f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-tumblr:active,
.btn-tumblr.active,
.open > .dropdown-toggle.btn-tumblr {
- color: #ffffff;
- background-color: #1c2d3f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #1c2d3f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-tumblr:active,
.btn-tumblr.active,
.open > .dropdown-toggle.btn-tumblr {
- background-image: none;
+ background-image: none;
}
-
.btn-tumblr .badge {
- color: #2c4762;
- background-color: #ffffff;
+ color: #2c4762;
+ background-color: #ffffff;
+}
+.btn-tumblr:focus,
+.btn-tumblr.focus {
+ color: #ffffff;
+ background-color: #1c2d3f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-tumblr:hover {
+ color: #ffffff;
+ background-color: #1c2d3f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-tumblr:active,
+.btn-tumblr.active,
+.open > .dropdown-toggle.btn-tumblr {
+ color: #ffffff;
+ background-color: #1c2d3f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-tumblr:active,
+.btn-tumblr.active,
+.open > .dropdown-toggle.btn-tumblr {
+ background-image: none;
+}
+.btn-tumblr .badge {
+ color: #2c4762;
+ background-color: #ffffff;
}
-
.btn-twitter {
- color: #ffffff;
- background-color: #55acee;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #55acee;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-twitter:focus,
.btn-twitter.focus {
- color: #ffffff;
- background-color: #2795e9;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2795e9;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-twitter:hover {
- color: #ffffff;
- background-color: #2795e9;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2795e9;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-twitter:active,
.btn-twitter.active,
.open > .dropdown-toggle.btn-twitter {
- color: #ffffff;
- background-color: #2795e9;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #2795e9;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-twitter:active,
.btn-twitter.active,
.open > .dropdown-toggle.btn-twitter {
- background-image: none;
+ background-image: none;
}
-
.btn-twitter .badge {
- color: #55acee;
- background-color: #ffffff;
+ color: #55acee;
+ background-color: #ffffff;
+}
+.btn-twitter:focus,
+.btn-twitter.focus {
+ color: #ffffff;
+ background-color: #2795e9;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-twitter:hover {
+ color: #ffffff;
+ background-color: #2795e9;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-twitter:active,
+.btn-twitter.active,
+.open > .dropdown-toggle.btn-twitter {
+ color: #ffffff;
+ background-color: #2795e9;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-twitter:active,
+.btn-twitter.active,
+.open > .dropdown-toggle.btn-twitter {
+ background-image: none;
+}
+.btn-twitter .badge {
+ color: #55acee;
+ background-color: #ffffff;
}
-
.btn-vimeo {
- color: #ffffff;
- background-color: #1ab7ea;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #1ab7ea;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-vimeo:focus,
.btn-vimeo.focus {
- color: #ffffff;
- background-color: #1295bf;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #1295bf;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-vimeo:hover {
- color: #ffffff;
- background-color: #1295bf;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #1295bf;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-vimeo:active,
.btn-vimeo.active,
.open > .dropdown-toggle.btn-vimeo {
- color: #ffffff;
- background-color: #1295bf;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #1295bf;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-vimeo:active,
.btn-vimeo.active,
.open > .dropdown-toggle.btn-vimeo {
- background-image: none;
+ background-image: none;
}
-
.btn-vimeo .badge {
- color: #1ab7ea;
- background-color: #ffffff;
+ color: #1ab7ea;
+ background-color: #ffffff;
+}
+.btn-vimeo:focus,
+.btn-vimeo.focus {
+ color: #ffffff;
+ background-color: #1295bf;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-vimeo:hover {
+ color: #ffffff;
+ background-color: #1295bf;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-vimeo:active,
+.btn-vimeo.active,
+.open > .dropdown-toggle.btn-vimeo {
+ color: #ffffff;
+ background-color: #1295bf;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-vimeo:active,
+.btn-vimeo.active,
+.open > .dropdown-toggle.btn-vimeo {
+ background-image: none;
+}
+.btn-vimeo .badge {
+ color: #1ab7ea;
+ background-color: #ffffff;
}
-
.btn-vk {
- color: #ffffff;
- background-color: #587ea3;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #587ea3;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-vk:focus,
.btn-vk.focus {
- color: #ffffff;
- background-color: #466482;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #466482;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-vk:hover {
- color: #ffffff;
- background-color: #466482;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #466482;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-vk:active,
.btn-vk.active,
.open > .dropdown-toggle.btn-vk {
- color: #ffffff;
- background-color: #466482;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #466482;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-vk:active,
.btn-vk.active,
.open > .dropdown-toggle.btn-vk {
- background-image: none;
+ background-image: none;
}
-
.btn-vk .badge {
- color: #587ea3;
- background-color: #ffffff;
+ color: #587ea3;
+ background-color: #ffffff;
+}
+.btn-vk:focus,
+.btn-vk.focus {
+ color: #ffffff;
+ background-color: #466482;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-vk:hover {
+ color: #ffffff;
+ background-color: #466482;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-vk:active,
+.btn-vk.active,
+.open > .dropdown-toggle.btn-vk {
+ color: #ffffff;
+ background-color: #466482;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-vk:active,
+.btn-vk.active,
+.open > .dropdown-toggle.btn-vk {
+ background-image: none;
+}
+.btn-vk .badge {
+ color: #587ea3;
+ background-color: #ffffff;
}
-
.btn-yahoo {
- color: #ffffff;
- background-color: #720e9e;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #720e9e;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-yahoo:focus,
.btn-yahoo.focus {
- color: #ffffff;
- background-color: #500a6f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #500a6f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-yahoo:hover {
- color: #ffffff;
- background-color: #500a6f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #500a6f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-yahoo:active,
.btn-yahoo.active,
.open > .dropdown-toggle.btn-yahoo {
- color: #ffffff;
- background-color: #500a6f;
- border-color: rgba(0, 0, 0, 0.2);
+ color: #ffffff;
+ background-color: #500a6f;
+ border-color: rgba(0, 0, 0, 0.2);
}
-
.btn-yahoo:active,
.btn-yahoo.active,
.open > .dropdown-toggle.btn-yahoo {
- background-image: none;
+ background-image: none;
}
-
.btn-yahoo .badge {
- color: #720e9e;
- background-color: #ffffff;
+ color: #720e9e;
+ background-color: #ffffff;
+}
+.btn-yahoo:focus,
+.btn-yahoo.focus {
+ color: #ffffff;
+ background-color: #500a6f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-yahoo:hover {
+ color: #ffffff;
+ background-color: #500a6f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-yahoo:active,
+.btn-yahoo.active,
+.open > .dropdown-toggle.btn-yahoo {
+ color: #ffffff;
+ background-color: #500a6f;
+ border-color: rgba(0, 0, 0, 0.2);
+}
+.btn-yahoo:active,
+.btn-yahoo.active,
+.open > .dropdown-toggle.btn-yahoo {
+ background-image: none;
+}
+.btn-yahoo .badge {
+ color: #720e9e;
+ background-color: #ffffff;
}
-
/*
* Plugin: Full Calendar
* ---------------------
*/
.fc-button {
- background: #f4f4f4;
- background-image: none;
- color: #444;
- border-color: #ddd;
- border-bottom-color: #ddd;
+ background: #f4f4f4;
+ background-image: none;
+ color: #444;
+ border-color: #ddd;
+ border-bottom-color: #ddd;
}
-
.fc-button:hover,
.fc-button:active,
.fc-button.hover {
- background-color: #e9e9e9;
+ background-color: #e9e9e9;
}
-
.fc-header-title h2 {
- font-size: 15px;
- line-height: 1.6em;
- color: #666;
- margin-left: 10px;
+ font-size: 15px;
+ line-height: 1.6em;
+ color: #666;
+ margin-left: 10px;
}
-
.fc-header-right {
- padding-right: 10px;
+ padding-right: 10px;
}
-
.fc-header-left {
- padding-left: 10px;
+ padding-left: 10px;
}
-
.fc-widget-header {
- background: #fafafa;
+ background: #fafafa;
}
-
.fc-grid {
- width: 100%;
- border: 0;
+ width: 100%;
+ border: 0;
}
-
.fc-widget-header:first-of-type,
.fc-widget-content:first-of-type {
- border-left: 0;
- border-right: 0;
+ border-left: 0;
+ border-right: 0;
}
-
.fc-widget-header:last-of-type,
.fc-widget-content:last-of-type {
- border-right: 0;
+ border-right: 0;
}
-
.fc-toolbar {
- padding: 10px;
- margin: 0;
+ padding: 10px;
+ margin: 0;
}
-
.fc-day-number {
- font-size: 20px;
- font-weight: 300;
- padding-right: 10px;
+ font-size: 20px;
+ font-weight: 300;
+ padding-right: 10px;
}
-
.fc-color-picker {
- list-style: none;
- margin: 0;
- padding: 0;
+ list-style: none;
+ margin: 0;
+ padding: 0;
}
-
.fc-color-picker > li {
- float: left;
- font-size: 30px;
- margin-right: 5px;
- line-height: 30px;
+ float: left;
+ font-size: 30px;
+ margin-right: 5px;
+ line-height: 30px;
}
-
.fc-color-picker > li .fa {
- -webkit-transition: -webkit-transform linear 0.3s;
- -moz-transition: -moz-transform linear 0.3s;
- -o-transition: -o-transform linear 0.3s;
- transition: transform linear 0.3s;
+ -webkit-transition: -webkit-transform linear 0.3s;
+ -moz-transition: -moz-transform linear 0.3s;
+ -o-transition: -o-transform linear 0.3s;
+ transition: transform linear 0.3s;
}
-
.fc-color-picker > li .fa:hover {
- -webkit-transform: rotate(30deg);
- -ms-transform: rotate(30deg);
- -o-transform: rotate(30deg);
- transform: rotate(30deg);
+ -webkit-transform: rotate(30deg);
+ -ms-transform: rotate(30deg);
+ -o-transform: rotate(30deg);
+ transform: rotate(30deg);
}
-
#add-new-event {
- -webkit-transition: all linear 0.3s;
- -o-transition: all linear 0.3s;
- transition: all linear 0.3s;
+ -webkit-transition: all linear 0.3s;
+ -o-transition: all linear 0.3s;
+ transition: all linear 0.3s;
}
-
.external-event {
- padding: 5px 10px;
- font-weight: bold;
- margin-bottom: 4px;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- border-radius: 3px;
- cursor: move;
+ padding: 5px 10px;
+ font-weight: bold;
+ margin-bottom: 4px;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ border-radius: 3px;
+ cursor: move;
}
-
.external-event:hover {
- box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.2);
}
-
/*
* Plugin: Select2
* ---------------
@@ -5018,164 +4930,157 @@ table.text-center th {
.select2-selection:focus,
.select2-container--default:active,
.select2-selection:active {
- outline: none;
+ outline: none;
}
-
.select2-container--default .select2-selection--single,
.select2-selection .select2-selection--single {
- border: 1px solid #d2d6de;
- border-radius: 0;
- padding: 6px 12px;
- height: 34px;
+ border: 1px solid #d2d6de;
+ border-radius: 0;
+ padding: 6px 12px;
+ height: 34px;
}
-
.select2-container--default.select2-container--open {
- border-color: #3c8dbc;
+ border-color: #3c8dbc;
}
-
.select2-dropdown {
- border: 1px solid #d2d6de;
- border-radius: 0;
+ border: 1px solid #d2d6de;
+ border-radius: 0;
}
-
.select2-container--default .select2-results__option--highlighted[aria-selected] {
- background-color: #3c8dbc;
- color: white;
+ background-color: #3c8dbc;
+ color: white;
}
-
.select2-results__option {
- padding: 6px 12px;
- user-select: none;
- -webkit-user-select: none;
+ padding: 6px 12px;
+ user-select: none;
+ -webkit-user-select: none;
}
-
.select2-container .select2-selection--single .select2-selection__rendered {
- padding-left: 0;
- padding-right: 0;
- height: auto;
- margin-top: -4px;
+ padding-left: 0;
+ padding-right: 0;
+ height: auto;
+ margin-top: -4px;
}
-
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
- padding-right: 6px;
- padding-left: 20px;
+ padding-right: 6px;
+ padding-left: 20px;
}
-
.select2-container--default .select2-selection--single .select2-selection__arrow {
- height: 28px;
- right: 3px;
+ height: 28px;
+ right: 3px;
}
-
.select2-container--default .select2-selection--single .select2-selection__arrow b {
- margin-top: 0;
+ margin-top: 0;
}
-
.select2-dropdown .select2-search__field,
.select2-search--inline .select2-search__field {
- border: 1px solid #d2d6de;
+ border: 1px solid #d2d6de;
}
-
.select2-dropdown .select2-search__field:focus,
.select2-search--inline .select2-search__field:focus {
- outline: none;
- border: 1px solid #3c8dbc;
+ outline: none;
+}
+.select2-container--default.select2-container--focus .select2-selection--multiple,
+.select2-container--default .select2-search--dropdown .select2-search__field {
+ border-color: #3c8dbc !important;
}
-
.select2-container--default .select2-results__option[aria-disabled=true] {
- color: #999;
+ color: #999;
}
-
.select2-container--default .select2-results__option[aria-selected=true] {
- background-color: #ddd;
+ background-color: #ddd;
}
-
.select2-container--default .select2-results__option[aria-selected=true],
.select2-container--default .select2-results__option[aria-selected=true]:hover {
- color: #444;
+ color: #444;
}
-
.select2-container--default .select2-selection--multiple {
- border: 1px solid #d2d6de;
- border-radius: 0;
+ border: 1px solid #d2d6de;
+ border-radius: 0;
}
-
.select2-container--default .select2-selection--multiple:focus {
- border-color: #3c8dbc;
+ border-color: #3c8dbc;
}
-
.select2-container--default.select2-container--focus .select2-selection--multiple {
- border-color: #d2d6de;
+ border-color: #d2d6de;
}
-
.select2-container--default .select2-selection--multiple .select2-selection__choice {
- background-color: #3c8dbc;
- border-color: #367fa9;
- padding: 1px 10px;
- color: #fff;
+ background-color: #3c8dbc;
+ border-color: #367fa9;
+ padding: 1px 10px;
+ color: #fff;
}
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
- margin-right: 5px;
- color: rgba(255, 255, 255, 0.7);
+ margin-right: 5px;
+ color: rgba(255, 255, 255, 0.7);
}
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
- color: #fff;
+ color: #fff;
}
-
.select2-container .select2-selection--single .select2-selection__rendered {
- padding-right: 10px;
+ padding-right: 10px;
+}
+.box .datepicker-inline,
+.box .datepicker-inline .datepicker-days,
+.box .datepicker-inline > table,
+.box .datepicker-inline .datepicker-days > table {
+ width: 100%;
+}
+.box .datepicker-inline td:hover,
+.box .datepicker-inline .datepicker-days td:hover,
+.box .datepicker-inline > table td:hover,
+.box .datepicker-inline .datepicker-days > table td:hover {
+ background-color: rgba(255, 255, 255, 0.3);
+}
+.box .datepicker-inline td.day.old,
+.box .datepicker-inline .datepicker-days td.day.old,
+.box .datepicker-inline > table td.day.old,
+.box .datepicker-inline .datepicker-days > table td.day.old,
+.box .datepicker-inline td.day.new,
+.box .datepicker-inline .datepicker-days td.day.new,
+.box .datepicker-inline > table td.day.new,
+.box .datepicker-inline .datepicker-days > table td.day.new {
+ color: #777;
}
-
/*
* General: Miscellaneous
* ----------------------
*/
.pad {
- padding: 10px;
+ padding: 10px;
}
-
.margin {
- margin: 10px;
+ margin: 10px;
}
-
.margin-bottom {
- margin-bottom: 20px;
+ margin-bottom: 20px;
}
-
.margin-bottom-none {
- margin-bottom: 0;
+ margin-bottom: 0;
}
-
.margin-r-5 {
- margin-right: 5px;
+ margin-right: 5px;
}
-
.inline {
- display: inline;
+ display: inline;
}
-
.description-block {
- display: block;
- margin: 10px 0;
- text-align: center;
+ display: block;
+ margin: 10px 0;
+ text-align: center;
}
-
.description-block.margin-bottom {
- margin-bottom: 25px;
+ margin-bottom: 25px;
}
-
.description-block > .description-header {
- margin: 0;
- padding: 0;
- font-weight: 600;
- font-size: 16px;
+ margin: 0;
+ padding: 0;
+ font-weight: 600;
+ font-size: 16px;
}
-
.description-block > .description-text {
- text-transform: uppercase;
+ text-transform: uppercase;
}
-
.bg-red,
.bg-yellow,
.bg-aqua,
@@ -5235,660 +5140,549 @@ table.text-center th {
.modal-danger .modal-body,
.modal-danger .modal-header,
.modal-danger .modal-footer {
- color: #fff !important;
+ color: #fff !important;
}
-
.bg-gray {
- color: #000;
- background-color: #d2d6de !important;
+ color: #000;
+ background-color: #d2d6de !important;
}
-
.bg-gray-light {
- background-color: #f7f7f7;
+ background-color: #f7f7f7;
}
-
.bg-black {
- background-color: #111111 !important;
+ background-color: #111111 !important;
}
-
.bg-red,
.callout.callout-danger,
.alert-danger,
.alert-error,
.label-danger,
.modal-danger .modal-body {
- background-color: #dd4b39 !important;
+ background-color: #dd4b39 !important;
}
-
.bg-yellow,
.callout.callout-warning,
.alert-warning,
.label-warning,
.modal-warning .modal-body {
- background-color: #f39c12 !important;
+ background-color: #f39c12 !important;
}
-
.bg-aqua,
.callout.callout-info,
.alert-info,
.label-info,
.modal-info .modal-body {
- background-color: #00c0ef !important;
+ background-color: #00c0ef !important;
}
-
.bg-blue {
- background-color: #0073b7 !important;
+ background-color: #0073b7 !important;
}
-
.bg-light-blue,
.label-primary,
.modal-primary .modal-body {
- background-color: #3c8dbc !important;
+ background-color: #3c8dbc !important;
}
-
.bg-green,
.callout.callout-success,
.alert-success,
.label-success,
.modal-success .modal-body {
- background-color: #00a65a !important;
+ background-color: #00a65a !important;
}
-
.bg-navy {
- background-color: #001f3f !important;
+ background-color: #001f3f !important;
}
-
.bg-teal {
- background-color: #39cccc !important;
+ background-color: #39cccc !important;
}
-
.bg-olive {
- background-color: #3d9970 !important;
+ background-color: #3d9970 !important;
}
-
.bg-lime {
- background-color: #01ff70 !important;
+ background-color: #01ff70 !important;
}
-
.bg-orange {
- background-color: #ff851b !important;
+ background-color: #ff851b !important;
}
-
.bg-fuchsia {
- background-color: #f012be !important;
+ background-color: #f012be !important;
}
-
.bg-purple {
- background-color: #605ca8 !important;
+ background-color: #605ca8 !important;
}
-
.bg-maroon {
- background-color: #d81b60 !important;
+ background-color: #d81b60 !important;
}
-
.bg-gray-active {
- color: #000;
- background-color: #b5bbc8 !important;
+ color: #000;
+ background-color: #b5bbc8 !important;
}
-
.bg-black-active {
- background-color: #000000 !important;
+ background-color: #000000 !important;
}
-
.bg-red-active,
.modal-danger .modal-header,
.modal-danger .modal-footer {
- background-color: #d33724 !important;
+ background-color: #d33724 !important;
}
-
.bg-yellow-active,
.modal-warning .modal-header,
.modal-warning .modal-footer {
- background-color: #db8b0b !important;
+ background-color: #db8b0b !important;
}
-
.bg-aqua-active,
.modal-info .modal-header,
.modal-info .modal-footer {
- background-color: #00a7d0 !important;
+ background-color: #00a7d0 !important;
}
-
.bg-blue-active {
- background-color: #005384 !important;
+ background-color: #005384 !important;
}
-
.bg-light-blue-active,
.modal-primary .modal-header,
.modal-primary .modal-footer {
- background-color: #357ca5 !important;
+ background-color: #357ca5 !important;
}
-
.bg-green-active,
.modal-success .modal-header,
.modal-success .modal-footer {
- background-color: #008d4c !important;
+ background-color: #008d4c !important;
}
-
.bg-navy-active {
- background-color: #001a35 !important;
+ background-color: #001a35 !important;
}
-
.bg-teal-active {
- background-color: #30bbbb !important;
+ background-color: #30bbbb !important;
}
-
.bg-olive-active {
- background-color: #368763 !important;
+ background-color: #368763 !important;
}
-
.bg-lime-active {
- background-color: #00e765 !important;
+ background-color: #00e765 !important;
}
-
.bg-orange-active {
- background-color: #ff7701 !important;
+ background-color: #ff7701 !important;
}
-
.bg-fuchsia-active {
- background-color: #db0ead !important;
+ background-color: #db0ead !important;
}
-
.bg-purple-active {
- background-color: #555299 !important;
+ background-color: #555299 !important;
}
-
.bg-maroon-active {
- background-color: #ca195a !important;
+ background-color: #ca195a !important;
}
-
[class^="bg-"].disabled {
- opacity: 0.65;
- filter: alpha(opacity=65);
+ opacity: 0.65;
+ filter: alpha(opacity=65);
}
-
.text-red {
- color: #dd4b39 !important;
+ color: #dd4b39 !important;
}
-
.text-yellow {
- color: #f39c12 !important;
+ color: #f39c12 !important;
}
-
.text-aqua {
- color: #00c0ef !important;
+ color: #00c0ef !important;
}
-
.text-blue {
- color: #0073b7 !important;
+ color: #0073b7 !important;
}
-
.text-black {
- color: #111111 !important;
+ color: #111111 !important;
}
-
.text-light-blue {
- color: #3c8dbc !important;
+ color: #3c8dbc !important;
}
-
.text-green {
- color: #00a65a !important;
+ color: #00a65a !important;
}
-
.text-gray {
- color: #d2d6de !important;
+ color: #d2d6de !important;
}
-
.text-navy {
- color: #001f3f !important;
+ color: #001f3f !important;
}
-
.text-teal {
- color: #39cccc !important;
+ color: #39cccc !important;
}
-
.text-olive {
- color: #3d9970 !important;
+ color: #3d9970 !important;
}
-
.text-lime {
- color: #01ff70 !important;
+ color: #01ff70 !important;
}
-
.text-orange {
- color: #ff851b !important;
+ color: #ff851b !important;
}
-
.text-fuchsia {
- color: #f012be !important;
+ color: #f012be !important;
}
-
.text-purple {
- color: #605ca8 !important;
+ color: #605ca8 !important;
}
-
.text-maroon {
- color: #d81b60 !important;
+ color: #d81b60 !important;
}
-
.link-muted {
- color: #7a869d;
+ color: #7a869d;
}
-
.link-muted:hover,
.link-muted:focus {
- color: #606c84;
+ color: #606c84;
}
-
.link-black {
- color: #666;
+ color: #666;
}
-
.link-black:hover,
.link-black:focus {
- color: #999;
+ color: #999;
}
-
.hide {
- display: none !important;
+ display: none !important;
}
-
.no-border {
- border: 0 !important;
+ border: 0 !important;
}
-
.no-padding {
- padding: 0 !important;
+ padding: 0 !important;
}
-
.no-margin {
- margin: 0 !important;
+ margin: 0 !important;
}
-
.no-shadow {
- box-shadow: none !important;
+ box-shadow: none !important;
}
-
.list-unstyled,
.chart-legend,
.contacts-list,
.users-list,
.mailbox-attachments {
- list-style: none;
- margin: 0;
- padding: 0;
+ list-style: none;
+ margin: 0;
+ padding: 0;
}
-
.list-group-unbordered > .list-group-item {
- border-left: 0;
- border-right: 0;
- border-radius: 0;
- padding-left: 0;
- padding-right: 0;
+ border-left: 0;
+ border-right: 0;
+ border-radius: 0;
+ padding-left: 0;
+ padding-right: 0;
}
-
.flat {
- border-radius: 0 !important;
+ border-radius: 0 !important;
}
-
.text-bold,
.text-bold.table td,
.text-bold.table th {
- font-weight: 700;
+ font-weight: 700;
}
-
.text-sm {
- font-size: 12px;
+ font-size: 12px;
}
-
.jqstooltip {
- padding: 5px !important;
- width: auto !important;
- height: auto !important;
+ padding: 5px !important;
+ width: auto !important;
+ height: auto !important;
}
-
.bg-teal-gradient {
- background: #39cccc !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #39cccc), color-stop(1, #7adddd)) !important;
- background: -ms-linear-gradient(bottom, #39cccc, #7adddd) !important;
- background: -moz-linear-gradient(center bottom, #39cccc 0%, #7adddd 100%) !important;
- background: -o-linear-gradient(#7adddd, #39cccc) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7adddd', endColorstr='#39cccc', GradientType=0) !important;
- color: #fff;
+ background: #39cccc !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #39cccc), color-stop(1, #7adddd)) !important;
+ background: -ms-linear-gradient(bottom, #39cccc, #7adddd) !important;
+ background: -moz-linear-gradient(center bottom, #39cccc 0%, #7adddd 100%) !important;
+ background: -o-linear-gradient(#7adddd, #39cccc) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7adddd', endColorstr='#39cccc', GradientType=0) !important;
+ color: #fff;
}
-
.bg-light-blue-gradient {
- background: #3c8dbc !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3c8dbc), color-stop(1, #67a8ce)) !important;
- background: -ms-linear-gradient(bottom, #3c8dbc, #67a8ce) !important;
- background: -moz-linear-gradient(center bottom, #3c8dbc 0%, #67a8ce 100%) !important;
- background: -o-linear-gradient(#67a8ce, #3c8dbc) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#67a8ce', endColorstr='#3c8dbc', GradientType=0) !important;
- color: #fff;
+ background: #3c8dbc !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3c8dbc), color-stop(1, #67a8ce)) !important;
+ background: -ms-linear-gradient(bottom, #3c8dbc, #67a8ce) !important;
+ background: -moz-linear-gradient(center bottom, #3c8dbc 0%, #67a8ce 100%) !important;
+ background: -o-linear-gradient(#67a8ce, #3c8dbc) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#67a8ce', endColorstr='#3c8dbc', GradientType=0) !important;
+ color: #fff;
}
-
.bg-blue-gradient {
- background: #0073b7 !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #0073b7), color-stop(1, #0089db)) !important;
- background: -ms-linear-gradient(bottom, #0073b7, #0089db) !important;
- background: -moz-linear-gradient(center bottom, #0073b7 0%, #0089db 100%) !important;
- background: -o-linear-gradient(#0089db, #0073b7) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0089db', endColorstr='#0073b7', GradientType=0) !important;
- color: #fff;
+ background: #0073b7 !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #0073b7), color-stop(1, #0089db)) !important;
+ background: -ms-linear-gradient(bottom, #0073b7, #0089db) !important;
+ background: -moz-linear-gradient(center bottom, #0073b7 0%, #0089db 100%) !important;
+ background: -o-linear-gradient(#0089db, #0073b7) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0089db', endColorstr='#0073b7', GradientType=0) !important;
+ color: #fff;
}
-
.bg-aqua-gradient {
- background: #00c0ef !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #00c0ef), color-stop(1, #14d1ff)) !important;
- background: -ms-linear-gradient(bottom, #00c0ef, #14d1ff) !important;
- background: -moz-linear-gradient(center bottom, #00c0ef 0%, #14d1ff 100%) !important;
- background: -o-linear-gradient(#14d1ff, #00c0ef) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#14d1ff', endColorstr='#00c0ef', GradientType=0) !important;
- color: #fff;
+ background: #00c0ef !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #00c0ef), color-stop(1, #14d1ff)) !important;
+ background: -ms-linear-gradient(bottom, #00c0ef, #14d1ff) !important;
+ background: -moz-linear-gradient(center bottom, #00c0ef 0%, #14d1ff 100%) !important;
+ background: -o-linear-gradient(#14d1ff, #00c0ef) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#14d1ff', endColorstr='#00c0ef', GradientType=0) !important;
+ color: #fff;
}
-
.bg-yellow-gradient {
- background: #f39c12 !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f39c12), color-stop(1, #f7bc60)) !important;
- background: -ms-linear-gradient(bottom, #f39c12, #f7bc60) !important;
- background: -moz-linear-gradient(center bottom, #f39c12 0%, #f7bc60 100%) !important;
- background: -o-linear-gradient(#f7bc60, #f39c12) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7bc60', endColorstr='#f39c12', GradientType=0) !important;
- color: #fff;
+ background: #f39c12 !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f39c12), color-stop(1, #f7bc60)) !important;
+ background: -ms-linear-gradient(bottom, #f39c12, #f7bc60) !important;
+ background: -moz-linear-gradient(center bottom, #f39c12 0%, #f7bc60 100%) !important;
+ background: -o-linear-gradient(#f7bc60, #f39c12) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7bc60', endColorstr='#f39c12', GradientType=0) !important;
+ color: #fff;
}
-
.bg-purple-gradient {
- background: #605ca8 !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #605ca8), color-stop(1, #9491c4)) !important;
- background: -ms-linear-gradient(bottom, #605ca8, #9491c4) !important;
- background: -moz-linear-gradient(center bottom, #605ca8 0%, #9491c4 100%) !important;
- background: -o-linear-gradient(#9491c4, #605ca8) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#9491c4', endColorstr='#605ca8', GradientType=0) !important;
- color: #fff;
+ background: #605ca8 !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #605ca8), color-stop(1, #9491c4)) !important;
+ background: -ms-linear-gradient(bottom, #605ca8, #9491c4) !important;
+ background: -moz-linear-gradient(center bottom, #605ca8 0%, #9491c4 100%) !important;
+ background: -o-linear-gradient(#9491c4, #605ca8) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#9491c4', endColorstr='#605ca8', GradientType=0) !important;
+ color: #fff;
}
-
.bg-green-gradient {
- background: #00a65a !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #00a65a), color-stop(1, #00ca6d)) !important;
- background: -ms-linear-gradient(bottom, #00a65a, #00ca6d) !important;
- background: -moz-linear-gradient(center bottom, #00a65a 0%, #00ca6d 100%) !important;
- background: -o-linear-gradient(#00ca6d, #00a65a) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ca6d', endColorstr='#00a65a', GradientType=0) !important;
- color: #fff;
+ background: #00a65a !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #00a65a), color-stop(1, #00ca6d)) !important;
+ background: -ms-linear-gradient(bottom, #00a65a, #00ca6d) !important;
+ background: -moz-linear-gradient(center bottom, #00a65a 0%, #00ca6d 100%) !important;
+ background: -o-linear-gradient(#00ca6d, #00a65a) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ca6d', endColorstr='#00a65a', GradientType=0) !important;
+ color: #fff;
}
-
.bg-red-gradient {
- background: #dd4b39 !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #dd4b39), color-stop(1, #e47365)) !important;
- background: -ms-linear-gradient(bottom, #dd4b39, #e47365) !important;
- background: -moz-linear-gradient(center bottom, #dd4b39 0%, #e47365 100%) !important;
- background: -o-linear-gradient(#e47365, #dd4b39) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e47365', endColorstr='#dd4b39', GradientType=0) !important;
- color: #fff;
+ background: #dd4b39 !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #dd4b39), color-stop(1, #e47365)) !important;
+ background: -ms-linear-gradient(bottom, #dd4b39, #e47365) !important;
+ background: -moz-linear-gradient(center bottom, #dd4b39 0%, #e47365 100%) !important;
+ background: -o-linear-gradient(#e47365, #dd4b39) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e47365', endColorstr='#dd4b39', GradientType=0) !important;
+ color: #fff;
}
-
.bg-black-gradient {
- background: #111111 !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #111111), color-stop(1, #2b2b2b)) !important;
- background: -ms-linear-gradient(bottom, #111111, #2b2b2b) !important;
- background: -moz-linear-gradient(center bottom, #111111 0%, #2b2b2b 100%) !important;
- background: -o-linear-gradient(#2b2b2b, #111111) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b2b2b', endColorstr='#111111', GradientType=0) !important;
- color: #fff;
+ background: #111111 !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #111111), color-stop(1, #2b2b2b)) !important;
+ background: -ms-linear-gradient(bottom, #111111, #2b2b2b) !important;
+ background: -moz-linear-gradient(center bottom, #111111 0%, #2b2b2b 100%) !important;
+ background: -o-linear-gradient(#2b2b2b, #111111) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b2b2b', endColorstr='#111111', GradientType=0) !important;
+ color: #fff;
}
-
.bg-maroon-gradient {
- background: #d81b60 !important;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #d81b60), color-stop(1, #e73f7c)) !important;
- background: -ms-linear-gradient(bottom, #d81b60, #e73f7c) !important;
- background: -moz-linear-gradient(center bottom, #d81b60 0%, #e73f7c 100%) !important;
- background: -o-linear-gradient(#e73f7c, #d81b60) !important;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e73f7c', endColorstr='#d81b60', GradientType=0) !important;
- color: #fff;
+ background: #d81b60 !important;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #d81b60), color-stop(1, #e73f7c)) !important;
+ background: -ms-linear-gradient(bottom, #d81b60, #e73f7c) !important;
+ background: -moz-linear-gradient(center bottom, #d81b60 0%, #e73f7c 100%) !important;
+ background: -o-linear-gradient(#e73f7c, #d81b60) !important;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e73f7c', endColorstr='#d81b60', GradientType=0) !important;
+ color: #fff;
}
-
.description-block .description-icon {
- font-size: 16px;
+ font-size: 16px;
}
-
.no-pad-top {
- padding-top: 0;
+ padding-top: 0;
}
-
.position-static {
- position: static !important;
+ position: static !important;
}
-
.list-header {
- font-size: 15px;
- padding: 10px 4px;
- font-weight: bold;
- color: #666;
+ font-size: 15px;
+ padding: 10px 4px;
+ font-weight: bold;
+ color: #666;
}
-
.list-seperator {
- height: 1px;
- background: #f4f4f4;
- margin: 15px 0 9px 0;
+ height: 1px;
+ background: #f4f4f4;
+ margin: 15px 0 9px 0;
}
-
.list-link > a {
- padding: 4px;
- color: #777;
+ padding: 4px;
+ color: #777;
}
-
.list-link > a:hover {
- color: #222;
+ color: #222;
}
-
.font-light {
- font-weight: 300;
+ font-weight: 300;
}
-
.user-block:before,
.user-block:after {
- content: " ";
- display: table;
+ content: " ";
+ display: table;
}
-
.user-block:after {
- clear: both;
+ clear: both;
+}
+.user-block:before,
+.user-block:after {
+ content: " ";
+ display: table;
+}
+.user-block:after {
+ clear: both;
}
-
.user-block img {
- width: 40px;
- height: 40px;
- float: left;
+ width: 40px;
+ height: 40px;
+ float: left;
}
-
.user-block .username,
.user-block .description,
.user-block .comment {
- display: block;
- margin-left: 50px;
+ display: block;
+ margin-left: 50px;
}
-
.user-block .username {
- font-size: 16px;
- font-weight: 600;
+ font-size: 16px;
+ font-weight: 600;
}
-
.user-block .description {
- color: #999;
- font-size: 13px;
+ color: #999;
+ font-size: 13px;
}
-
.user-block.user-block-sm .username,
.user-block.user-block-sm .description,
.user-block.user-block-sm .comment {
- margin-left: 40px;
+ margin-left: 40px;
}
-
.user-block.user-block-sm .username {
- font-size: 14px;
+ font-size: 14px;
}
-
.img-sm,
.img-md,
.img-lg,
.box-comments .box-comment img,
.user-block.user-block-sm img {
- float: left;
+ float: left;
}
-
.img-sm,
.box-comments .box-comment img,
.user-block.user-block-sm img {
- width: 30px !important;
- height: 30px !important;
+ width: 30px !important;
+ height: 30px !important;
}
-
.img-sm + .img-push {
- margin-left: 40px;
+ margin-left: 40px;
}
-
.img-md {
- width: 60px;
- height: 60px;
+ width: 60px;
+ height: 60px;
}
-
.img-md + .img-push {
- margin-left: 70px;
+ margin-left: 70px;
}
-
.img-lg {
- width: 100px;
- height: 100px;
+ width: 100px;
+ height: 100px;
}
-
.img-lg + .img-push {
- margin-left: 110px;
+ margin-left: 110px;
}
-
.img-bordered {
- border: 3px solid #d2d6de;
- padding: 3px;
+ border: 3px solid #d2d6de;
+ padding: 3px;
}
-
.img-bordered-sm {
- border: 2px solid #d2d6de;
- padding: 2px;
+ border: 2px solid #d2d6de;
+ padding: 2px;
}
-
.attachment-block {
- border: 1px solid #f4f4f4;
- padding: 5px;
- margin-bottom: 10px;
- background: #f7f7f7;
+ border: 1px solid #f4f4f4;
+ padding: 5px;
+ margin-bottom: 10px;
+ background: #f7f7f7;
}
-
.attachment-block .attachment-img {
- max-width: 100px;
- max-height: 100px;
- height: auto;
- float: left;
+ max-width: 100px;
+ max-height: 100px;
+ height: auto;
+ float: left;
}
-
.attachment-block .attachment-pushed {
- margin-left: 110px;
+ margin-left: 110px;
}
-
.attachment-block .attachment-heading {
- margin: 0;
+ margin: 0;
}
-
.attachment-block .attachment-text {
- color: #555;
+ color: #555;
}
-
.connectedSortable {
- min-height: 100px;
+ min-height: 100px;
}
-
.ui-helper-hidden-accessible {
- border: 0;
- clip: rect(0 0 0 0);
- height: 1px;
- margin: -1px;
- overflow: hidden;
- padding: 0;
- position: absolute;
- width: 1px;
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
}
-
.sort-highlight {
- background: #f4f4f4;
- border: 1px dashed #ddd;
- margin-bottom: 10px;
+ background: #f4f4f4;
+ border: 1px dashed #ddd;
+ margin-bottom: 10px;
}
-
.full-opacity-hover {
- opacity: 0.65;
- filter: alpha(opacity=65);
+ opacity: 0.65;
+ filter: alpha(opacity=65);
}
-
.full-opacity-hover:hover {
- opacity: 1;
- filter: alpha(opacity=100);
+ opacity: 1;
+ filter: alpha(opacity=100);
}
-
.chart {
- position: relative;
- overflow: hidden;
- width: 100%;
+ position: relative;
+ overflow: hidden;
+ width: 100%;
}
-
.chart svg,
.chart canvas {
- width: 100% !important;
+ width: 100% !important;
}
-
/*
* Misc: print
* -----------
*/
@media print {
- .no-print,
- .main-sidebar,
- .left-side,
- .main-header,
- .content-header {
- display: none !important;
- }
-
- .content-wrapper,
- .right-side,
- .main-footer {
- margin-left: 0 !important;
- min-height: 0 !important;
- -webkit-transform: translate(0, 0) !important;
- -ms-transform: translate(0, 0) !important;
- -o-transform: translate(0, 0) !important;
- transform: translate(0, 0) !important;
- }
-
- .fixed .content-wrapper,
- .fixed .right-side {
- padding-top: 0 !important;
- }
-
- .invoice {
- width: 100%;
- border: 0;
- margin: 0;
- padding: 0;
- }
-
- .invoice-col {
- float: left;
- width: 33.3333333%;
- }
-
- .table-responsive {
- overflow: auto;
- }
-
- .table-responsive > .table tr th,
- .table-responsive > .table tr td {
- white-space: normal !important;
- }
+ .no-print,
+ .main-sidebar,
+ .left-side,
+ .main-header,
+ .content-header {
+ display: none !important;
+ }
+ .content-wrapper,
+ .right-side,
+ .main-footer {
+ margin-left: 0 !important;
+ min-height: 0 !important;
+ -webkit-transform: translate(0, 0) !important;
+ -ms-transform: translate(0, 0) !important;
+ -o-transform: translate(0, 0) !important;
+ transform: translate(0, 0) !important;
+ }
+ .fixed .content-wrapper,
+ .fixed .right-side {
+ padding-top: 0 !important;
+ }
+ .invoice {
+ width: 100%;
+ border: 0;
+ margin: 0;
+ padding: 0;
+ }
+ .invoice-col {
+ float: left;
+ width: 33.3333333%;
+ }
+ .table-responsive {
+ overflow: auto;
+ }
+ .table-responsive > .table tr th,
+ .table-responsive > .table tr td {
+ white-space: normal !important;
+ }
}
diff --git a/public/lib/adminlte/css/skins/skin-blue-light.css b/public/lib/adminlte/css/skins/skin-blue-light.css
index be502018b6..580644081b 100755
--- a/public/lib/adminlte/css/skins/skin-blue-light.css
+++ b/public/lib/adminlte/css/skins/skin-blue-light.css
@@ -3,13 +3,11 @@
* ----------
*/
.skin-blue-light .main-header .navbar {
- background-color: #3c8dbc;
+ background-color: #3c8dbc;
}
-
.skin-blue-light .main-header .navbar .nav > li > a {
- color: #ffffff;
+ color: #ffffff;
}
-
.skin-blue-light .main-header .navbar .nav > li > a:hover,
.skin-blue-light .main-header .navbar .nav > li > a:active,
.skin-blue-light .main-header .navbar .nav > li > a:focus,
@@ -17,186 +15,149 @@
.skin-blue-light .main-header .navbar .nav .open > a:hover,
.skin-blue-light .main-header .navbar .nav .open > a:focus,
.skin-blue-light .main-header .navbar .nav > .active > a {
- background: rgba(0, 0, 0, 0.1);
- color: #f6f6f6;
+ background: rgba(0, 0, 0, 0.1);
+ color: #f6f6f6;
}
-
.skin-blue-light .main-header .navbar .sidebar-toggle {
- color: #ffffff;
+ color: #ffffff;
}
-
.skin-blue-light .main-header .navbar .sidebar-toggle:hover {
- color: #f6f6f6;
- background: rgba(0, 0, 0, 0.1);
+ color: #f6f6f6;
+ background: rgba(0, 0, 0, 0.1);
}
-
.skin-blue-light .main-header .navbar .sidebar-toggle {
- color: #fff;
+ color: #fff;
}
-
.skin-blue-light .main-header .navbar .sidebar-toggle:hover {
- background-color: #367fa9;
+ background-color: #367fa9;
}
-
@media (max-width: 767px) {
- .skin-blue-light .main-header .navbar .dropdown-menu li.divider {
- background-color: rgba(255, 255, 255, 0.1);
- }
-
- .skin-blue-light .main-header .navbar .dropdown-menu li a {
- color: #fff;
- }
-
- .skin-blue-light .main-header .navbar .dropdown-menu li a:hover {
- background: #367fa9;
- }
+ .skin-blue-light .main-header .navbar .dropdown-menu li.divider {
+ background-color: rgba(255, 255, 255, 0.1);
+ }
+ .skin-blue-light .main-header .navbar .dropdown-menu li a {
+ color: #fff;
+ }
+ .skin-blue-light .main-header .navbar .dropdown-menu li a:hover {
+ background: #367fa9;
+ }
}
-
.skin-blue-light .main-header .logo {
- background-color: #3c8dbc;
- color: #ffffff;
- border-bottom: 0 solid transparent;
+ background-color: #3c8dbc;
+ color: #ffffff;
+ border-bottom: 0 solid transparent;
}
-
.skin-blue-light .main-header .logo:hover {
- background-color: #3b8ab8;
+ background-color: #3b8ab8;
}
-
.skin-blue-light .main-header li.user-header {
- background-color: #3c8dbc;
+ background-color: #3c8dbc;
}
-
.skin-blue-light .content-header {
- background: transparent;
+ background: transparent;
}
-
.skin-blue-light .wrapper,
.skin-blue-light .main-sidebar,
.skin-blue-light .left-side {
- background-color: #f9fafc;
+ background-color: #f9fafc;
}
-
-.skin-blue-light .content-wrapper,
-.skin-blue-light .main-footer {
- border-left: 1px solid #d2d6de;
+.skin-blue-light .main-sidebar {
+ border-right: 1px solid #d2d6de;
}
-
.skin-blue-light .user-panel > .info,
.skin-blue-light .user-panel > .info > a {
- color: #444444;
+ color: #444444;
}
-
.skin-blue-light .sidebar-menu > li {
- -webkit-transition: border-left-color 0.3s ease;
- -o-transition: border-left-color 0.3s ease;
- transition: border-left-color 0.3s ease;
+ -webkit-transition: border-left-color 0.3s ease;
+ -o-transition: border-left-color 0.3s ease;
+ transition: border-left-color 0.3s ease;
}
-
.skin-blue-light .sidebar-menu > li.header {
- color: #848484;
- background: #f9fafc;
+ color: #848484;
+ background: #f9fafc;
}
-
.skin-blue-light .sidebar-menu > li > a {
- border-left: 3px solid transparent;
- font-weight: 600;
+ border-left: 3px solid transparent;
+ font-weight: 600;
}
-
.skin-blue-light .sidebar-menu > li:hover > a,
.skin-blue-light .sidebar-menu > li.active > a {
- color: #000000;
- background: #f4f4f5;
+ color: #000000;
+ background: #f4f4f5;
}
-
.skin-blue-light .sidebar-menu > li.active {
- border-left-color: #3c8dbc;
+ border-left-color: #3c8dbc;
}
-
.skin-blue-light .sidebar-menu > li.active > a {
- font-weight: 600;
+ font-weight: 600;
}
-
.skin-blue-light .sidebar-menu > li > .treeview-menu {
- background: #f4f4f5;
+ background: #f4f4f5;
}
-
.skin-blue-light .sidebar a {
- color: #444444;
+ color: #444444;
}
-
.skin-blue-light .sidebar a:hover {
- text-decoration: none;
+ text-decoration: none;
}
-
-.skin-blue-light .treeview-menu > li > a {
- color: #777777;
+.skin-blue-light .sidebar-menu .treeview-menu > li > a {
+ color: #777777;
}
-
-.skin-blue-light .treeview-menu > li.active > a,
-.skin-blue-light .treeview-menu > li > a:hover {
- color: #000000;
+.skin-blue-light .sidebar-menu .treeview-menu > li.active > a,
+.skin-blue-light .sidebar-menu .treeview-menu > li > a:hover {
+ color: #000000;
}
-
-.skin-blue-light .treeview-menu > li.active > a {
- font-weight: 600;
+.skin-blue-light .sidebar-menu .treeview-menu > li.active > a {
+ font-weight: 600;
}
-
.skin-blue-light .sidebar-form {
- border-radius: 3px;
- border: 1px solid #d2d6de;
- margin: 10px 10px;
+ border-radius: 3px;
+ border: 1px solid #d2d6de;
+ margin: 10px 10px;
}
-
.skin-blue-light .sidebar-form input[type="text"],
.skin-blue-light .sidebar-form .btn {
- box-shadow: none;
- background-color: #fff;
- border: 1px solid transparent;
- height: 35px;
+ box-shadow: none;
+ background-color: #fff;
+ border: 1px solid transparent;
+ height: 35px;
}
-
.skin-blue-light .sidebar-form input[type="text"] {
- color: #666;
- border-top-left-radius: 2px;
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 2px;
+ color: #666;
+ border-top-left-radius: 2px;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 2px;
}
-
.skin-blue-light .sidebar-form input[type="text"]:focus,
.skin-blue-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
- background-color: #fff;
- color: #666;
+ background-color: #fff;
+ color: #666;
}
-
.skin-blue-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
- border-left-color: #fff;
+ border-left-color: #fff;
}
-
.skin-blue-light .sidebar-form .btn {
- color: #999;
- border-top-left-radius: 0;
- border-top-right-radius: 2px;
- border-bottom-right-radius: 2px;
- border-bottom-left-radius: 0;
+ color: #999;
+ border-top-left-radius: 0;
+ border-top-right-radius: 2px;
+ border-bottom-right-radius: 2px;
+ border-bottom-left-radius: 0;
}
-
@media (min-width: 768px) {
- .skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {
- border-left: 1px solid #d2d6de;
- }
+ .skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {
+ border-left: 1px solid #d2d6de;
+ }
}
-
.skin-blue-light .main-footer {
- border-top-color: #d2d6de;
+ border-top-color: #d2d6de;
}
-
.skin-blue.layout-top-nav .main-header > .logo {
- background-color: #3c8dbc;
- color: #ffffff;
- border-bottom: 0 solid transparent;
+ background-color: #3c8dbc;
+ color: #ffffff;
+ border-bottom: 0 solid transparent;
}
-
.skin-blue.layout-top-nav .main-header > .logo:hover {
- background-color: #3b8ab8;
+ background-color: #3b8ab8;
}
diff --git a/public/lib/adminlte/css/skins/skin-blue-light.min.css b/public/lib/adminlte/css/skins/skin-blue-light.min.css
index c41ca33fa1..033834e29f 100755
--- a/public/lib/adminlte/css/skins/skin-blue-light.min.css
+++ b/public/lib/adminlte/css/skins/skin-blue-light.min.css
@@ -1 +1 @@
-.skin-blue-light .main-header .navbar{background-color:#3c8dbc}.skin-blue-light .main-header .navbar .nav>li>a{color:#fff}.skin-blue-light .main-header .navbar .nav>li>a:hover,.skin-blue-light .main-header .navbar .nav>li>a:active,.skin-blue-light .main-header .navbar .nav>li>a:focus,.skin-blue-light .main-header .navbar .nav .open>a,.skin-blue-light .main-header .navbar .nav .open>a:hover,.skin-blue-light .main-header .navbar .nav .open>a:focus,.skin-blue-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue-light .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue-light .main-header .logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue-light .main-header .logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header li.user-header{background-color:#3c8dbc}.skin-blue-light .content-header{background:transparent}.skin-blue-light .wrapper,.skin-blue-light .main-sidebar,.skin-blue-light .left-side{background-color:#f9fafc}.skin-blue-light .content-wrapper,.skin-blue-light .main-footer{border-left:1px solid #d2d6de}.skin-blue-light .user-panel>.info,.skin-blue-light .user-panel>.info>a{color:#444}.skin-blue-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-blue-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-blue-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-blue-light .sidebar-menu>li:hover>a,.skin-blue-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-blue-light .sidebar-menu>li.active{border-left-color:#3c8dbc}.skin-blue-light .sidebar-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-blue-light .sidebar a{color:#444}.skin-blue-light .sidebar a:hover{text-decoration:none}.skin-blue-light .treeview-menu>li>a{color:#777}.skin-blue-light .treeview-menu>li.active>a,.skin-blue-light .treeview-menu>li>a:hover{color:#000}.skin-blue-light .treeview-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-blue-light .sidebar-form input[type="text"],.skin-blue-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-blue-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-blue-light .sidebar-form input[type="text"]:focus,.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-blue-light .main-footer{border-top-color:#d2d6de}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}
\ No newline at end of file
+.skin-blue-light .main-header .navbar{background-color:#3c8dbc}.skin-blue-light .main-header .navbar .nav>li>a{color:#fff}.skin-blue-light .main-header .navbar .nav>li>a:hover,.skin-blue-light .main-header .navbar .nav>li>a:active,.skin-blue-light .main-header .navbar .nav>li>a:focus,.skin-blue-light .main-header .navbar .nav .open>a,.skin-blue-light .main-header .navbar .nav .open>a:hover,.skin-blue-light .main-header .navbar .nav .open>a:focus,.skin-blue-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue-light .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue-light .main-header .logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue-light .main-header .logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header li.user-header{background-color:#3c8dbc}.skin-blue-light .content-header{background:transparent}.skin-blue-light .wrapper,.skin-blue-light .main-sidebar,.skin-blue-light .left-side{background-color:#f9fafc}.skin-blue-light .main-sidebar{border-right:1px solid #d2d6de}.skin-blue-light .user-panel>.info,.skin-blue-light .user-panel>.info>a{color:#444}.skin-blue-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-blue-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-blue-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-blue-light .sidebar-menu>li:hover>a,.skin-blue-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-blue-light .sidebar-menu>li.active{border-left-color:#3c8dbc}.skin-blue-light .sidebar-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-blue-light .sidebar a{color:#444}.skin-blue-light .sidebar a:hover{text-decoration:none}.skin-blue-light .sidebar-menu .treeview-menu>li>a{color:#777}.skin-blue-light .sidebar-menu .treeview-menu>li.active>a,.skin-blue-light .sidebar-menu .treeview-menu>li>a:hover{color:#000}.skin-blue-light .sidebar-menu .treeview-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-blue-light .sidebar-form input[type="text"],.skin-blue-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-blue-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-blue-light .sidebar-form input[type="text"]:focus,.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-blue-light .main-footer{border-top-color:#d2d6de}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}
\ No newline at end of file
diff --git a/resources/lang/de_DE/bank.php b/resources/lang/de_DE/bank.php
index c50588e153..86a0c3062b 100644
--- a/resources/lang/de_DE/bank.php
+++ b/resources/lang/de_DE/bank.php
@@ -1,6 +1,8 @@
'Voraussetzungen für einen Import von bunq',
'bunq_prerequisites_text' => 'Um aus bunq importieren zu können, benötigen Sie einen API-Schlüssel. Sie können dies über die App tun.',
-];
\ No newline at end of file
+];
diff --git a/resources/lang/de_DE/breadcrumbs.php b/resources/lang/de_DE/breadcrumbs.php
index 9e9b691b2c..5f2bf17f65 100644
--- a/resources/lang/de_DE/breadcrumbs.php
+++ b/resources/lang/de_DE/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Umsatz, Einkommen und Einlagen',
'transfer_list' => 'Überweisungen',
'transfers_list' => 'Überweisungen',
+ 'reconciliation_list' => 'Reconciliations',
'create_withdrawal' => 'Erstelle eine neue Ausgabe',
'create_deposit' => 'Erstelle ein neues Einkommen',
'create_transfer' => 'Erstelle eine neue Überweisung',
'edit_journal' => 'Bearbeite Transaktion ":description"',
+ 'edit_reconciliation' => 'Edit ":description"',
'delete_journal' => 'Lösche Transaktion ":description"',
'tags' => 'Tags',
'createTag' => 'Neuen Tag erstellen',
diff --git a/resources/lang/de_DE/csv.php b/resources/lang/de_DE/csv.php
index 804452a045..9077d9fe15 100644
--- a/resources/lang/de_DE/csv.php
+++ b/resources/lang/de_DE/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'Bestandskonto (vgl. ID in Firefly)',
'column_account-name' => 'Bestandskonto (Name)',
'column_amount' => 'Betrag',
+ 'column_amount_debet' => 'Amount (debet column)',
+ 'column_amount_credit' => 'Amount (credit column)',
'column_amount-comma-separated' => 'Betrag (Komma als Dezimaltrennzeichen)',
'column_bill-id' => 'Rechnung (ID übereinstimmend mit Firefly)',
'column_bill-name' => 'Name der Rechnung',
diff --git a/resources/lang/de_DE/demo.php b/resources/lang/de_DE/demo.php
index 19d4a1bbf5..eec5193c40 100644
--- a/resources/lang/de_DE/demo.php
+++ b/resources/lang/de_DE/demo.php
@@ -16,11 +16,11 @@ return [
'accounts-index' => 'Vermögenskonten sind Ihre persönlichen Bank-Konten. Aufwandskonten sind Konten, denen Sie Geld zahlen, z. B. Läden und Freunde. Einnahmekonten sind Konten von denen Sie Geld erhalten, z. B. Ihr Arbeitgeber und andere Einkommensquellen. Auf dieser Seite können Sie diese bearbeiten oder entfernen.',
'budgets-index' => 'Diese Seite zeigt Ihnen einen Überblick über Ihre Budgets. Die obere Leiste zeigt den Betrag, der zur Verfügung steht. Dieser kann für einen Zeitraum angepasst werden, indem Sie auf den Betrag auf der rechten Seite klicken. Wie viel bisher ausgegeben wurde wird darunter angezeigt. Darunter sind die Aufwendungen pro Haushalt und wie viel dafür veranschlagt ist.',
'reports-index-start' => 'Firefly III unterstützt vier Berichtarten. Mehr Informationen hierzu können durch ein Klick auf das Symbol in der oberen rechten Ecke aufgerufen werden.',
- 'reports-index-examples' => 'Achten Sie darauf, diese Beispiele anzusehen: eine monatliche Finanzübersicht , eine jährliche Finanzübersicht und eine Haushaltsübersicht .',
+ 'reports-index-examples' => 'Sehen Sie sich auch diese Beispiele an: eine monatliche Finanzübersicht , eine jährliche Finanzübersicht und eine Haushaltsübersicht .',
'currencies-index' => 'Firefly III unterstützt mehrere Währungen. Obwohl es den Euro standardmäßig nutzt, ist es möglich US-Dollar oder viele andere Währungen zu verwenden. Wie Sie sehen können, ist eine kleine Auswahl an Währungen aufgenommen worden, aber Sie können Ihre eigenen hinzufügen. Die Standardwährung zu ändern, wird die Währung der vorhandenen Buchungen jedoch nicht ändern: Firefly III unterstützt die Verwendung mehrerer Währungen zur gleichen Zeit.',
'transactions-index' => 'Diese Aufwendungen, Einzahlungen und Überweisungen sind nicht besonders einfallsreich. Sie wurden automatisch generiert.',
'piggy-banks-index' => 'Wie Sie sehen können, gibt es drei Sparschweine. Benutzen die Plus- und Minusknöpfe um die Menge des Geldes in den Sparschweinen zu beeinflussen. Klicken Sie auf den Namen des Sparschweins um Details einzusehen.',
- 'import-index' => 'Natürlich kann jede CSV-Datei in Firefly III importiert werden ',
+ 'import-index' => 'Natürlich kann jede CSV-Datei in Firefly III importiert werden',
'import-configure-security' => 'Aufgrund von Sicherheitsbedenken wurde der Upload mit einer lokalen Datei ersetzt.',
'import-configure-configuration' => 'Die unten stehende Konfiguration für die lokale Datei ist korrekt.',
];
diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php
index e7afb2d94c..d5590a87dc 100644
--- a/resources/lang/de_DE/firefly.php
+++ b/resources/lang/de_DE/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Unvollständige Übersetzung',
'close' => 'Schließen',
'actions' => 'Aktionen',
'edit' => 'Bearbeiten',
'delete' => 'Löschen',
'welcomeBack' => 'Was ist gerade los?',
'everything' => 'Alle',
+ 'today' => 'heute',
'customRange' => 'Individueller Bereich',
'apply' => 'Übernehmen',
'select_date' => 'Wähle ein Datum..',
@@ -71,7 +73,7 @@ return [
'destination_accounts' => 'Zielkonto',
'user_id_is' => 'Ihre Benutzerkennung ist :user ',
'field_supports_markdown' => 'Diese Feld unterstützt Abschlag .',
- 'need_more_help' => 'Wenn du Hilfe beim Bedienen von Firefly III brauchst, erstelle ein Ticket auf Github .',
+ 'need_more_help' => 'Wenn Sie Hilfe beim Bedienen von Firefly III brauchen, erstellen Sie ein Ticket auf Github .',
'reenable_intro_text' => 'Sie können auch die Einführung wieder aktivieren.',
'intro_boxes_after_refresh' => 'Die Einführungsfelder werden wieder angezeigt, wenn Sie die Seite aktualisieren.',
'show_all_no_filter' => 'Alle Transaktionen anzeigen, ohne diese nach Datum zu gruppieren.',
@@ -85,10 +87,10 @@ return [
'sum_of_income' => 'Summe von Einnahmen',
'spent_in_specific_budget' => 'Ausgegeben in Budget ":budget"',
'sum_of_expenses_in_budget' => 'Vollkommen ausgegeben in Budget ":budget"',
- 'left_in_budget_limit' => 'Übrig zum ausgeben aufgrund der Budgetierung',
- 'current_period' => 'Aktuelle Periode',
- 'show_the_current_period_and_overview' => 'Zeigen Sie die aktuelle Periode und die Übersicht',
- 'pref_languages_locale' => 'Damit eine andere Sprache als Englisch richtig funktioniert muss Ihr Betriebssystem mit den korrekten Gebietsschema-Informationen ausgestattet werden. Wenn diese nicht vorhanden sind, können die Währungsdaten, Terminen und Mengen falsch formatiert.',
+ 'left_in_budget_limit' => 'Übrig zum Ausgeben aufgrund der Budgetierung',
+ 'current_period' => 'Aktueller Zeitraum',
+ 'show_the_current_period_and_overview' => 'Zeigen Sie den aktuellen Zeitraum und die Übersicht',
+ 'pref_languages_locale' => 'Damit eine andere Sprache als Englisch richtig funktioniert muss Ihr Betriebssystem mit den korrekten Gebietsschema-Informationen ausgestattet werden. Wenn diese nicht vorhanden sind, können die Währungsdaten, Termine und Mengen falsch formatiert.',
'budget_in_period' => 'Alle Transaktionen für Haushalt :name zwischen :start und :end',
'chart_budget_in_period' => 'Diagramm für alle Transaktionen des Haushalts ":name" zwischen :start und :end',
'chart_account_in_period' => 'Diagramm für alle Transaktionen des Kontos ":name" zwischen :start und :end',
@@ -129,7 +131,8 @@ return [
'transfer_exchange_rate_instructions' => 'Das Quellkonto "@source_name" akzeptiert nur Transaktionen in @source_currency. Das Zielkonto "@dest_name" akzeptiert nur Transaktionen in @dest_currency. Sie müssen den Betrag in beiden Währungen korrekt angeben.',
'transaction_data' => 'Transaktionsdaten',
'invalid_server_configuration' => 'Ungültige Serverkonfiguration',
- 'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are instructions how to do this .',
+ 'invalid_locale_settings' => 'Firefly III kann keine Geldbeträge formatieren, da auf Ihrem Server die erforderlichen Pakete fehlen. Es gibt eine Anleitung , wie dies behoben werden kann.',
+ 'quickswitch' => 'Schnellauswahl',
// search
'search' => 'Suche',
@@ -144,10 +147,10 @@ return [
// repeat frequencies:
'repeat_freq_yearly' => 'Jährlich',
- 'repeat_freq_half-year' => 'every half-year',
- 'repeat_freq_quarterly' => 'quarterly',
+ 'repeat_freq_half-year' => 'halbjährlich',
+ 'repeat_freq_quarterly' => 'vierteljährlich',
'repeat_freq_monthly' => 'monatlich',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'wöchentlich',
'weekly' => 'wöchentlich',
'quarterly' => 'vierteljährlich',
'half-year' => 'halbjährlich',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Ohne Datum',
'result' => 'Ergebnis',
'sums_apply_to_range' => 'All sums apply to the selected range',
+ 'mapbox_api_key' => 'Um die Karte zu verwenden, besorgen Sie sich einen API-Schlüssel von Mapbox . Öffnen Sie Ihre .env
Datei und geben Sie diesen Code unter MAPBOX_API_KEY=
ein.',
'press_tag_location' => 'Right click or long press to set the tag\'s location.',
'clear_location' => 'Clear location',
@@ -435,25 +439,25 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'password_changed' => 'Passwort geändert!',
'should_change' => 'Ziel ist es, ihr Passwort zu ändern.',
'invalid_password' => 'Ungültiges Passwort!',
- 'what_is_pw_security' => 'Was ist "Kennwort Sicherheit überprüfen"?',
+ 'what_is_pw_security' => 'Was ist "Passwortsicherheit überprüfen"?',
'secure_pw_title' => 'So wählen Sie ein sicheres Passwort aus',
'secure_pw_history' => 'Im August 2017 veröffentlichte die bekannte Sicherheitsforscherin Troy Hunt eine Liste von 306 Millionen gestohlenen Passwörtern. Diese Passwörter wurden während der Einbrüche bei Firmen wie LinkedIn, Adobe und NeoPets (und vielen mehr) gestohlen.',
- 'secure_pw_check_box' => 'By checking the box, Firefly III will send the SHA1 hash of your password to the website of Troy Hunt to see if it is on the list. This will stop you from using unsafe passwords as is recommended in the latest NIST Special Publication on this subject.',
+ 'secure_pw_check_box' => 'Wenn Sie das Kontrollkästchen aktivieren, wird Firefly III den SHA1-Hash Ihres Passworts an die Website von Troy Hunt senden, um zu sehen, ob es auf der Liste steht. Dies verhindert, dass Sie unsichere Passwörter verwenden, was in der aktuellen NIST-Sonderveröffentlichung zu diesem Thema empfohlen wird.',
'secure_pw_sha1' => 'Aber ich dachte, dass SHA1 schon geknackt wurde?',
- 'secure_pw_hash_speed' => 'Yes, but not in this context. As you can read on the website detailing how they broke SHA1 , it is now slightly easier to find a "collision": another string that results in the same SHA1-hash. It now only takes 10,000 years using a single-GPU machine.',
- 'secure_pw_hash_security' => 'This collision would not be equal to your password, nor would it be useful on (a site like) Firefly III. This application does not use SHA1 for password verification. So it is safe to check this box. Your password is hashed and sent over HTTPS.',
+ 'secure_pw_hash_speed' => 'Ja, aber nicht in diesem Zusammenhang. Wie Sie auf auf der Website, die erklärt, wie SHA1 gebrochen wurde, lesen können , ist es jetzt etwas leichter, eine "Kollision" zu finden: eine andere Zeichenfolge, die zu demselben SHA1-Hash führt. Es dauert nur mehr 10.000 Jahre mit einer Single-GPU-Maschine.',
+ 'secure_pw_hash_security' => 'Diese Kollision wäre nicht gleich Ihrem Passwort, noch wäre es nützlich auf (einer Seite wie) Firefly III. Diese Anwendung verwendet SHA1 nicht zur Passwortüberprüfung. Es ist also sicher, dieses Kästchen zu aktivieren. Ihr Passwort wird gehasht und über HTTPS übertragen.',
'secure_pw_should' => 'Soll ich die Box ankreuzen?',
- 'secure_pw_long_password' => 'Wenn du gerade ein langes, Single-Use-Passwort für Firefly III mit einem Kennwortgenerator generiert hast: Nein .',
+ 'secure_pw_long_password' => 'Wenn Sie gerade ein langes, Single-Use-Passwort für Firefly III mit einem Kennwortgenerator generiert haben: Nein .',
'secure_pw_short' => 'Wenn Sie gerade das Passwort eingegeben haben, welches Sie immer verwenden: Bitte ja .',
'personal_access_token' => 'Persönlicher Zugangs-Token',
'explain_access_token' => 'You need this token to perform command line options, such as importing or exporting data. Without it, such sensitive commands will not work. Do not share your access token. Nobody will ask you for this token, not even me. If you fear you lost this, or when you\'re paranoid, regenerate this token using the button.',
'regenerate_access_token' => 'Zugangs-Token neu erstellen',
'token_regenerated' => 'Ein neuer Zugangs-Token wurde generiert',
'change_your_email' => 'E-Mail Adresse ändern',
- 'email_verification' => 'An email message will be sent to your old AND new email address. For security purposes, you will not be able to login until you verify your new email address. If you are unsure if your Firefly III installation is capable of sending email, please do not use this feature. If you are an administrator, you can test this in the Administration .',
+ 'email_verification' => 'Eine E-Mail-Nachricht wird an Ihre alte UND neue E-Mail-Adresse gesendet. Aus Sicherheitsgründen können Sie sich erst anmelden, wenn Sie Ihre neue E-Mail-Adresse bestätigt haben. Wenn Sie sich nicht sicher sind, ob Ihre Firefly III-Installation E-Mails versenden kann, verwenden Sie bitte diese Funktion nicht. Wenn Sie Administrator sind, können Sie dies in der Administration testen.',
'email_changed_logout' => 'Sie müssen Ihre E-Mail-Adresse bestätigen, um sich anmelden zu können.',
- 'login_with_new_email' => 'You can now login with your new email address.',
- 'login_with_old_email' => 'You can now login with your old email address again.',
+ 'login_with_new_email' => 'Sie können sich jetzt mit Ihrer neuen E-Mail-Adresse anmelden.',
+ 'login_with_old_email' => 'Sie können sich jetzt wieder mit Ihrer alten E-Mail-Adresse anmelden.',
// attachments
@@ -556,9 +560,9 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'update_budget' => 'Budget aktualisieren',
'update_budget_amount_range' => 'Aktualisiere (erwarteten) verfügbaren Betrag zwischen :start und :end',
'budget_period_navigator' => 'Zeitraum-navigator',
- 'info_on_available_amount' => 'What do I have available?',
+ 'info_on_available_amount' => 'Was habe ich verfügbar?',
'available_amount_indication' => 'Use these amounts to get an indication of what your total budget could be.',
- 'suggested' => 'Suggested',
+ 'suggested' => 'Vorgeschlagen',
'average_between' => 'Average between :start and :end',
@@ -587,6 +591,8 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'not_expected_period' => 'Diesen Zeitraum nicht erwartet',
'bill_is_active' => 'Rechnung ist aktiv',
'bill_will_automatch' => 'Rechnung wird automatisch mit passenden Transaktionen verknüpft',
+ 'skips_over' => 'skips over',
+
// accounts:
'details_for_asset' => 'Details für Girokonto ":name"',
'details_for_expense' => 'Details für Debitor ":name"',
@@ -615,18 +621,55 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'revenue_accounts' => 'Schuldner',
'cash_accounts' => 'Bargeldkonten',
'Cash account' => 'Bargeldkonto',
+ 'reconcile_account' => 'Konto ":account" ausgleichen',
+ 'delete_reconciliation' => 'Delete reconciliation',
+ 'update_reconciliation' => 'Update reconciliation',
+ 'amount_cannot_be_zero' => 'The amount cannot be zero',
+ 'end_of_reconcile_period' => 'End of reconcile period: :period',
+ 'start_of_reconcile_period' => 'Start of reconcile period: :period',
+ 'start_balance' => 'Start balance',
+ 'end_balance' => 'End balance',
+ 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"',
+ 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.',
+ 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"',
+ 'date_change_instruction' => 'If you change the date range now, any progress will be lost.',
+ 'update_selection' => 'Update selection',
+ 'store_reconcile' => 'Store reconciliation',
+ 'reconciliation_transaction' => 'Reconciliation transaction',
+ 'Reconciliation' => 'Reconciliation',
+ 'reconciliation' => 'Reconciliation',
+ 'reconcile_options' => 'Reconciliation options',
+ 'reconcile_range' => 'Reconciliation range',
+ 'start_reconcile' => 'Start reconciling',
+ 'cash' => 'cash',
'account_type' => 'Kontotyp',
'save_transactions_by_moving' => 'Speichern Sie diese Transaktion(en), indem Sie sie auf ein anderes Konto verschieben:',
'stored_new_account' => 'Neues Konto ":name" gespeichert!',
'updated_account' => 'Konto ":name" aktualisiert',
'credit_card_options' => 'Kreditkartenoptionen',
- 'no_transactions_account' => 'Es gibt keine Transaktionen (in dieser Zeit) für Girokonto ":name".',
+ 'no_transactions_account' => 'Es gibt keine Transaktionen (in diesem Zeitraum) für das Girokonto ":name".',
'no_data_for_chart' => 'Es gibt derzeit (noch) nicht genügend Informationen, um dieses Diagramm zu generieren.',
- 'select_more_than_one_account' => 'Bitte mehr als ein Konto wählen',
- 'select_more_than_one_category' => 'Bitte mehr als eine Kategorie wählen',
- 'select_more_than_one_budget' => 'Bitte mehr als ein Budget wählen',
+ 'select_more_than_one_account' => 'Bitte wählen Sie mehr als einen Konto aus',
+ 'select_more_than_one_category' => 'Bitte wählen Sie mehr als eine Kategorie aus',
+ 'select_more_than_one_budget' => 'Bitte wählen Sie mehr als einen Budget aus',
'select_more_than_one_tag' => 'Bitte wählen Sie mehr als einen Tag aus',
'account_default_currency' => 'Wenn Sie eine andere Währung auswählen, werden neue Transaktionen von diesem Konto standardmäßig diese Währung ausgewählt haben.',
+ 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.',
+ 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.',
+ 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.',
+ 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.',
+ 'reconcile_go_back' => 'Sie können dies jederzeit später bearbeiten oder löschen.',
+ 'must_be_asset_account' => 'You can only reconcile asset accounts',
+ 'reconciliation_stored' => 'Reconciliation stored',
+ 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)',
+ 'reconcile_this_account' => 'Reconcile this account',
+ 'confirm_reconciliation' => 'Confirm reconciliation',
+ 'submitted_start_balance' => 'Submitted start balance',
+ 'selected_transactions' => 'Selected transactions (:count)',
+ 'already_cleared_transactions' => 'Already cleared transactions (:count)',
+ 'submitted_end_balance' => 'Submitted end balance',
// categories:
'new_category' => 'Neue Kategorie',
@@ -660,11 +703,11 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'stored_journal' => 'Neue Überweisung ":description" erfolgreich erstellt',
'select_transactions' => 'Überweisungen auswählen',
'stop_selection' => 'Auswahl von Überweisungen stoppen',
- 'edit_selected' => 'Auswahl bearbeiten',
- 'delete_selected' => 'Auswahl löschen',
+ 'reconcile_selected' => 'Ausgleichen',
'mass_delete_journals' => 'Löschen Sie eine Reihe von Überweisungen',
'mass_edit_journals' => 'Bearbeiten Sie eine Reihe von Überweisungen',
'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.',
+ 'no_budget' => '(kein Budget)',
'perm-delete-many' => 'Das Löschen von mehreren Elementen auf einmal kann sich störend auswirken. Bitte seien Sie vorsichtig.',
'mass_deleted_transactions_success' => ':amount Überweisung(en) gelöscht.',
'mass_edited_transactions_success' => ':amount Überweisung(en) aktualisiert',
@@ -677,11 +720,11 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
// new user:
'welcome' => 'Willkommen bei Firefly!',
- 'submit' => 'Bestätigen',
+ 'submit' => 'Absenden',
'getting_started' => 'Erste Schritte',
- 'to_get_started' => 'It is good to see you have successfully installed Firefly III. To get started with this tool please enter your bank\'s name and the balance of your main checking account. Do not worry yet if you have multiple accounts. You can add those later. It\'s just that Firefly III needs something to start with.',
+ 'to_get_started' => 'Es ist schön, dass Sie Firefly III erfolgreich installiert haben. Um mit diesem Tool zu beginnen, geben Sie bitte den Namen Ihrer Bank und das Guthaben Ihres Hauptkontos ein. Machen Sie sich keine Sorgen, wenn Sie mehrere Konten haben. Sie können diese später hinzufügen. Dies ist nur der Anfang.',
'savings_balance_text' => 'Firefly III will automatically create a savings account for you. By default, there will be no money in your savings account, but if you tell Firefly III the balance it will be stored as such.',
- 'finish_up_new_user' => 'That\'s it! You can continue by pressing Submit . You will be taken to the index of Firefly III.',
+ 'finish_up_new_user' => 'Das war\'s! Sie können fortfahren, indem Sie Absenden drücken. Sie werden zur Startseite von Firefly III gebracht.',
'stored_new_accounts_new_user' => 'Yay! Ihre neuen Konten wurden gespeichert.',
// home page:
@@ -694,13 +737,15 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'bills_to_pay' => 'Unbezahlte Rechnungen',
'per_day' => 'Pro Tag',
'left_to_spend_per_day' => 'Left to spend per day',
- 'bills_paid' => 'Bills paid',
+ 'bills_paid' => 'Rechnungen bezahlt',
// menu and titles, should be recycled as often as possible:
'currency' => 'Währung',
'preferences' => 'Einstellungen',
'logout' => 'Abmelden',
+ 'toggleNavigation' => 'Navigation umschalten',
'searchPlaceholder' => 'Suchen...',
+ 'version' => 'Version',
'dashboard' => 'Übersicht',
'currencies' => 'Währungen',
'accounts' => 'Konten',
@@ -720,11 +765,11 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'piggyBanks' => 'Sparschweine',
'bills' => 'Rechnungen',
'withdrawal' => 'Ausgabe',
- 'deposit' => 'Einzahlung',
+ 'deposit' => 'Einnahme',
'account' => 'Konto',
'transfer' => 'Überweisung',
'Withdrawal' => 'Ausgabe',
- 'Deposit' => 'Einzahlung',
+ 'Deposit' => 'Einnahme',
'Transfer' => 'Überweisung',
'bill' => 'Rechnung',
'yes' => 'Ja',
@@ -826,8 +871,8 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'account_role_sharedAsset' => 'Shared asset account',
'account_role_savingAsset' => 'Sparkonto',
'account_role_ccAsset' => 'Kreditkarte',
- 'budget_chart_click' => 'Please click on a budget name in the table above to see a chart.',
- 'category_chart_click' => 'Please click on a category name in the table above to see a chart.',
+ 'budget_chart_click' => 'Klicken Sie auf einen Budgetnamen in der obigen Tabelle, um ein Diagramm anzuzeigen.',
+ 'category_chart_click' => 'Klicken Sie auf einen Kategorienamen in der obigen Tabelle, um ein Diagramm zu sehen.',
// charts:
@@ -840,7 +885,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'earned' => 'Verdient',
'overspent' => 'Zuviel ausgegeben',
'left' => 'Übrig',
- 'no_budget' => '(kein Budget)',
+ 'no_budget' => '(no budget)',
'max-amount' => 'Höchstbetrag',
'min-amount' => 'Mindestbetrag',
'journal-amount' => 'Aktueller Rechnungseintrag',
@@ -867,11 +912,11 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'sum_of_piggy_banks' => 'Summe der Sparschweine',
'saved_so_far' => 'Gespart',
'left_to_save' => 'Zu Sparen',
- 'suggested_amount' => 'Suggested monthly amount to save',
+ 'suggested_amount' => 'Empfohlener monatliche Sparbetrag',
'add_money_to_piggy_title' => 'Geld dem Sparschwein ":name" hinzufügen',
'remove_money_from_piggy_title' => 'Geld dem Sparschwein ":name" entnehmen',
'add' => 'Hinzufügen',
- 'no_money_for_piggy' => 'You have no money to put in this piggy bank.',
+ 'no_money_for_piggy' => 'Sie haben kein Geld, welches Sie in dieses Sparschwein geben können.',
'remove' => 'Entfernen',
'max_amount_add' => 'Der maximale Betrag, den Sie hinzufügen können ist',
@@ -904,7 +949,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'transaction_journal_information' => 'Transaktionsinformationen',
'transaction_journal_meta' => 'Metainformationen',
'total_amount' => 'Gesamtbetrag',
- 'number_of_decimals' => 'Anzahl der Dezimalstellen',
+ 'number_of_decimals' => 'Anzahl der Nachkommastellen',
// administration
'administration' => 'Administration',
@@ -926,10 +971,11 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'budgets_with_limits' => 'Budget(s) mit konfigurierten Betrag',
'rule_or_rules' => 'Regel(n)',
'rulegroup_or_groups' => 'Regelgruppe(n)',
+ 'tag_or_tags' => 'Tag(s)',
'configuration_updated' => 'Die Konfiguration wurde aktualisiert',
'setting_is_demo_site' => 'Demonstrationsseite',
'setting_is_demo_site_explain' => 'Wenn sie diese Option auswählen, wird sich diese Installation wie eine Demonstrationsseite verhalten, was ungewollte Auswirkungen haben kann.',
- 'block_code_bounced' => 'Email message(s) bounced',
+ 'block_code_bounced' => 'E-Mail-Nachricht(en) wurden abgewiesen',
'block_code_expired' => 'Demo-Konto abgelaufen',
'no_block_code' => 'Kein Grund für Block oder Benutzer nicht blockiert',
'block_code_email_changed' => 'Der Benutzer hat die neue E-Mail-Adresse noch nicht bestätigt',
@@ -962,20 +1008,20 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'link_transaction' => 'Link transaction',
'link_to_other_transaction' => 'Link this transaction to another transaction',
'select_transaction_to_link' => 'Select a transaction to link this transaction to',
- 'this_transaction' => 'This transaction',
+ 'this_transaction' => 'Diese Transaktion',
'transaction' => 'Transaction',
- 'comments' => 'Comments',
+ 'comments' => 'Kommentare',
'to_link_not_found' => 'If the transaction you want to link to is not listed, simply enter its ID.',
- 'invalid_link_selection' => 'Cannot link these transactions',
+ 'invalid_link_selection' => 'Diese Transaktionen können nicht verknüpft werden',
'journals_linked' => 'Transactions are linked.',
'journals_error_linked' => 'These transactions are already linked.',
'journal_links' => 'Transaction links',
'this_withdrawal' => 'This withdrawal',
- 'this_deposit' => 'This deposit',
+ 'this_deposit' => 'Diese Einnahme',
'this_transfer' => 'This transfer',
'overview_for_link' => 'Overview for link type ":name"',
'source_transaction' => 'Source transaction',
- 'link_description' => 'Link description',
+ 'link_description' => 'Linkbeschreibung',
'destination_transaction' => 'Destination transaction',
'delete_journal_link' => 'Delete the link between :source and :destination ',
'deleted_link' => 'Deleted link',
@@ -1001,7 +1047,8 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'split_this_transfer' => 'Diese Überweisung aufteilen',
'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.',
'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.',
- 'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.',
+ 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.',
+ 'cannot_edit_opening_balance' => 'Sie können die Eröffnungsbilanz eines Kontos nicht bearbeiten.',
'no_edit_multiple_left' => 'You have selected no valid transactions to edit.',
'cannot_convert_split_journal' => 'Cannot convert a split transaction',
@@ -1013,6 +1060,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'import_index_title' => 'Daten in Firefly III importieren',
'import_index_sub_title' => 'Index',
'import_general_index_intro' => 'Willkommen beim Importassistenten von Firefly. Es gibt einige Möglichkeiten, Daten in Firefly III zu importieren, die hier als Schaltflächen angezeigt werden.',
+ 'import_general_index_csv_file' => 'Importiere eine (CSV) Datei',
'import_index_intro' => 'Dieser Assistent hilft Ihnen, Dateien von Ihrer Bank in Firefly III zu importieren. Bitte sehen Sie sich die Hilfeseiten in der oberen rechten Ecke an.',
'import_index_file' => 'Datei auswählen',
'import_index_config' => 'Wenn Sie bereits zuvor Daten in Firefly III importiert haben, haben Sie eventuell eine Kofigurationsdatei, welche einige Einstellungen für Sie voreinstellt. Für einige Banken haben andere Nutzer freundlicherweise bereits ihre Konfigurationsdatei zur Verfügung gestellt.',
@@ -1028,31 +1076,31 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'import_config_bread_crumb' => 'Set up your import file',
// import status page:
- 'import_status_bread_crumb' => 'Import status',
- 'import_status_sub_title' => 'Import status',
- 'import_status_wait_title' => 'Please hold...',
- 'import_status_wait_text' => 'This box will disappear in a moment.',
+ 'import_status_bread_crumb' => 'Importstatus',
+ 'import_status_sub_title' => 'Importstatus',
+ 'import_status_wait_title' => 'Bitte warten...',
+ 'import_status_wait_text' => 'Diese Box wird gleich verschwinden.',
'import_status_ready_title' => 'Der Import ist startbereit',
- 'import_status_ready_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.',
- 'import_status_ready_config' => 'Download configuration',
- 'import_status_ready_start' => 'Start the import',
- 'import_status_ready_share' => 'Please consider downloading your configuration and sharing it at the import configuration center . This will allow other users of Firefly III to import their files more easily.',
- 'import_status_running_title' => 'The import is running',
- 'import_status_running_placeholder' => 'Please hold for an update...',
+ 'import_status_ready_text' => 'Der Import ist bereit zu starten. Alle Einstellungen wurden von Ihnen erledigt. Bitte laden Sie die Konfigurationsdatei herunter. Diese wird Ihnen beim Import helfen, sollte dieser nicht wie gewünscht verlaufen. Um den Import tatsächlich zu starten führen Sie den folgenden Befehl in der Konsole aus oder nutzen Sie den Web-basierten Import. Abhängig von ihrer Konfiguration wird Ihnen der Konsolenimport mehr Rückmeldungen geben.',
+ 'import_status_ready_config' => 'Konfigurationsdatei herunterladen',
+ 'import_status_ready_start' => 'Starte den Import',
+ 'import_status_ready_share' => 'Bitte denken Sie darüber nach ihre Konfiguration herunterzuladen und in der Sammlung an Import-Einstellungen zu teilen. Dieses erlaubt es anderen Nutzern von Firefly III ihre Daten einfacher zu importieren.',
+ 'import_status_running_title' => 'Der Import läuft',
+ 'import_status_running_placeholder' => 'Bitte warten Sie auf eine Aktualisierung...',
'import_status_errors_title' => 'Fehler beim Import',
- 'import_status_errors_single' => 'An error has occured during the import. It does not appear to be fatal.',
- 'import_status_errors_multi' => 'Some errors occured during the import. These do not appear to be fatal.',
+ 'import_status_errors_single' => 'Beim Import ist ein Fehler aufgetreten. Dieser scheint aber nicht schwerwiegend zu sein.',
+ 'import_status_errors_multi' => 'Beim Import sind einige Fehler aufgetreten. Diese scheinen aber nicht schwerwiegend zu sein.',
'import_status_fatal_title' => 'Ein schwerwiegender Fehler ist aufgetreten',
- 'import_status_fatal_text' => 'A fatal error occurred, which the import-routine cannot recover from. Please see the explanation in red below.',
- 'import_status_fatal_more' => 'If the error is a time-out, the import will have stopped half-way. For some server configurations, it is merely the server that stopped while the import keeps running in the background. To verify this, check out the log files. If the problem persists, consider importing over the command line instead.',
+ 'import_status_fatal_text' => 'Es ist ein schwerwiegender Fehler aufgetreten und die Importroutine kann nicht fortgeführt werden. Bitte sehen Sie sich die Erklärung in rot unten an.',
+ 'import_status_fatal_more' => 'Wenn der Fehler eine Zeitüberschreitung ist, wird der Import mittendrin gestoppt. Bei einigen Serverkonfigurationen wird lediglich der Server gestoppt, während der Import im Hintergrund ausgeführt wird. Um dies zu überprüfen, überprüfen Sie die Protokolldateien. Wenn das Problem weiterhin besteht, sollten Sie stattdessen den Import über die Befehlszeile in Erwägung ziehen.',
'import_status_finished_title' => 'Importassistent abgeschlossen',
'import_status_finished_text' => 'Der Importassistenten hat Ihre Datei importiert.',
- 'import_status_finished_job' => 'The transactions imported can be found in tag :tag .',
+ 'import_status_finished_job' => 'Die importierten Transaktionen finden Sie im Tag : tag .',
'import_status_job_running' => 'Der Import läuft...',
'import_with_key' => 'Import with key \':key\'',
// sandstorm.io errors and messages:
- 'sandstorm_not_available' => 'This function is not available when you are using Firefly III within a Sandstorm.io environment.',
+ 'sandstorm_not_available' => 'Diese Funktion ist nicht verfügbar, wenn Sie Firefly III in einer Sandstorm.io-Umgebung verwenden.',
// empty lists? no objects? instructions:
'no_accounts_title_asset' => 'Let\'s create an asset account!',
@@ -1068,36 +1116,36 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?',
'no_accounts_imperative_revenue' => 'Revenue accounts are created automatically when you create transactions, but you can create one manually too, if you want. Let\'s create one now:',
'no_accounts_create_revenue' => 'Create a revenue account',
'no_budgets_title_default' => 'Let\'s create a budget',
- 'no_budgets_intro_default' => 'You have no budgets yet. Budgets are used to organise your expenses into logical groups, which you can give a soft-cap to limit your expenses.',
+ 'no_budgets_intro_default' => 'Sie haben noch keine Budgets. Budgets werden verwendet, um Ihre Ausgaben in logischen Gruppen zu organisieren, die Sie mit einem Limit versehen können, um Ihre Ausgaben zu begrenzen.',
'no_budgets_imperative_default' => 'Budgets are the basic tools of financial management. Let\'s create one now:',
'no_budgets_create_default' => 'Ein Budget erstellen',
- 'no_categories_title_default' => 'Lassen Sie uns eine Kategorie erstellen!',
+ 'no_categories_title_default' => 'Erstellen wir eine Kategorie!',
'no_categories_intro_default' => 'You have no categories yet. Categories are used to fine tune your transactions and label them with their designated category.',
'no_categories_imperative_default' => 'Categories are created automatically when you create transactions, but you can create one manually too. Let\'s create one now:',
'no_categories_create_default' => 'Eine Kategorie erstellen',
- 'no_tags_title_default' => 'Lassen Sie uns ein Tag erstellen!',
+ 'no_tags_title_default' => 'Erstellen wir einen Tag!',
'no_tags_intro_default' => 'You have no tags yet. Tags are used to fine tune your transactions and label them with specific keywords.',
'no_tags_imperative_default' => 'Tags are created automatically when you create transactions, but you can create one manually too. Let\'s create one now:',
'no_tags_create_default' => 'Ein neues Tag erstellen',
'no_transactions_title_withdrawal' => 'Let\'s create an expense!',
- 'no_transactions_intro_withdrawal' => 'You have no expenses yet. You should create expenses to start managing your finances.',
- 'no_transactions_imperative_withdrawal' => 'Have you spent some money? Then you should write it down:',
+ 'no_transactions_intro_withdrawal' => 'Sie haben noch keine Ausgaben verbucht. Sie sollten Ausgabenseinträge erstellen, um Ihre Finanzen zu verwalten.',
+ 'no_transactions_imperative_withdrawal' => 'Haben Sie Geld ausgegeben? Dann sollten Sie es aufschreiben:',
'no_transactions_create_withdrawal' => 'Eine neue Ausgabe erstellen',
'no_transactions_title_deposit' => 'Let\'s create some income!',
- 'no_transactions_intro_deposit' => 'You have no recorded income yet. You should create income entries to start managing your finances.',
- 'no_transactions_imperative_deposit' => 'Have you received some money? Then you should write it down:',
- 'no_transactions_create_deposit' => 'Create a deposit',
+ 'no_transactions_intro_deposit' => 'Sie haben noch keine Einnahmen verbucht. Sie sollten Einkommenseinträge erstellen, um Ihre Finanzen zu verwalten.',
+ 'no_transactions_imperative_deposit' => 'Haben Sie Geld erhalten? Dann sollten Sie es aufschreiben:',
+ 'no_transactions_create_deposit' => 'Eine Einnahme erstellen',
'no_transactions_title_transfers' => 'Let\'s create a transfer!',
- 'no_transactions_intro_transfers' => 'You have no transfers yet. When you move money between asset accounts, it is recorded as a transfer.',
- 'no_transactions_imperative_transfers' => 'Have you moved some money around? Then you should write it down:',
+ 'no_transactions_intro_transfers' => 'Sie haben noch keine Transfers. Wenn Sie Geld zwischen Ihren Konten bewegen, wird es als Überweisung erfasst.',
+ 'no_transactions_imperative_transfers' => 'Haben Sie Geld überwiesen? Dann sollten Sie es aufschreiben:',
'no_transactions_create_transfers' => 'Eine Überweisung erstellen',
'no_piggies_title_default' => 'Let\'s create a piggy bank!',
- 'no_piggies_intro_default' => 'You have no piggy banks yet. You can create piggy banks to divide your savings and keep track of what you\'re saving up for.',
- 'no_piggies_imperative_default' => 'Do you have things you\'re saving money for? Create a piggy bank and keep track:',
- 'no_piggies_create_default' => 'Create a new piggy bank',
+ 'no_piggies_intro_default' => 'Sie haben noch keine Sparscheine. Sie können Sparschweine erstellen, um Ihre Ersparnisse zu teilen und den Überblick darüber zu behalten, wofür Sie sparen.',
+ 'no_piggies_imperative_default' => 'Haben Sie Dinge, auf die Sie sparen? Erstellen Sie eine Sparschwein und behalten Sie den Überblick:',
+ 'no_piggies_create_default' => 'Ein neues Sparschwein erstellen',
'no_bills_title_default' => 'Let\'s create a bill!',
- 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent of insurance.',
- 'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:',
+ 'no_bills_intro_default' => 'Du hast noch keine Rechnungen. Sie können Rechnungen erstellen, um die laufenden Ausgaben, wie zum Beispiel Ihre Versicherung oder Miete, nachzuverfolgen.',
+ 'no_bills_imperative_default' => 'Haben Sie regelmäßige Rechnungen? Erstellen Sie eine Rechnung und verfolgen Sie Ihre Zahlungen:',
'no_bills_create_default' => 'Eine Rechnung erstellen',
diff --git a/resources/lang/de_DE/form.php b/resources/lang/de_DE/form.php
index 8d8c9157f2..2714fae3e4 100644
--- a/resources/lang/de_DE/form.php
+++ b/resources/lang/de_DE/form.php
@@ -33,7 +33,7 @@ return [
'journal_source_account_name' => 'Kreditor (Quelle)',
'journal_source_account_id' => 'Girokonto (Quelle)',
'BIC' => 'BIC',
- 'verify_password' => 'Überprüfen Sie die Kennwortsicherheit',
+ 'verify_password' => 'Passwortsicherheit überprüfen',
'source_account' => 'Quellkonto',
'destination_account' => 'Zielkonto',
'journal_destination_account_id' => 'Girokonto (Ziel)',
@@ -57,19 +57,19 @@ return [
'ccMonthlyPaymentDate' => 'Monatliches Zahlungsdatum der Kreditkarte',
'piggy_bank_id' => 'Sparschwein',
'returnHere' => 'Hierhin zurückkehren',
- 'returnHereExplanation' => 'Nach dem Speichern, hierher zurückkehren und eine weitere zu erstellen.',
+ 'returnHereExplanation' => 'Nach dem Speichern hierher zurückkehren, um ein weiteres Element zu erstellen.',
'returnHereUpdateExplanation' => 'Nach dem Update, hierher zurückkehren.',
'description' => 'Beschreibung',
'expense_account' => 'Debitor (Ausgabe)',
'revenue_account' => 'Kreditor (Einnahme)',
'decimal_places' => 'Nachkommastellen',
- 'exchange_rate_instruction' => 'Ausländische Währungen',
+ 'exchange_rate_instruction' => 'Fremdwährungen',
'source_amount' => 'Betrag (Quelle)',
'destination_amount' => 'Betrag (Ziel)',
'native_amount' => 'Nativer Betrag',
'new_email_address' => 'Neue E-Mail-Adresse',
'verification' => 'Bestätigung',
- 'api_key' => 'API key',
+ 'api_key' => 'API-Schlüssel',
'source_account_asset' => 'Quellkonto (Bestandskonto)',
'destination_account_expense' => 'Zielkonto (Unkostenkonto)',
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Dauerhaft löschen',
'cancel' => 'Abbrechen',
'targetdate' => 'Zieldatum',
+ 'startdate' => 'Startdatum',
'tag' => 'Tag',
'under' => 'Unter',
'symbol' => 'Zeichen',
@@ -147,7 +148,7 @@ return [
'journal_areYouSure' => 'Sind Sie sicher, dass Sie die Überweisung mit dem Namen ":description" löschen möchten?',
'mass_journal_are_you_sure' => 'Sind Sie sicher, dass Sie diese Überweisung löschen möchten?',
'tag_areYouSure' => 'Sind Sie sicher, dass Sie den Tag ":name" löschen möchten?',
- 'journal_link_areYouSure' => 'Bist du sicher, dass du die Verknüpfung zwischen :source und :destination löschen möchtest?',
+ 'journal_link_areYouSure' => 'Sind Sie sicher, dass Sie die Verknüpfung zwischen :source und :destination löschen möchten?',
'linkType_areYouSure' => 'Are you sure you want to delete the link type ":name" (":inward" / ":outward")?',
'permDeleteWarning' => 'Das Löschen von Dingen in Firefly ist dauerhaft und kann nicht rückgängig gemacht werden.',
'mass_make_selection' => 'Sie können das Löschen von Elementen verhindern, indem Sie die Checkbox entfernen.',
@@ -164,7 +165,7 @@ return [
'email' => 'E-Mail Adresse',
'password' => 'Passwort',
- 'password_confirmation' => 'Passwort (nochmal)',
+ 'password_confirmation' => 'Passwort (wiederholen)',
'blocked' => 'Ist blockiert?',
'blocked_code' => 'Grund für Block',
diff --git a/resources/lang/de_DE/intro.php b/resources/lang/de_DE/intro.php
index 7c470ca97f..7f181bb9f6 100644
--- a/resources/lang/de_DE/intro.php
+++ b/resources/lang/de_DE/intro.php
@@ -20,7 +20,7 @@ return [
// create account:
'accounts_create_iban' => 'Geben Sie Ihren Konten eine gültige IBAN. Dies könnte einen Datenimport in Zukunft sehr einfach machen.',
- 'accounts_create_asset_opening_balance' => 'Anlagekonten können ein "Eröffnungsguthaben" haben, welches den Beginn der Historie dieses Kontos in Firefly angibt.',
+ 'accounts_create_asset_opening_balance' => 'Anlagekonten können eine "Eröffnungsbilanz" haben, welche den Beginn der Historie dieses Kontos in Firefly angibt.',
'accounts_create_asset_currency' => 'Firefly III unterstützt mehrere Währungen. Anlagenkonten haben eine Hauptwährung, die Sie hier einstellen müssen.',
'accounts_create_asset_virtual' => 'Es kann manchmal helfen, Ihrem Konto ein virtuelles Gleichgewicht zu geben: eine zusätzliche Menge, die dem tatsächlichen Kontostand immer hinzugefügt oder daraus entfernt wird.',
@@ -68,14 +68,14 @@ return [
// piggy banks index:
'piggy-banks_index_saved' => 'Dieses Feld zeigt Ihnen, wie viel Sie in jedem Sparschwein gespart haben.',
'piggy-banks_index_button' => 'Neben diesem Fortschrittsbalken befinden sich zwei Buttons (+ und -), um Geld von jedem Sparschwein hinzuzufügen oder zu entfernen.',
- 'piggy-banks_index_accountStatus' => 'In dieser Tabelle wird der Status der Anlagenkonten aufgeführt, die mindestens mit einem Sparschwein verbunden sind.',
+ 'piggy-banks_index_accountStatus' => 'In dieser Tabelle wird der Status der Anlagenkonten aufgeführt, die mit mindestens einem Sparschwein verbunden sind.',
// create piggy
- 'piggy-banks_create_name' => 'Was ist Ihr Ziel? Eine neue Couch, eine Kamera, Geld für Notfälle?',
+ 'piggy-banks_create_name' => 'Worauf sparen Sie? Eine neue Couch, eine Kamera, Geld für Notfälle?',
'piggy-banks_create_date' => 'Sie können ein Zieldatum oder einen Termin für Ihr Sparschwein festlegen.',
// show piggy
- 'piggy-banks_show_piggyChart' => 'Diese Grafik zeigt die Historie dieses Sparschweins.',
+ 'piggy-banks_show_piggyChart' => 'Dieses Diagramm zeigt den Verlauf dieses Sparschweins.',
'piggy-banks_show_piggyDetails' => 'Einige Details über Ihr Sparschwein',
'piggy-banks_show_piggyEvents' => 'Hinzufügungen oder Entfernungen sind hier ebenfalls aufgeführt.',
@@ -105,9 +105,9 @@ return [
'rules_index_outro' => 'Be sure to check out the help pages using the (?) icon in the top right!',
// create rule:
- 'rules_create_mandatory' => 'Choose a descriptive title, and set when the rule should be fired.',
+ 'rules_create_mandatory' => 'Wählen Sie einen aussagekräftigen Titel und legen Sie fest, wann die Regel ausgelöst werden soll.',
'rules_create_ruletriggerholder' => 'Add as many triggers as you like, but remember that ALL triggers must match before any actions are fired.',
- 'rules_create_test_rule_triggers' => 'Use this button to see which transactions would match your rule.',
+ 'rules_create_test_rule_triggers' => 'Verwenden Sie diese Schaltfläche, um zu sehen, welche Transaktionen zu Ihrer Regel passen würden.',
'rules_create_actions' => 'Legen Sie so viele Aktionen fest, wie Sie möchten.',
// preferences
diff --git a/resources/lang/de_DE/list.php b/resources/lang/de_DE/list.php
index 118d36becd..e021c7d5e9 100644
--- a/resources/lang/de_DE/list.php
+++ b/resources/lang/de_DE/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'Id',
'create_date' => 'Erstellt am',
'update_date' => 'Aktualisiert am',
- 'updated_at' => 'Aktualisiert am',
+ 'updated_at' => 'Aktualisiert am',
'balance_before' => 'Bilanz vor',
'balance_after' => 'Bilanz nach',
'name' => 'Name',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Summe der Auszahlungen',
'sum_deposits' => 'Summe der Einzahlungen',
'sum_transfers' => 'Summe der Überweisungen',
+ 'reconcile' => 'Reconcile',
];
diff --git a/resources/lang/de_DE/validation.php b/resources/lang/de_DE/validation.php
index f9e52e740e..2633ffb165 100644
--- a/resources/lang/de_DE/validation.php
+++ b/resources/lang/de_DE/validation.php
@@ -14,7 +14,7 @@ declare(strict_types=1);
return [
'iban' => 'Dies ist keine gültige IBAN.',
'unique_account_number_for_user' => 'Es sieht so aus, als ob diese Kontonummer bereits verwendet würde.',
- 'deleted_user' => 'Aufgrund von Sicherheitsbeschränkungen ist eine Registrierung dieser Email-Adresse nicht zugelassen.',
+ 'deleted_user' => 'Aufgrund von Sicherheitsbeschränkungen ist eine Registrierung mit dieser E-Mail-Adresse nicht zugelassen.',
'rule_trigger_value' => 'Dieser Wert ist für den ausgewählten Trigger ungültig.',
'rule_action_value' => 'Dieser Wert ist für die gewählte Aktion ungültig.',
'file_already_attached' => 'Die hochgeladene Datei ":name" ist diesem Objekt bereits angehängt.',
@@ -89,5 +89,5 @@ return [
'in_array' => ':attribute existiert nicht in :other.',
'present' => 'Das :attribute Feld muss vorhanden sein.',
'amount_zero' => 'Der Gesamtbetrag darf nicht Null sein',
- 'secure_password' => 'Das ist kein sicheres Passwort. Bitte versuche es erneut. Weitere Informationen finden Sie unter https://goo.gl/NCh2tN',
+ 'secure_password' => 'Das ist kein sicheres Passwort. Bitte versuchen Sie es erneut. Weitere Informationen finden Sie unter https://goo.gl/NCh2tN',
];
diff --git a/resources/lang/en_US/bank.php b/resources/lang/en_US/bank.php
index 11f05b3785..4becc5984c 100644
--- a/resources/lang/en_US/bank.php
+++ b/resources/lang/en_US/bank.php
@@ -1,6 +1,8 @@
'Prerequisites for an import from bunq',
'bunq_prerequisites_text' => 'In order to import from bunq, you need to obtain an API key. You can do this through the app.',
-];
\ No newline at end of file
+];
diff --git a/resources/lang/en_US/breadcrumbs.php b/resources/lang/en_US/breadcrumbs.php
index 0be3587f3c..be62acdc7a 100644
--- a/resources/lang/en_US/breadcrumbs.php
+++ b/resources/lang/en_US/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Revenue, income and deposits',
'transfer_list' => 'Transfers',
'transfers_list' => 'Transfers',
+ 'reconciliation_list' => 'Reconciliations',
'create_withdrawal' => 'Create new withdrawal',
'create_deposit' => 'Create new deposit',
'create_transfer' => 'Create new transfer',
'edit_journal' => 'Edit transaction ":description"',
+ 'edit_reconciliation' => 'Edit ":description"',
'delete_journal' => 'Delete transaction ":description"',
'tags' => 'Tags',
'createTag' => 'Create new tag',
diff --git a/resources/lang/en_US/csv.php b/resources/lang/en_US/csv.php
index eb7fe230b1..094df1e9a2 100644
--- a/resources/lang/en_US/csv.php
+++ b/resources/lang/en_US/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'Asset account ID (matching Firefly)',
'column_account-name' => 'Asset account (name)',
'column_amount' => 'Amount',
+ 'column_amount_debet' => 'Amount (debet column)',
+ 'column_amount_credit' => 'Amount (credit column)',
'column_amount-comma-separated' => 'Amount (comma as decimal separator)',
'column_bill-id' => 'Bill ID (matching Firefly)',
'column_bill-name' => 'Bill name',
diff --git a/resources/lang/en_US/demo.php b/resources/lang/en_US/demo.php
index 5c99a55718..c35b020f4a 100644
--- a/resources/lang/en_US/demo.php
+++ b/resources/lang/en_US/demo.php
@@ -20,7 +20,7 @@ return [
'currencies-index' => 'Firefly III supports multiple currencies. Although it defaults to the Euro it can be set to the US Dollar and many other currencies. As you can see a small selection of currencies has been included but you can add your own if you wish to. Changing the default currency will not change the currency of existing transactions however: Firefly III supports the use of multiple currencies at the same time.',
'transactions-index' => 'These expenses, deposits and transfers are not particularly imaginative. They have been generated automatically.',
'piggy-banks-index' => 'As you can see, there are three piggy banks. Use the plus and minus buttons to influence the amount of money in each piggy bank. Click the name of the piggy bank to see the administration for each piggy bank.',
- 'import-index' => 'Of course, any CSV file can be imported into Firefly III ',
+ 'import-index' => 'Of course, any CSV file can be imported into Firefly III',
'import-configure-security' => 'Because of security concerns, your upload has been replaced with a local file.',
'import-configure-configuration' => 'The configuration you see below is correct for the local file.',
];
diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php
index 49daf7d145..718e80e255 100644
--- a/resources/lang/en_US/firefly.php
+++ b/resources/lang/en_US/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Incomplete translation',
'close' => 'Close',
'actions' => 'Actions',
'edit' => 'Edit',
'delete' => 'Delete',
'welcomeBack' => 'What\'s playing?',
'everything' => 'Everything',
+ 'today' => 'today',
'customRange' => 'Custom range',
'apply' => 'Apply',
'select_date' => 'Select date..',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Transaction data',
'invalid_server_configuration' => 'Invalid server configuration',
'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are instructions how to do this .',
+ 'quickswitch' => 'Quickswitch',
// search
'search' => 'Search',
@@ -147,7 +150,7 @@ return [
'repeat_freq_half-year' => 'every half-year',
'repeat_freq_quarterly' => 'quarterly',
'repeat_freq_monthly' => 'monthly',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'weekly',
'weekly' => 'weekly',
'quarterly' => 'quarterly',
'half-year' => 'every half year',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Without date',
'result' => 'Result',
'sums_apply_to_range' => 'All sums apply to the selected range',
+ 'mapbox_api_key' => 'To use map, get an API key from Mapbox . Open your .env
file en enter this code after MAPBOX_API_KEY=
.',
'press_tag_location' => 'Right click or long press to set the tag\'s location.',
'clear_location' => 'Clear location',
@@ -586,6 +590,8 @@ return [
'not_expected_period' => 'Not expected this period',
'bill_is_active' => 'Bill is active',
'bill_will_automatch' => 'Bill will automatically linked to matching transactions',
+ 'skips_over' => 'skips over',
+
// accounts:
'details_for_asset' => 'Details for asset account ":name"',
'details_for_expense' => 'Details for expense account ":name"',
@@ -614,6 +620,27 @@ return [
'revenue_accounts' => 'Revenue accounts',
'cash_accounts' => 'Cash accounts',
'Cash account' => 'Cash account',
+ 'reconcile_account' => 'Reconcile account ":account"',
+ 'delete_reconciliation' => 'Delete reconciliation',
+ 'update_reconciliation' => 'Update reconciliation',
+ 'amount_cannot_be_zero' => 'The amount cannot be zero',
+ 'end_of_reconcile_period' => 'End of reconcile period: :period',
+ 'start_of_reconcile_period' => 'Start of reconcile period: :period',
+ 'start_balance' => 'Start balance',
+ 'end_balance' => 'End balance',
+ 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"',
+ 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.',
+ 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"',
+ 'date_change_instruction' => 'If you change the date range now, any progress will be lost.',
+ 'update_selection' => 'Update selection',
+ 'store_reconcile' => 'Store reconciliation',
+ 'reconciliation_transaction' => 'Reconciliation transaction',
+ 'Reconciliation' => 'Reconciliation',
+ 'reconciliation' => 'Reconciliation',
+ 'reconcile_options' => 'Reconciliation options',
+ 'reconcile_range' => 'Reconciliation range',
+ 'start_reconcile' => 'Start reconciling',
+ 'cash' => 'cash',
'account_type' => 'Account type',
'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:',
'stored_new_account' => 'New account ":name" stored!',
@@ -626,6 +653,22 @@ return [
'select_more_than_one_budget' => 'Please select more than one budget',
'select_more_than_one_tag' => 'Please select more than one tag',
'account_default_currency' => 'If you select another currency, new transactions from this account will have this currency pre-selected.',
+ 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.',
+ 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.',
+ 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.',
+ 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.',
+ 'reconcile_go_back' => 'You can always edit or delete a correction later.',
+ 'must_be_asset_account' => 'You can only reconcile asset accounts',
+ 'reconciliation_stored' => 'Reconciliation stored',
+ 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)',
+ 'reconcile_this_account' => 'Reconcile this account',
+ 'confirm_reconciliation' => 'Confirm reconciliation',
+ 'submitted_start_balance' => 'Submitted start balance',
+ 'selected_transactions' => 'Selected transactions (:count)',
+ 'already_cleared_transactions' => 'Already cleared transactions (:count)',
+ 'submitted_end_balance' => 'Submitted end balance',
// categories:
'new_category' => 'New category',
@@ -659,11 +702,11 @@ return [
'stored_journal' => 'Successfully created new transaction ":description"',
'select_transactions' => 'Select transactions',
'stop_selection' => 'Stop selecting transactions',
- 'edit_selected' => 'Edit selected',
- 'delete_selected' => 'Delete selected',
+ 'reconcile_selected' => 'Reconcile',
'mass_delete_journals' => 'Delete a number of transactions',
'mass_edit_journals' => 'Edit a number of transactions',
'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.',
+ 'no_budget' => 'none',
'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.',
'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).',
'mass_edited_transactions_success' => 'Updated :amount transaction(s)',
@@ -699,7 +742,9 @@ return [
'currency' => 'Currency',
'preferences' => 'Preferences',
'logout' => 'Logout',
+ 'toggleNavigation' => 'Toggle navigation',
'searchPlaceholder' => 'Search...',
+ 'version' => 'Version',
'dashboard' => 'Dashboard',
'currencies' => 'Currencies',
'accounts' => 'Accounts',
@@ -925,6 +970,7 @@ return [
'budgets_with_limits' => 'budget(s) with configured amount',
'rule_or_rules' => 'rule(s)',
'rulegroup_or_groups' => 'rule group(s)',
+ 'tag_or_tags' => 'tag(s)',
'configuration_updated' => 'The configuration has been updated',
'setting_is_demo_site' => 'Demo site',
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
@@ -1000,6 +1046,7 @@ return [
'split_this_transfer' => 'Split this transfer',
'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.',
'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.',
+ 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.',
'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.',
'no_edit_multiple_left' => 'You have selected no valid transactions to edit.',
'cannot_convert_split_journal' => 'Cannot convert a split transaction',
@@ -1012,6 +1059,7 @@ return [
'import_index_title' => 'Import data into Firefly III',
'import_index_sub_title' => 'Index',
'import_general_index_intro' => 'Welcome to Firefly\'s import routine. There are a few ways of importing data into Firefly III, displayed here as buttons.',
+ 'import_general_index_csv_file' => 'Import a (CSV) file',
'import_index_intro' => 'This routine will help you import files from your bank into Firefly III. Please check out the help pages in the top right corner.',
'import_index_file' => 'Select your file',
'import_index_config' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file .',
@@ -1095,7 +1143,7 @@ return [
'no_piggies_imperative_default' => 'Do you have things you\'re saving money for? Create a piggy bank and keep track:',
'no_piggies_create_default' => 'Create a new piggy bank',
'no_bills_title_default' => 'Let\'s create a bill!',
- 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent of insurance.',
+ 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.',
'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:',
'no_bills_create_default' => 'Create a bill',
diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php
index 24d6519276..6d7a98c2fe 100644
--- a/resources/lang/en_US/form.php
+++ b/resources/lang/en_US/form.php
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Delete permanently',
'cancel' => 'Cancel',
'targetdate' => 'Target date',
+ 'startdate' => 'Start date',
'tag' => 'Tag',
'under' => 'Under',
'symbol' => 'Symbol',
diff --git a/resources/lang/en_US/list.php b/resources/lang/en_US/list.php
index 992afacc40..8129b082fc 100644
--- a/resources/lang/en_US/list.php
+++ b/resources/lang/en_US/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'ID',
'create_date' => 'Created at',
'update_date' => 'Updated at',
- 'updated_at' => 'Updated at',
+ 'updated_at' => 'Updated at',
'balance_before' => 'Balance before',
'balance_after' => 'Balance after',
'name' => 'Name',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Sum of withdrawals',
'sum_deposits' => 'Sum of deposits',
'sum_transfers' => 'Sum of transfers',
+ 'reconcile' => 'Reconcile',
];
diff --git a/resources/lang/es_ES/bank.php b/resources/lang/es_ES/bank.php
index 11f05b3785..d331576355 100644
--- a/resources/lang/es_ES/bank.php
+++ b/resources/lang/es_ES/bank.php
@@ -1,6 +1,8 @@
'Prerequisites for an import from bunq',
- 'bunq_prerequisites_text' => 'In order to import from bunq, you need to obtain an API key. You can do this through the app.',
-];
\ No newline at end of file
+ 'bunq_prerequisites_title' => 'Requisitos previos para una importación de bunq',
+ 'bunq_prerequisites_text' => 'Para importar de bunq, necesita obtener una clave de API. Puedes hacer esto a través de la aplicación.',
+];
diff --git a/resources/lang/es_ES/breadcrumbs.php b/resources/lang/es_ES/breadcrumbs.php
index be02ccc42a..11056d5703 100644
--- a/resources/lang/es_ES/breadcrumbs.php
+++ b/resources/lang/es_ES/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Ganancia, ingresos y depósitos',
'transfer_list' => 'Transferencias',
'transfers_list' => 'Transferencias',
+ 'reconciliation_list' => 'Reconciliations',
'create_withdrawal' => 'Crear nuevo retiro',
'create_deposit' => 'Crear nuevo depósito',
'create_transfer' => 'Crear nueva transferencia',
'edit_journal' => 'Editar transacción ":description"',
+ 'edit_reconciliation' => 'Edit ":description"',
'delete_journal' => 'Eliminar transacción ":description"',
'tags' => 'Etiquetas',
'createTag' => 'Crear nueva etiqueta',
diff --git a/resources/lang/es_ES/csv.php b/resources/lang/es_ES/csv.php
index 42c5abf09a..452567e105 100644
--- a/resources/lang/es_ES/csv.php
+++ b/resources/lang/es_ES/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'ID de la caja de ahorro (coincide con Firefly)',
'column_account-name' => 'Caja de ahorro (nombre)',
'column_amount' => 'Monto',
+ 'column_amount_debet' => 'Amount (debet column)',
+ 'column_amount_credit' => 'Amount (credit column)',
'column_amount-comma-separated' => 'Monto (coma como separador de decimales)',
'column_bill-id' => 'ID de factura (coincide con Firefly)',
'column_bill-name' => 'Nombre de factura',
diff --git a/resources/lang/es_ES/demo.php b/resources/lang/es_ES/demo.php
index dfb4fc04c7..62a8b022e8 100644
--- a/resources/lang/es_ES/demo.php
+++ b/resources/lang/es_ES/demo.php
@@ -20,7 +20,7 @@ return [
'currencies-index' => 'Firefly III admite múltiples monedas. A pesar de que la moneda por defecto es el Euro, se puede seleccionar el Dólar de EE.UU, y muchas otras monedas. Como se puede ver se ha incluido una pequeña selección de monedas, pero puedes agregar tu propia moneda si lo deseas. Sin embargo, cambiar la moneda predeterminada no cambiará la moneda de las transacciones existentes: Firefly III admite el uso de varias monedas al mismo tiempo.',
'transactions-index' => 'Estos gastos, depósitos y transferencias no son particularmente imaginativos. Se han generado automáticamente.',
'piggy-banks-index' => 'Como puede ver, hay tres alcancías. Utilice los botones más y menos para influir en la cantidad de dinero en cada alcancía. Haga clic en el nombre de la alcancía para ver la administración de cada una.',
- 'import-index' => 'Por supuesto, cualquier archivo CSV puede ser importado en Firefly III',
+ 'import-index' => 'Of course, any CSV file can be imported into Firefly III',
'import-configure-security' => 'Debido a problemas de seguridad, su subida se ha sustituido por un archivo local.',
'import-configure-configuration' => 'La configuración que ves a continuación es correcta para el archivo local.',
];
diff --git a/resources/lang/es_ES/firefly.php b/resources/lang/es_ES/firefly.php
index fe8a9cc315..c567acc384 100644
--- a/resources/lang/es_ES/firefly.php
+++ b/resources/lang/es_ES/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Incomplete translation',
'close' => 'Cerrar',
'actions' => 'Acciones',
'edit' => 'Editar',
'delete' => 'Eliminar',
'welcomeBack' => '¿Qué está pasando?',
'everything' => 'Todo',
+ 'today' => 'today',
'customRange' => 'Rango personalizado',
'apply' => 'Aplicar',
'select_date' => 'Seleccionar fecha...',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Transaction data',
'invalid_server_configuration' => 'Invalid server configuration',
'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are instructions how to do this .',
+ 'quickswitch' => 'Quickswitch',
// search
'search' => 'Buscar',
@@ -147,7 +150,7 @@ return [
'repeat_freq_half-year' => 'every half-year',
'repeat_freq_quarterly' => 'quarterly',
'repeat_freq_monthly' => 'monthly',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'weekly',
'weekly' => 'weekly',
'quarterly' => 'quarterly',
'half-year' => 'every half year',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Without date',
'result' => 'Result',
'sums_apply_to_range' => 'All sums apply to the selected range',
+ 'mapbox_api_key' => 'To use map, get an API key from Mapbox . Open your .env
file en enter this code after MAPBOX_API_KEY=
.',
'press_tag_location' => 'Right click or long press to set the tag\'s location.',
'clear_location' => 'Clear location',
@@ -586,6 +590,8 @@ return [
'not_expected_period' => 'Not expected this period',
'bill_is_active' => 'Bill is active',
'bill_will_automatch' => 'Bill will automatically linked to matching transactions',
+ 'skips_over' => 'skips over',
+
// accounts:
'details_for_asset' => 'Details for asset account ":name"',
'details_for_expense' => 'Details for expense account ":name"',
@@ -614,6 +620,27 @@ return [
'revenue_accounts' => 'Cuentas de ingresos',
'cash_accounts' => 'Cuentas de efectivo',
'Cash account' => 'Cash account',
+ 'reconcile_account' => 'Reconcile account ":account"',
+ 'delete_reconciliation' => 'Delete reconciliation',
+ 'update_reconciliation' => 'Update reconciliation',
+ 'amount_cannot_be_zero' => 'The amount cannot be zero',
+ 'end_of_reconcile_period' => 'End of reconcile period: :period',
+ 'start_of_reconcile_period' => 'Start of reconcile period: :period',
+ 'start_balance' => 'Start balance',
+ 'end_balance' => 'End balance',
+ 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"',
+ 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.',
+ 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"',
+ 'date_change_instruction' => 'If you change the date range now, any progress will be lost.',
+ 'update_selection' => 'Update selection',
+ 'store_reconcile' => 'Store reconciliation',
+ 'reconciliation_transaction' => 'Reconciliation transaction',
+ 'Reconciliation' => 'Reconciliation',
+ 'reconciliation' => 'Reconciliation',
+ 'reconcile_options' => 'Reconciliation options',
+ 'reconcile_range' => 'Reconciliation range',
+ 'start_reconcile' => 'Start reconciling',
+ 'cash' => 'cash',
'account_type' => 'Account type',
'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:',
'stored_new_account' => 'New account ":name" stored!',
@@ -626,6 +653,22 @@ return [
'select_more_than_one_budget' => 'Please select more than one budget',
'select_more_than_one_tag' => 'Please select more than one tag',
'account_default_currency' => 'If you select another currency, new transactions from this account will have this currency pre-selected.',
+ 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.',
+ 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.',
+ 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.',
+ 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.',
+ 'reconcile_go_back' => 'You can always edit or delete a correction later.',
+ 'must_be_asset_account' => 'You can only reconcile asset accounts',
+ 'reconciliation_stored' => 'Reconciliation stored',
+ 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)',
+ 'reconcile_this_account' => 'Reconcile this account',
+ 'confirm_reconciliation' => 'Confirm reconciliation',
+ 'submitted_start_balance' => 'Submitted start balance',
+ 'selected_transactions' => 'Selected transactions (:count)',
+ 'already_cleared_transactions' => 'Already cleared transactions (:count)',
+ 'submitted_end_balance' => 'Submitted end balance',
// categories:
'new_category' => 'New category',
@@ -659,11 +702,11 @@ return [
'stored_journal' => 'Successfully created new transaction ":description"',
'select_transactions' => 'Select transactions',
'stop_selection' => 'Stop selecting transactions',
- 'edit_selected' => 'Edit selected',
- 'delete_selected' => 'Delete selected',
+ 'reconcile_selected' => 'Reconcile',
'mass_delete_journals' => 'Delete a number of transactions',
'mass_edit_journals' => 'Edit a number of transactions',
'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.',
+ 'no_budget' => '(no budget)',
'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.',
'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).',
'mass_edited_transactions_success' => 'Updated :amount transaction(s)',
@@ -699,7 +742,9 @@ return [
'currency' => 'Currency',
'preferences' => 'Preferencias',
'logout' => 'Cerrar sesión',
+ 'toggleNavigation' => 'Toggle navigation',
'searchPlaceholder' => 'Buscar...',
+ 'version' => 'Version',
'dashboard' => 'Panel de control',
'currencies' => 'Divisas',
'accounts' => 'Cuentas',
@@ -925,6 +970,7 @@ return [
'budgets_with_limits' => 'presupuesto(s) con el importe configurado',
'rule_or_rules' => 'regla(s)',
'rulegroup_or_groups' => 'rule group(s)',
+ 'tag_or_tags' => 'tag(s)',
'configuration_updated' => 'The configuration has been updated',
'setting_is_demo_site' => 'Demo site',
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
@@ -1000,6 +1046,7 @@ return [
'split_this_transfer' => 'Split this transfer',
'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.',
'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.',
+ 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.',
'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.',
'no_edit_multiple_left' => 'You have selected no valid transactions to edit.',
'cannot_convert_split_journal' => 'Cannot convert a split transaction',
@@ -1012,6 +1059,7 @@ return [
'import_index_title' => 'Importar datos a Firefly III',
'import_index_sub_title' => 'Índice',
'import_general_index_intro' => 'Welcome to Firefly\'s import routine. There are a few ways of importing data into Firefly III, displayed here as buttons.',
+ 'import_general_index_csv_file' => 'Import a (CSV) file',
'import_index_intro' => 'This routine will help you import files from your bank into Firefly III. Please check out the help pages in the top right corner.',
'import_index_file' => 'Select your file',
'import_index_config' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file .',
@@ -1095,7 +1143,7 @@ return [
'no_piggies_imperative_default' => 'Do you have things you\'re saving money for? Create a piggy bank and keep track:',
'no_piggies_create_default' => 'Create a new piggy bank',
'no_bills_title_default' => '¡Vamos a crear una factura!',
- 'no_bills_intro_default' => 'Aún no tienes facturas. Puedes crear facturas para realizar un seguimiento de los gastos periódicos, como el alquiler o un seguro.',
+ 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.',
'no_bills_imperative_default' => '¿Tienes facturas periódicas? Crea una factura y haz un seguimiento de tus pagos:',
'no_bills_create_default' => 'Crear una factura',
diff --git a/resources/lang/es_ES/form.php b/resources/lang/es_ES/form.php
index ae0dcf5931..e201f9d429 100644
--- a/resources/lang/es_ES/form.php
+++ b/resources/lang/es_ES/form.php
@@ -30,25 +30,25 @@ return [
'currency_id' => 'Divisa',
'attachments' => 'Adjuntos',
'journal_amount' => 'Importe',
- 'journal_source_account_name' => 'Revenue account (source)',
- 'journal_source_account_id' => 'Asset account (source)',
+ 'journal_source_account_name' => 'Cuenta de ingresos (origen)',
+ 'journal_source_account_id' => 'Cuenta de activos (origen)',
'BIC' => 'BIC',
'verify_password' => 'Verificar la seguridad de contraseña',
'source_account' => 'Cuenta origen',
'destination_account' => 'Cuenta destino',
- 'journal_destination_account_id' => 'Asset account (destination)',
- 'asset_destination_account' => 'Asset account (destination)',
- 'asset_source_account' => 'Asset account (source)',
+ 'journal_destination_account_id' => 'Cuenta de activos (destino)',
+ 'asset_destination_account' => 'Cuenta de activos (destino)',
+ 'asset_source_account' => 'Cuenta de activos (origen)',
'journal_description' => 'Descripción',
'note' => 'Notas',
- 'split_journal' => 'Split this transaction',
- 'split_journal_explanation' => 'Split this transaction in multiple parts',
+ 'split_journal' => 'Dividir esta transacción',
+ 'split_journal_explanation' => 'Dividir esta transacción en múltiples partes',
'currency' => 'Divisa',
'account_id' => 'Cuenta',
'budget_id' => 'Presupuesto',
'openingBalance' => 'Saldo inicial',
'tagMode' => 'Modo de etiqueta',
- 'tag_position' => 'Tag location',
+ 'tag_position' => 'Etiquetar ubicación',
'virtualBalance' => 'Saldo virtual',
'targetamount' => 'Cantidad objetivo',
'accountRole' => 'Tipo de cuenta',
@@ -67,16 +67,16 @@ return [
'source_amount' => 'Importe (origen)',
'destination_amount' => 'Importe (destino)',
'native_amount' => 'Native amount',
- 'new_email_address' => 'New email address',
- 'verification' => 'Verification',
- 'api_key' => 'API key',
+ 'new_email_address' => 'Nueva dirección de email',
+ 'verification' => 'Verificación',
+ 'api_key' => 'Clave de API',
- 'source_account_asset' => 'Source account (asset account)',
- 'destination_account_expense' => 'Destination account (expense account)',
- 'destination_account_asset' => 'Destination account (asset account)',
- 'source_account_revenue' => 'Source account (revenue account)',
+ 'source_account_asset' => 'Cuenta de origen (cuenta de activos)',
+ 'destination_account_expense' => 'Cuenta de destino (cuenta de gastos)',
+ 'destination_account_asset' => 'Cuenta de destino (cuenta de activos)',
+ 'source_account_revenue' => 'Cuenta de origen (cuenta de ingresos)',
'type' => 'Tipo',
- 'convert_Withdrawal' => 'Convert withdrawal',
+ 'convert_Withdrawal' => 'Convertir extracción',
'convert_Deposit' => 'Convertir depósito',
'convert_Transfer' => 'Convertir transferencia',
@@ -90,7 +90,8 @@ return [
'tags' => 'Etiquetas',
'deletePermanently' => 'Borrar permanentemente',
'cancel' => 'Cancelar',
- 'targetdate' => 'Target date',
+ 'targetdate' => 'Fecha tope',
+ 'startdate' => 'Start date',
'tag' => 'Etiqueta',
'under' => 'Under',
'symbol' => 'Símbolo',
@@ -117,50 +118,50 @@ return [
'stop_processing' => 'Detener el procesamiento',
'start_date' => 'Inicio del rango',
'end_date' => 'Final del rango',
- 'export_start_range' => 'Start of export range',
- 'export_end_range' => 'End of export range',
+ 'export_start_range' => 'Inicio del rango de exportación',
+ 'export_end_range' => 'Fin del rango de exportación',
'export_format' => 'Formato del archivo',
'include_attachments' => 'Incluir archivos adjuntos subidos',
'include_old_uploads' => 'Incluir datos importados',
- 'accounts' => 'Export transactions from these accounts',
- 'delete_account' => 'Delete account ":name"',
- 'delete_bill' => 'Delete bill ":name"',
- 'delete_budget' => 'Delete budget ":name"',
- 'delete_category' => 'Delete category ":name"',
+ 'accounts' => 'Exportar transacciones de estas cuentas',
+ 'delete_account' => 'Borrar cuenta ":name"',
+ 'delete_bill' => 'Eliminar factura ":name"',
+ 'delete_budget' => 'Eliminar presupuesto ":name"',
+ 'delete_category' => 'Eliminar categoría ":name"',
'delete_currency' => 'Eliminar divisa ":name"',
'delete_journal' => 'Eliminar la transacción con descripción ":description"',
'delete_attachment' => 'Eliminar adjunto ":name"',
'delete_rule' => 'Eliminar regla ":title"',
'delete_rule_group' => 'Eliminar grupo de reglas ":title"',
'delete_link_type' => 'Eliminar tipo de enlace ":name"',
- 'delete_user' => 'Delete user ":email"',
- 'user_areYouSure' => 'If you delete user ":email", everything will be gone. There is no undo, undelete or anything. If you delete yourself, you will lose access to this instance of Firefly III.',
- 'attachment_areYouSure' => 'Are you sure you want to delete the attachment named ":name"?',
- 'account_areYouSure' => 'Are you sure you want to delete the account named ":name"?',
- 'bill_areYouSure' => 'Are you sure you want to delete the bill named ":name"?',
- 'rule_areYouSure' => 'Are you sure you want to delete the rule titled ":title"?',
- 'ruleGroup_areYouSure' => 'Are you sure you want to delete the rule group titled ":title"?',
- 'budget_areYouSure' => 'Are you sure you want to delete the budget named ":name"?',
- 'category_areYouSure' => 'Are you sure you want to delete the category named ":name"?',
- 'currency_areYouSure' => 'Are you sure you want to delete the currency named ":name"?',
- 'piggyBank_areYouSure' => 'Are you sure you want to delete the piggy bank named ":name"?',
- 'journal_areYouSure' => 'Are you sure you want to delete the transaction described ":description"?',
+ 'delete_user' => 'Eliminar usuario ":email"',
+ 'user_areYouSure' => 'Si elimina usuario ":email", todo desaparecerá. No hay deshacer, recuperar ni nada. Si te eliminas, perderás el acceso a esta instancia de Firefly III.',
+ 'attachment_areYouSure' => '¿Seguro que quieres eliminar el archivo adjunto llamado "name"?',
+ 'account_areYouSure' => '¿Seguro que quieres eliminar la cuenta llamada ":name"?',
+ 'bill_areYouSure' => '¿Seguro que quieres eliminar la factura llamada ":name"?',
+ 'rule_areYouSure' => '¿Seguro que quieres eliminar la regla titulada ":title"?',
+ 'ruleGroup_areYouSure' => '¿Seguro que quieres eliminar el grupo de reglas titulado ":title"?',
+ 'budget_areYouSure' => '¿Seguro que quieres eliminar el presupuesto llamado ":name"?',
+ 'category_areYouSure' => '¿Seguro que quieres eliminar la categoría llamada ":name"?',
+ 'currency_areYouSure' => '¿Está seguro que desea eliminar la moneda denominada ":name"?',
+ 'piggyBank_areYouSure' => '¿Está seguro que desea eliminar la hucha llamada ":name"?',
+ 'journal_areYouSure' => '¿Estás seguro de que deseas eliminar la transacción descrita ":description"?',
'mass_journal_are_you_sure' => 'Are you sure you want to delete these transactions?',
- 'tag_areYouSure' => 'Are you sure you want to delete the tag ":tag"?',
- 'journal_link_areYouSure' => 'Are you sure you want to delete the link between :source and :destination ?',
- 'linkType_areYouSure' => 'Are you sure you want to delete the link type ":name" (":inward" / ":outward")?',
- 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.',
- 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.',
- 'delete_all_permanently' => 'Delete selected permanently',
- 'update_all_journals' => 'Update these transactions',
- 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.',
- 'also_delete_connections' => 'The only transaction linked with this link type will lose this connection.|All :count transactions linked with this link type will lose their connection.',
- 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.',
- 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.',
- 'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will spared deletion.',
- 'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.',
- 'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.',
- 'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.',
+ 'tag_areYouSure' => '¿Seguro que quieres eliminar la etiqueta ":tag"?',
+ 'journal_link_areYouSure' => '¿Seguro que quieres eliminar el vínculo entre :source y :destination ?',
+ 'linkType_areYouSure' => '¿Estás seguro de que deseas eliminar el tipo de vínculo ":name" (":inward" / ":outward")?',
+ 'permDeleteWarning' => 'Eliminar cosas de Firely es permanente y no se puede deshacer.',
+ 'mass_make_selection' => 'Aún puede evitar que se eliminen elementos quitando la casilla de verificación.',
+ 'delete_all_permanently' => 'Eliminar selección permanentemente',
+ 'update_all_journals' => 'Actualiza estas transacciones',
+ 'also_delete_transactions' => 'La única transacción conectada a esta cuenta también se eliminará. | Todas las :count transacciones conectadas a esta cuenta también se eliminarán.',
+ 'also_delete_connections' => 'La única transacción vinculada con este tipo de enlace perderá esta conexión. | Todas las :count transacciones vinculadas con este tipo de enlace perderán su conexión.',
+ 'also_delete_rules' => 'La única regla conectada a este grupo de reglas también se eliminará. | Todas las :count reglas conectadas a este grupo de reglas también se eliminarán.',
+ 'also_delete_piggyBanks' => 'La única alcancía conectada a esta cuenta también se eliminará. | Todas las :count alcancías conectadas a esta cuenta también se eliminará.',
+ 'bill_keep_transactions' => 'La única transacción conectada a esta factura no se eliminará. | Todas las :count transacciones conectadas a esta factura evitarán la eliminación.',
+ 'budget_keep_transactions' => 'La única transacción conectada a este presupuesto no se eliminará. | Todas las :count transacciones conectadas a este presupuesto evitarán la eliminación.',
+ 'category_keep_transactions' => 'La única transacción conectada a esta categoría no se eliminará. | Todas las :count transacciones conectadas a esta categoría evitarán la eliminación.',
+ 'tag_keep_transactions' => 'La única transacción conectada a esta etiqueta no se eliminará. | Todas las :count transacciones conectadas a esta etiqueta evitarán la eliminación.',
'email' => 'Correo electrónico',
'password' => 'Contraseña',
@@ -171,27 +172,27 @@ return [
// admin
'domain' => 'Dominio',
- 'single_user_mode' => 'Disable user registration',
+ 'single_user_mode' => 'Deshabilitar registro de usuario',
'is_demo_site' => 'Está en modo demostración',
// import
'import_file' => 'Importar archivo',
'configuration_file' => 'Archivo de configuración',
- 'import_file_type' => 'Import file type',
- 'csv_comma' => 'A comma (,)',
- 'csv_semicolon' => 'A semicolon (;)',
- 'csv_tab' => 'A tab (invisible)',
- 'csv_delimiter' => 'CSV field delimiter',
- 'csv_import_account' => 'Default import account',
- 'csv_config' => 'CSV import configuration',
+ 'import_file_type' => 'Importar tipo de archivo',
+ 'csv_comma' => 'Una coma (,)',
+ 'csv_semicolon' => 'Un punto y coma (;)',
+ 'csv_tab' => 'Un tabulador (invisible)',
+ 'csv_delimiter' => 'Delimitador de campo CSV',
+ 'csv_import_account' => 'Cuenta de importación predeterminada',
+ 'csv_config' => 'Configuración de importación de CSV',
- 'due_date' => 'Due date',
- 'payment_date' => 'Payment date',
- 'invoice_date' => 'Invoice date',
- 'internal_reference' => 'Internal reference',
- 'inward' => 'Inward description',
- 'outward' => 'Outward description',
- 'rule_group_id' => 'Rule group',
+ 'due_date' => 'Fecha de vencimiento',
+ 'payment_date' => 'Fecha de pago',
+ 'invoice_date' => 'Fecha de la factura',
+ 'internal_reference' => 'Referencia interna',
+ 'inward' => 'Descripción interna',
+ 'outward' => 'Descripción externa',
+ 'rule_group_id' => 'Grupo de reglas',
];
diff --git a/resources/lang/es_ES/list.php b/resources/lang/es_ES/list.php
index 77824e1ef7..d658e4995b 100644
--- a/resources/lang/es_ES/list.php
+++ b/resources/lang/es_ES/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'ID',
'create_date' => 'Fecha de creación',
'update_date' => 'Fecha de modificación',
- 'updated_at' => 'Updated at',
+ 'updated_at' => 'Updated at',
'balance_before' => 'Balance antes de ',
'balance_after' => 'Balance después de la',
'name' => 'Nombre',
@@ -83,10 +83,11 @@ return [
'inward' => 'Descripción interna',
'outward' => 'Descripción externa',
'number_of_transactions' => 'Número de transacciones',
- 'total_amount' => 'Total amount',
- 'sum' => 'Sum',
+ 'total_amount' => 'Total',
+ 'sum' => 'Suma',
'sum_excluding_transfers' => 'Sum (excluding transfers)',
'sum_withdrawals' => 'Sum of withdrawals',
'sum_deposits' => 'Sum of deposits',
- 'sum_transfers' => 'Sum of transfers',
+ 'sum_transfers' => 'Suma de transferencias',
+ 'reconcile' => 'Reconcile',
];
diff --git a/resources/lang/fr_FR/bank.php b/resources/lang/fr_FR/bank.php
index e15a71094d..dc45c22851 100644
--- a/resources/lang/fr_FR/bank.php
+++ b/resources/lang/fr_FR/bank.php
@@ -1,6 +1,8 @@
'Pré-requis pour un import depuis Bunq',
'bunq_prerequisites_text' => 'Pour pouvoir importer depuis Bunq, vous avez besoin d\'obtenir une clé API. Vous pouvez faire celà depuis l\'appli.',
-];
\ No newline at end of file
+];
diff --git a/resources/lang/fr_FR/breadcrumbs.php b/resources/lang/fr_FR/breadcrumbs.php
index f807e4aedb..20ac87c186 100644
--- a/resources/lang/fr_FR/breadcrumbs.php
+++ b/resources/lang/fr_FR/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Revenu, salaire et versements',
'transfer_list' => 'Virements',
'transfers_list' => 'Virements',
+ 'reconciliation_list' => 'Rapprochements',
'create_withdrawal' => 'Créer un nouveau retrait',
'create_deposit' => 'Créer un nouveau versement',
'create_transfer' => 'Créer un nouveau virement',
'edit_journal' => 'Éditer la transaction ":description"',
+ 'edit_reconciliation' => 'Éditer ":description"',
'delete_journal' => 'Supprimer la transaction ":description"',
'tags' => 'Mots-clés',
'createTag' => 'Créer un nouveau mot-clé',
diff --git a/resources/lang/fr_FR/csv.php b/resources/lang/fr_FR/csv.php
index 0d678882b7..b9cd03e7a1 100644
--- a/resources/lang/fr_FR/csv.php
+++ b/resources/lang/fr_FR/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'Compte d\'actif (ID correspondant à Firefly)',
'column_account-name' => 'Compte d’actif (nom)',
'column_amount' => 'Montant',
+ 'column_amount_debet' => 'Montant (colonne débit)',
+ 'column_amount_credit' => 'Montant (colonne de crédit)',
'column_amount-comma-separated' => 'Montant (virgule comme séparateur décimal)',
'column_bill-id' => 'Facture (ID correspondant à Firefly)',
'column_bill-name' => 'Nom de la facture',
diff --git a/resources/lang/fr_FR/demo.php b/resources/lang/fr_FR/demo.php
index fbb7aaa450..6466b291ac 100644
--- a/resources/lang/fr_FR/demo.php
+++ b/resources/lang/fr_FR/demo.php
@@ -20,7 +20,7 @@ return [
'currencies-index' => 'Firefly III prend en charge plusieurs devises. Bien que l\'Euro soit la devise par défaut, cette dernière peut être changée pour le Dollar américain et de nombreuses autres devises. Comme vous pouvez le remarquer une petite sélection des monnaies a été incluse, mais vous pouvez ajouter vos propres devises si vous le souhaitez. Gardez à l\'esprit que la modification de la devise par défaut ne modifie pas la monnaie des transactions existantes : Firefly III prend en charge l’utilisation de plusieurs devises en même temps.',
'transactions-index' => 'Ces dépenses, dépôts et transferts ne sont pas particulièrement imaginatifs. Ils ont été générés automatiquement.',
'piggy-banks-index' => 'Comme vous pouvez le voir, il y a trois tirelires. Utilisez les boutons plus et moins pour influer sur le montant d’argent dans chaque tirelire. Cliquez sur le nom de la tirelire pour voir l’administration pour chaque tirelire.',
- 'import-index' => 'Bien sûr, n’importe quel fichier CSV peut être importé dans Firefly III ',
+ 'import-index' => 'Bien sûr, n’importe quel fichier CSV peut être importé dans Firefly III',
'import-configure-security' => 'Pour des raisons de sécurité, votre téléchargement a été remplacé par un fichier local.',
'import-configure-configuration' => 'La configuration que vous voyez ci-dessous est correcte pour le fichier local.',
];
diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php
index 8f249119da..b9d082f29b 100644
--- a/resources/lang/fr_FR/firefly.php
+++ b/resources/lang/fr_FR/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Traduction incomplète',
'close' => 'Fermer',
'actions' => 'Actions',
'edit' => 'Modifier',
'delete' => 'Supprimer',
'welcomeBack' => 'Que se passe-t-il ?',
'everything' => 'Tout',
+ 'today' => 'aujourd\'hui',
'customRange' => 'Etendue personnalisée',
'apply' => 'Appliquer',
'select_date' => 'Sélectionner une date..',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Données de transaction',
'invalid_server_configuration' => 'Configuration de serveur invalide',
'invalid_locale_settings' => 'Firefly III ne parvient pas à formater les montants monétaires car il manque des paquets logiciels sur votre serveur. Voici des insctructions sur comment procéder .',
+ 'quickswitch' => 'Changement rapide',
// search
'search' => 'Rechercher',
@@ -144,10 +147,10 @@ return [
// repeat frequencies:
'repeat_freq_yearly' => 'annuellement',
- 'repeat_freq_half-year' => 'every half-year',
- 'repeat_freq_quarterly' => 'quarterly',
+ 'repeat_freq_half-year' => 'semestriel',
+ 'repeat_freq_quarterly' => 'trimestriel',
'repeat_freq_monthly' => 'mensuel',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'hebdomadaire',
'weekly' => 'hebdomadaire',
'quarterly' => 'trimestriel',
'half-year' => 'semestriel',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Sans date',
'result' => 'Résultat',
'sums_apply_to_range' => 'Toutes les sommes s\'appliquent à l\'ensemble sélectionné',
+ 'mapbox_api_key' => 'Pour utiliser la carte, obtenez une clé API à partir de Mapbox . Ouvrez votre fichier .env
et entrez ce code après MAPBOX_API_KEY =
.',
'press_tag_location' => 'Faites un clic droit ou appuyez longuement sur pour définir l\'emplacement de l\'étiquette.',
'clear_location' => 'Effacer la localisation',
@@ -587,6 +591,8 @@ return [
'not_expected_period' => 'Cette période n\'est pas prévu',
'bill_is_active' => 'Facture en cours',
'bill_will_automatch' => 'La facture sera automatiquement liée aux transactions correspondantes',
+ 'skips_over' => 'saute',
+
// accounts:
'details_for_asset' => 'Détails pour le compte d’actif ":name"',
'details_for_expense' => 'Détail du compte de dépenses ":name"',
@@ -615,6 +621,27 @@ return [
'revenue_accounts' => 'Comptes de recettes',
'cash_accounts' => 'Comptes de trésorerie',
'Cash account' => 'Compte de trésorerie',
+ 'reconcile_account' => 'Rapprocher le compte ":account"',
+ 'delete_reconciliation' => 'Supprimer le rapprochement',
+ 'update_reconciliation' => 'Mettre à jour le rapprochement',
+ 'amount_cannot_be_zero' => 'Le montant ne peut pas être zéro',
+ 'end_of_reconcile_period' => 'Fin de la période de rapptrochement : :period',
+ 'start_of_reconcile_period' => 'Début de la période de rapprochement : :period',
+ 'start_balance' => 'Solde initial',
+ 'end_balance' => 'Solde de clotûre',
+ 'update_balance_dates_instruction' => 'Faites correspondre les montants et les dates ci-dessus à votre relevé bancaire et appuyez sur "Démarrer le rapprochement"',
+ 'select_transactions_instruction' => 'Sélectionnez les transactions qui apparaissent sur votre relevé bancaire.',
+ 'select_range_and_balance' => 'Vérifiez d\'abord la plage de dates et les soldes. Puis appuyez sur "Démarrer le rapprochement"',
+ 'date_change_instruction' => 'Si vous modifiez la plage de dates maintenant, toute progression sera perdue.',
+ 'update_selection' => 'Mettre à jour la sélection',
+ 'store_reconcile' => 'Stocker le rapprochement',
+ 'reconciliation_transaction' => 'Transaction de rapprochement',
+ 'Reconciliation' => 'Rapprochement',
+ 'reconciliation' => 'Rapprochement',
+ 'reconcile_options' => 'Options de rapprochement',
+ 'reconcile_range' => 'Plage de rapprochement',
+ 'start_reconcile' => 'Commencer le rapprochement',
+ 'cash' => 'espèce',
'account_type' => 'Type de compte',
'save_transactions_by_moving' => 'Enregistrer ces opération(s) en les déplaçant vers un autre compte :',
'stored_new_account' => 'Nouveau compte ":name" créé !',
@@ -627,6 +654,22 @@ return [
'select_more_than_one_budget' => 'Veuillez sélectionner plus d\'un budget',
'select_more_than_one_tag' => 'Veuillez sélectionner plus d\'un tag',
'account_default_currency' => 'Si vous sélectionnez une autre monnaie, les nouvelles transactions de ce compte auront cette monnaie pré-sélectionnées.',
+ 'reconcile_has_more' => 'Votre registre Firefly III a plus d\'argent que ce que votre banque prétend que vous devriez avoir. Il y a plusieurs options. S\'il vous plaît choisir quoi faire. Ensuite, appuyez sur "Confirmer le rapprochement".',
+ 'reconcile_has_less' => 'Votre registre Firefly III a moins d\'argent que ce que votre banque prétend que vous devriez avoir. Il y a plusieurs options. S\'il vous plaît choisir quoi faire. Ensuite, appuyez sur "Confirmer le rapprochement".',
+ 'reconcile_is_equal' => 'Votre registre Firefly III et vos relevés bancaires correspondent. Il n\'y a rien à faire. S\'il vous plaît appuyez sur "Confirmer le rapprochement" pour confirmer votre entrée.',
+ 'create_pos_reconcile_transaction' => 'Effacez les transactions sélectionnées et créez une correction en ajoutant :amount à ce compte d\'actif.',
+ 'create_neg_reconcile_transaction' => 'Effacez les transactions sélectionnées et créez une correction en enlevant :amount à ce compte d\'actif.',
+ 'reconcile_do_nothing' => 'Effacez les transactions sélectionnées, mais ne les corrigez pas.',
+ 'reconcile_go_back' => 'Vous pouvez toujours modifier ou supprimer une correction ultérieurement.',
+ 'must_be_asset_account' => 'Vous pouvez uniquement rapprocher les comptes d\'actifs',
+ 'reconciliation_stored' => 'Rapprochement stocké',
+ 'reconcilliation_transaction_title' => 'Rapprochement (:from vers :to)',
+ 'reconcile_this_account' => 'Rapprocher ce compte',
+ 'confirm_reconciliation' => 'Confirmer le rapprochement',
+ 'submitted_start_balance' => 'Solde initial soumis',
+ 'selected_transactions' => 'Transactions sélectionnées ( :count)',
+ 'already_cleared_transactions' => 'Transactions déjà effacées ( :count)',
+ 'submitted_end_balance' => 'Solde final soumis',
// categories:
'new_category' => 'Nouvelle catégorie',
@@ -660,11 +703,11 @@ return [
'stored_journal' => 'Opération créée avec succès ":description"',
'select_transactions' => 'Sélectionner des opérations',
'stop_selection' => 'Arrêter de sélectionner les transactions',
- 'edit_selected' => 'Modifier la sélection',
- 'delete_selected' => 'Supprimer la sélection',
+ 'reconcile_selected' => 'Rapproché',
'mass_delete_journals' => 'Supprimer un certain nombre de transactions',
'mass_edit_journals' => 'Modifier un certain nombre d’opérations',
'cannot_edit_other_fields' => 'Vous ne peut pas modifier en masse d\'autres champs que ceux ici, car il n’y a pas de place pour tous les montrer. S’il vous plaît suivez le lien et modifiez les par un par un, si vous devez modifier ces champs.',
+ 'no_budget' => '(pas de budget)',
'perm-delete-many' => 'Supprimer de nombreux éléments en une seule fois peut être très problématique. Soyez prudent.',
'mass_deleted_transactions_success' => 'Montant des opérations supprimées : :amount.',
'mass_edited_transactions_success' => 'Montant des opérations mises à jour : :amount',
@@ -700,7 +743,9 @@ return [
'currency' => 'Devise',
'preferences' => 'Préférences',
'logout' => 'Se déconnecter',
+ 'toggleNavigation' => 'Activer navigation',
'searchPlaceholder' => 'Rechercher...',
+ 'version' => 'Version',
'dashboard' => 'Tableau de Bord',
'currencies' => 'Devises',
'accounts' => 'Comptes',
@@ -710,7 +755,7 @@ return [
'Revenue account' => 'Compte de recettes',
'Initial balance account' => 'Balance initiale',
'budgets' => 'Budgets',
- 'tags' => 'Tags',
+ 'tags' => 'Mots-clés',
'reports' => 'Rapports',
'transactions' => 'Opérations',
'expenses' => 'Dépenses',
@@ -915,7 +960,7 @@ return [
'firefly_instance_configuration' => 'Options de configuration pour Firefly III',
'setting_single_user_mode' => 'Mode utilisateur unique',
'setting_single_user_mode_explain' => 'Par défaut, Firefly III accepte uniquement un (1) enregistrement : vous. Il s\'agit d\'une mesure de sécurité qui empêche les autres d\'utiliser votre instance, à moins que vous ne les autorisiez. Les enregistrements futurs sont bloqués. Lorsque vous désactivez cette case, d\'autres personnes peuvent utiliser votre instance aussi bien, en supposant qu\'elles puissent l\'atteindre (quand il est connecté à Internet).',
- 'store_configuration' => 'Configuration de la boutique',
+ 'store_configuration' => 'Sauvegarder la configuration',
'single_user_administration' => 'Gestion de l\'utilisateur pour :email',
'edit_user' => 'Modifier l\'utilisateur :email',
'hidden_fields_preferences' => 'Tous les champs ne sont pas visibles dès maintenant. Vous devez les activer dans vos paramètres .',
@@ -926,6 +971,7 @@ return [
'budgets_with_limits' => 'budget(s) avec montant configuré',
'rule_or_rules' => 'règle(s)',
'rulegroup_or_groups' => 'groupe(s) de règles',
+ 'tag_or_tags' => 'tag (s)',
'configuration_updated' => 'La configuration a été mise à jour',
'setting_is_demo_site' => 'Site de démonstration',
'setting_is_demo_site_explain' => 'Si vous cochez cette case, cette installation se comportera comme si c\'était le site de démonstration, ce qui peut engendrer des effets secondaires étranges.',
@@ -1001,6 +1047,7 @@ return [
'split_this_transfer' => 'Scinder ce transfert',
'cannot_edit_multiple_source' => 'Vous ne pouvez pas modifier la transaction scindée #:id avec la description ":description" car elle contient plusieurs comptes sources.',
'cannot_edit_multiple_dest' => 'Vous ne pouvez pas modifier la transaction scindée #:id avec la description ":description" car elle contient plusieurs comptes de destination.',
+ 'cannot_edit_reconciled' => 'Vous ne pouvez pas modifier transaction #: id avec la description ": description" car elle a été marquée comme rapprochée.',
'cannot_edit_opening_balance' => 'Vous ne pouvez pas modifier le solde d\'ouverture d\'un compte.',
'no_edit_multiple_left' => 'Vous n\'avez sélectionné aucune transaction valide à éditer.',
'cannot_convert_split_journal' => 'Vous ne pouvez pas convertir une transaction ventilée',
@@ -1013,6 +1060,7 @@ return [
'import_index_title' => 'Importer des données dans Firefly III',
'import_index_sub_title' => 'Index',
'import_general_index_intro' => 'Bienvenue dans la routine d\'importation de Firefly. Il existe différentes façons d\'importer des données dans Firefly III, affichées ici sous forme de boutons.',
+ 'import_general_index_csv_file' => 'Importer un fichier CSV',
'import_index_intro' => 'Cette routine vous aidera à importer des fichiers de votre banque dans Firefly III. Consultez les pages d\'aide en haut à droite.',
'import_index_file' => 'Sélectionnez votre fichier',
'import_index_config' => 'Si vous avez précédemment importé des données dans Firefly III, vous pouvez avoir un fichier de configuration qui définira les valeurs de configuration. Pour certaines banques, les autres utilisateurs ont bien voulu fournir leur fichier configuration .',
@@ -1096,7 +1144,7 @@ return [
'no_piggies_imperative_default' => 'Avez-vous des choses pour lesquelles vous économisez de l\'argent ? Créer une tirelire et suivez-là :',
'no_piggies_create_default' => 'Créer une nouvelle tirelire',
'no_bills_title_default' => 'Nous allons créer une facture !',
- 'no_bills_intro_default' => 'Vous n\'avez pas encore de factures. Vous pouvez créer des factures pour suivre les dépenses ordinaires, comme votre loyer d\'assurance.',
+ 'no_bills_intro_default' => 'Vous n\'avez pas encore de factures. Vous pouvez créer des factures pour suivre les dépenses ordinaires, comme votre loyer ou l\'assurance.',
'no_bills_imperative_default' => 'Avez-vous des factures régulières ? Créez une facture et suivez vos paiements :',
'no_bills_create_default' => 'Créer une facture',
diff --git a/resources/lang/fr_FR/form.php b/resources/lang/fr_FR/form.php
index 713da77a23..7c8f86d20e 100644
--- a/resources/lang/fr_FR/form.php
+++ b/resources/lang/fr_FR/form.php
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Supprimer définitivement',
'cancel' => 'Annuler',
'targetdate' => 'Date cible',
+ 'startdate' => 'Date de début',
'tag' => 'Mot-clé',
'under' => 'En dessous de',
'symbol' => 'Symbole',
@@ -171,7 +172,7 @@ return [
// admin
'domain' => 'Domaine',
- 'single_user_mode' => 'Disable user registration',
+ 'single_user_mode' => 'Désactiver le formulaire d\'inscription',
'is_demo_site' => 'Est un site de démonstration',
diff --git a/resources/lang/fr_FR/list.php b/resources/lang/fr_FR/list.php
index 7851f5e0a2..d857ad4361 100644
--- a/resources/lang/fr_FR/list.php
+++ b/resources/lang/fr_FR/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'Identifiant',
'create_date' => 'Créé le',
'update_date' => 'Mis à jour le',
- 'updated_at' => 'Mis à jour le',
+ 'updated_at' => 'Mis à jour le',
'balance_before' => 'Solde avant',
'balance_after' => 'Solde après',
'name' => 'Nom',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Somme des retraits',
'sum_deposits' => 'Somme des dépôts',
'sum_transfers' => 'Somme des transferts',
+ 'reconcile' => 'Rapprocher',
];
diff --git a/resources/lang/id_ID/bank.php b/resources/lang/id_ID/bank.php
index 189df0107b..7a4a8d1b11 100644
--- a/resources/lang/id_ID/bank.php
+++ b/resources/lang/id_ID/bank.php
@@ -1,6 +1,8 @@
'Prasyarat untuk impor dari bunq',
'bunq_prerequisites_text' => 'Untuk mengimpor dari bunq, Anda perlu mendapatkan kunci API. Anda dapat melakukan ini melalui aplikasi.',
-];
\ No newline at end of file
+];
diff --git a/resources/lang/id_ID/breadcrumbs.php b/resources/lang/id_ID/breadcrumbs.php
index 0e8a1deda7..52438bb1cf 100644
--- a/resources/lang/id_ID/breadcrumbs.php
+++ b/resources/lang/id_ID/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Pendapatan, pemasukan, dan deposit',
'transfer_list' => 'Transfer',
'transfers_list' => 'Transfer',
+ 'reconciliation_list' => 'Reconciliations',
'create_withdrawal' => 'Buat penarikan baru',
'create_deposit' => 'Buat deposit baru',
'create_transfer' => 'Buat transfer baru',
'edit_journal' => 'Edit transaksi ":description"',
+ 'edit_reconciliation' => 'Edit ":description"',
'delete_journal' => 'Hapus transaksi ":description"',
'tags' => 'Label',
'createTag' => 'Buat label baru',
diff --git a/resources/lang/id_ID/csv.php b/resources/lang/id_ID/csv.php
index ff1c20c9ae..21209b6726 100644
--- a/resources/lang/id_ID/csv.php
+++ b/resources/lang/id_ID/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'ID akun aset (yang cocok dengan Firefly)',
'column_account-name' => 'Akun aset (nama)',
'column_amount' => 'Jumlah',
+ 'column_amount_debet' => 'Amount (debet column)',
+ 'column_amount_credit' => 'Amount (credit column)',
'column_amount-comma-separated' => 'Jumlah (koma sebagai tanda desimal)',
'column_bill-id' => 'ID tagihan (yang cocok dengan Firefly)',
'column_bill-name' => 'Nama tagihan',
diff --git a/resources/lang/id_ID/demo.php b/resources/lang/id_ID/demo.php
index 5c99a55718..c35b020f4a 100644
--- a/resources/lang/id_ID/demo.php
+++ b/resources/lang/id_ID/demo.php
@@ -20,7 +20,7 @@ return [
'currencies-index' => 'Firefly III supports multiple currencies. Although it defaults to the Euro it can be set to the US Dollar and many other currencies. As you can see a small selection of currencies has been included but you can add your own if you wish to. Changing the default currency will not change the currency of existing transactions however: Firefly III supports the use of multiple currencies at the same time.',
'transactions-index' => 'These expenses, deposits and transfers are not particularly imaginative. They have been generated automatically.',
'piggy-banks-index' => 'As you can see, there are three piggy banks. Use the plus and minus buttons to influence the amount of money in each piggy bank. Click the name of the piggy bank to see the administration for each piggy bank.',
- 'import-index' => 'Of course, any CSV file can be imported into Firefly III ',
+ 'import-index' => 'Of course, any CSV file can be imported into Firefly III',
'import-configure-security' => 'Because of security concerns, your upload has been replaced with a local file.',
'import-configure-configuration' => 'The configuration you see below is correct for the local file.',
];
diff --git a/resources/lang/id_ID/firefly.php b/resources/lang/id_ID/firefly.php
index 49daf7d145..147509399d 100644
--- a/resources/lang/id_ID/firefly.php
+++ b/resources/lang/id_ID/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Incomplete translation',
'close' => 'Close',
'actions' => 'Actions',
'edit' => 'Edit',
'delete' => 'Delete',
'welcomeBack' => 'What\'s playing?',
'everything' => 'Everything',
+ 'today' => 'today',
'customRange' => 'Custom range',
'apply' => 'Apply',
'select_date' => 'Select date..',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Transaction data',
'invalid_server_configuration' => 'Invalid server configuration',
'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are instructions how to do this .',
+ 'quickswitch' => 'Quickswitch',
// search
'search' => 'Search',
@@ -147,7 +150,7 @@ return [
'repeat_freq_half-year' => 'every half-year',
'repeat_freq_quarterly' => 'quarterly',
'repeat_freq_monthly' => 'monthly',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'weekly',
'weekly' => 'weekly',
'quarterly' => 'quarterly',
'half-year' => 'every half year',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Without date',
'result' => 'Result',
'sums_apply_to_range' => 'All sums apply to the selected range',
+ 'mapbox_api_key' => 'To use map, get an API key from Mapbox . Open your .env
file en enter this code after MAPBOX_API_KEY=
.',
'press_tag_location' => 'Right click or long press to set the tag\'s location.',
'clear_location' => 'Clear location',
@@ -586,6 +590,8 @@ return [
'not_expected_period' => 'Not expected this period',
'bill_is_active' => 'Bill is active',
'bill_will_automatch' => 'Bill will automatically linked to matching transactions',
+ 'skips_over' => 'skips over',
+
// accounts:
'details_for_asset' => 'Details for asset account ":name"',
'details_for_expense' => 'Details for expense account ":name"',
@@ -614,6 +620,27 @@ return [
'revenue_accounts' => 'Revenue accounts',
'cash_accounts' => 'Cash accounts',
'Cash account' => 'Cash account',
+ 'reconcile_account' => 'Reconcile account ":account"',
+ 'delete_reconciliation' => 'Delete reconciliation',
+ 'update_reconciliation' => 'Update reconciliation',
+ 'amount_cannot_be_zero' => 'The amount cannot be zero',
+ 'end_of_reconcile_period' => 'End of reconcile period: :period',
+ 'start_of_reconcile_period' => 'Start of reconcile period: :period',
+ 'start_balance' => 'Start balance',
+ 'end_balance' => 'End balance',
+ 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"',
+ 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.',
+ 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"',
+ 'date_change_instruction' => 'If you change the date range now, any progress will be lost.',
+ 'update_selection' => 'Update selection',
+ 'store_reconcile' => 'Store reconciliation',
+ 'reconciliation_transaction' => 'Reconciliation transaction',
+ 'Reconciliation' => 'Reconciliation',
+ 'reconciliation' => 'Reconciliation',
+ 'reconcile_options' => 'Reconciliation options',
+ 'reconcile_range' => 'Reconciliation range',
+ 'start_reconcile' => 'Start reconciling',
+ 'cash' => 'cash',
'account_type' => 'Account type',
'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:',
'stored_new_account' => 'New account ":name" stored!',
@@ -626,6 +653,22 @@ return [
'select_more_than_one_budget' => 'Please select more than one budget',
'select_more_than_one_tag' => 'Please select more than one tag',
'account_default_currency' => 'If you select another currency, new transactions from this account will have this currency pre-selected.',
+ 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.',
+ 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.',
+ 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.',
+ 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.',
+ 'reconcile_go_back' => 'You can always edit or delete a correction later.',
+ 'must_be_asset_account' => 'You can only reconcile asset accounts',
+ 'reconciliation_stored' => 'Reconciliation stored',
+ 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)',
+ 'reconcile_this_account' => 'Reconcile this account',
+ 'confirm_reconciliation' => 'Confirm reconciliation',
+ 'submitted_start_balance' => 'Submitted start balance',
+ 'selected_transactions' => 'Selected transactions (:count)',
+ 'already_cleared_transactions' => 'Already cleared transactions (:count)',
+ 'submitted_end_balance' => 'Submitted end balance',
// categories:
'new_category' => 'New category',
@@ -659,11 +702,11 @@ return [
'stored_journal' => 'Successfully created new transaction ":description"',
'select_transactions' => 'Select transactions',
'stop_selection' => 'Stop selecting transactions',
- 'edit_selected' => 'Edit selected',
- 'delete_selected' => 'Delete selected',
+ 'reconcile_selected' => 'Reconcile',
'mass_delete_journals' => 'Delete a number of transactions',
'mass_edit_journals' => 'Edit a number of transactions',
'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.',
+ 'no_budget' => '(no budget)',
'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.',
'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).',
'mass_edited_transactions_success' => 'Updated :amount transaction(s)',
@@ -699,7 +742,9 @@ return [
'currency' => 'Currency',
'preferences' => 'Preferences',
'logout' => 'Logout',
+ 'toggleNavigation' => 'Toggle navigation',
'searchPlaceholder' => 'Search...',
+ 'version' => 'Version',
'dashboard' => 'Dashboard',
'currencies' => 'Currencies',
'accounts' => 'Accounts',
@@ -925,6 +970,7 @@ return [
'budgets_with_limits' => 'budget(s) with configured amount',
'rule_or_rules' => 'rule(s)',
'rulegroup_or_groups' => 'rule group(s)',
+ 'tag_or_tags' => 'tag(s)',
'configuration_updated' => 'The configuration has been updated',
'setting_is_demo_site' => 'Demo site',
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
@@ -1000,6 +1046,7 @@ return [
'split_this_transfer' => 'Split this transfer',
'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.',
'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.',
+ 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.',
'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.',
'no_edit_multiple_left' => 'You have selected no valid transactions to edit.',
'cannot_convert_split_journal' => 'Cannot convert a split transaction',
@@ -1012,6 +1059,7 @@ return [
'import_index_title' => 'Import data into Firefly III',
'import_index_sub_title' => 'Index',
'import_general_index_intro' => 'Welcome to Firefly\'s import routine. There are a few ways of importing data into Firefly III, displayed here as buttons.',
+ 'import_general_index_csv_file' => 'Import a (CSV) file',
'import_index_intro' => 'This routine will help you import files from your bank into Firefly III. Please check out the help pages in the top right corner.',
'import_index_file' => 'Select your file',
'import_index_config' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file .',
@@ -1095,7 +1143,7 @@ return [
'no_piggies_imperative_default' => 'Do you have things you\'re saving money for? Create a piggy bank and keep track:',
'no_piggies_create_default' => 'Create a new piggy bank',
'no_bills_title_default' => 'Let\'s create a bill!',
- 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent of insurance.',
+ 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.',
'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:',
'no_bills_create_default' => 'Create a bill',
diff --git a/resources/lang/id_ID/form.php b/resources/lang/id_ID/form.php
index 24d6519276..6d7a98c2fe 100644
--- a/resources/lang/id_ID/form.php
+++ b/resources/lang/id_ID/form.php
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Delete permanently',
'cancel' => 'Cancel',
'targetdate' => 'Target date',
+ 'startdate' => 'Start date',
'tag' => 'Tag',
'under' => 'Under',
'symbol' => 'Symbol',
diff --git a/resources/lang/id_ID/list.php b/resources/lang/id_ID/list.php
index 992afacc40..8129b082fc 100644
--- a/resources/lang/id_ID/list.php
+++ b/resources/lang/id_ID/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'ID',
'create_date' => 'Created at',
'update_date' => 'Updated at',
- 'updated_at' => 'Updated at',
+ 'updated_at' => 'Updated at',
'balance_before' => 'Balance before',
'balance_after' => 'Balance after',
'name' => 'Name',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Sum of withdrawals',
'sum_deposits' => 'Sum of deposits',
'sum_transfers' => 'Sum of transfers',
+ 'reconcile' => 'Reconcile',
];
diff --git a/resources/lang/nl_NL/bank.php b/resources/lang/nl_NL/bank.php
index ae18c976ad..9afeaf242d 100644
--- a/resources/lang/nl_NL/bank.php
+++ b/resources/lang/nl_NL/bank.php
@@ -1,6 +1,8 @@
'Voorwaarden voor een import van bunq',
'bunq_prerequisites_text' => 'Om transacties bij bunq te importeren heb je een API sleutel nodig. Dit kan via de app.',
-];
\ No newline at end of file
+];
diff --git a/resources/lang/nl_NL/breadcrumbs.php b/resources/lang/nl_NL/breadcrumbs.php
index 16694da0ea..5e56c5e727 100644
--- a/resources/lang/nl_NL/breadcrumbs.php
+++ b/resources/lang/nl_NL/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Inkomsten',
'transfer_list' => 'Overschrijvingen',
'transfers_list' => 'Overschrijvingen',
+ 'reconciliation_list' => 'Afstemmingen',
'create_withdrawal' => 'Sla nieuwe uitgave op',
'create_deposit' => 'Sla nieuwe inkomsten op',
'create_transfer' => 'Sla nieuwe overschrijving op',
'edit_journal' => 'Wijzig transactie ":description"',
+ 'edit_reconciliation' => 'Wijzig ":description"',
'delete_journal' => 'Verwijder transactie ":description"',
'tags' => 'Tags',
'createTag' => 'Maak nieuwe tag',
diff --git a/resources/lang/nl_NL/csv.php b/resources/lang/nl_NL/csv.php
index be68315716..b23f80dac1 100644
--- a/resources/lang/nl_NL/csv.php
+++ b/resources/lang/nl_NL/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'Betaalrekening (ID gelijk aan Firefly)',
'column_account-name' => 'Betaalrekeningnaam',
'column_amount' => 'Bedrag',
+ 'column_amount_debet' => 'Bedrag (debetkolom)',
+ 'column_amount_credit' => 'Bedrag (creditkolom)',
'column_amount-comma-separated' => 'Bedrag (komma as decimaalscheidingsteken)',
'column_bill-id' => 'Contract (ID gelijk aan Firefly)',
'column_bill-name' => 'Contractnaam',
diff --git a/resources/lang/nl_NL/demo.php b/resources/lang/nl_NL/demo.php
index 01aa680497..631ff2236e 100644
--- a/resources/lang/nl_NL/demo.php
+++ b/resources/lang/nl_NL/demo.php
@@ -20,7 +20,7 @@ return [
'currencies-index' => 'Firefly ondersteunt meerdere valuta\'s. Hoewel het standaard de Euro is kan je ook kiezen voor de US dollar of een van de vele anderen. Er is een kleine selectie valuta meegeleverd maar je kan je eigen valuta toevoegen. Het veranderen van de standaardvaluta verandert de bestaande transacties niet: Firefly III ondersteunt het gebruik van meerdere valuta op hetzelfde moment.',
'transactions-index' => 'Deze uitgaven, inkomsten en overschrijvingen zijn niet heel fantasierijk. Ze zijn automatisch gegenereerd.',
'piggy-banks-index' => 'Zoals je kan zien zijn er drie spaarpotjes. Gebruik de plus- en minknoppen om het bedrag in de spaarpotjes te veranderen. Klik op de naam van het spaarpotje om er de geschiedenis van te zien.',
- 'import-index' => 'Uiteraard kan je elk CSV bestand importeren in Firefly III ',
+ 'import-index' => 'Uiteraard kan je elk CSV bestand importeren in Firefly III',
'import-configure-security' => 'Uit veiligheidsoverwegingen is je upload vervangen door een lokaal bestand.',
'import-configure-configuration' => 'Deze configuratie is correct voor het lokale bestand.',
];
diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php
index 94444918ed..a727a603ae 100644
--- a/resources/lang/nl_NL/firefly.php
+++ b/resources/lang/nl_NL/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Onvolledige vertaling',
'close' => 'Sluiten',
'actions' => 'Acties',
'edit' => 'Wijzig',
'delete' => 'Verwijder',
'welcomeBack' => 'Hoe staat het er voor?',
'everything' => 'Alles',
+ 'today' => 'vandaag',
'customRange' => 'Zelf bereik kiezen',
'apply' => 'Go',
'select_date' => 'Selecteer periode..',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Transactiegegevens',
'invalid_server_configuration' => 'Ongeldige serverconfiguratie',
'invalid_locale_settings' => 'Firefly III kan geldbedragen niet goed weergeven omdat je server de vereiste software mist. Er zijn instructies hoe dit te doen .',
+ 'quickswitch' => 'Quickswitch',
// search
'search' => 'Zoeken',
@@ -147,7 +150,7 @@ return [
'repeat_freq_half-year' => 'elk half jaar',
'repeat_freq_quarterly' => 'elk kwartaal',
'repeat_freq_monthly' => 'maandelijks',
- 'repeat_freq_weekly' => 'wekelijks',
+ 'repeat_freq_weekly' => 'wekelijks',
'weekly' => 'wekelijks',
'quarterly' => 'elk kwartaal',
'half-year' => 'elk half jaar',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Zonder datum',
'result' => 'Resultaat',
'sums_apply_to_range' => 'Alle sommen gelden voor het geselecteerde bereik',
+ 'mapbox_api_key' => 'Om de kaart te gebruiken regel je een API-key bij Mapbox . Open je .env
-bestand en zet deze achter MAPBOX_API_KEY=
.',
'press_tag_location' => 'Klik met de rechtermuisknop of druk lang om de locatie van de tag in te stellen.',
'clear_location' => 'Wis locatie',
@@ -586,6 +590,8 @@ return [
'not_expected_period' => 'Niet verwacht deze periode',
'bill_is_active' => 'Contract is actief',
'bill_will_automatch' => 'Waar van toepassing wordt dit contract automatisch gekoppeld aan transacties',
+ 'skips_over' => 'slaat over',
+
// accounts:
'details_for_asset' => 'Overzicht voor betaalrekening ":name"',
'details_for_expense' => 'Overzicht voor crediteur ":name"',
@@ -614,6 +620,27 @@ return [
'revenue_accounts' => 'Debiteuren',
'cash_accounts' => 'Contant geldrekeningen',
'Cash account' => 'Contant geldrekening',
+ 'reconcile_account' => 'Afstemmen betaalrekening ": account"',
+ 'delete_reconciliation' => 'Verwijder correctie',
+ 'update_reconciliation' => 'Update correctie',
+ 'amount_cannot_be_zero' => 'Het bedrag mag niet nul zijn',
+ 'end_of_reconcile_period' => 'Einde van verrekenperiode: :period',
+ 'start_of_reconcile_period' => 'Begin van verrekenperiode: :period',
+ 'start_balance' => 'Startsaldo',
+ 'end_balance' => 'Eindsaldo',
+ 'update_balance_dates_instruction' => 'Vergelijk de bedragen en datums hierboven met uw bankafschrift en druk op "Begin met afstemmen"',
+ 'select_transactions_instruction' => 'Selecteer de transacties die op je bankafschrift staan.',
+ 'select_range_and_balance' => 'Controleer eerst het datumbereik en de saldo\'s. Druk vervolgens op "Begin met afstemmen"',
+ 'date_change_instruction' => 'Als je het datumbereik nu wijzigt, gaat je voortgang verloren.',
+ 'update_selection' => 'Selectie bijwerken',
+ 'store_reconcile' => 'Afstemming opslaan',
+ 'reconciliation_transaction' => 'Corrigerende transactie',
+ 'Reconciliation' => 'Correctie',
+ 'reconciliation' => 'Correctie',
+ 'reconcile_options' => 'Afstemmingsopties',
+ 'reconcile_range' => 'Afstemmingsbereik',
+ 'start_reconcile' => 'Begin met afstemmen',
+ 'cash' => 'contant',
'account_type' => 'Rekeningtype',
'save_transactions_by_moving' => 'Bewaar deze transacties door ze aan een andere rekening te koppelen:',
'stored_new_account' => 'Nieuwe rekening ":name" opgeslagen!',
@@ -626,6 +653,22 @@ return [
'select_more_than_one_budget' => 'Selecteer meer dan één budget',
'select_more_than_one_tag' => 'Selecteer meer dan één tag',
'account_default_currency' => 'Nieuwe transacties van deze betaalrekening krijgen automatisch deze valuta.',
+ 'reconcile_has_more' => 'Je Firefly III boekhouding bevat meer geld dan je bank beweert dat er in zou moeten zitten. Je hebt verschillende opties. Kies wat je wilt doen, en klik dan "Bevestig correctie".',
+ 'reconcile_has_less' => 'Je Firefly III boekhouding bevat minder geld dan je bank beweert dat er in zou moeten zitten. Je hebt verschillende opties. Kies wat je wilt doen, en klik dan "Bevestig correctie".',
+ 'reconcile_is_equal' => 'Je Firefly III boekhouding en je bankafschriften lopen gelijk. Je hoeft niets te doen. Klik op "Bevestig correctie" om je invoer te bevestigen.',
+ 'create_pos_reconcile_transaction' => 'Markeer de geselecteerde transacties als afgestemd, en voeg :amount toe aan de betaalrekening.',
+ 'create_neg_reconcile_transaction' => 'Markeer de geselecteerde transacties als afgestemd, en verwijder :amount van de betaalrekening.',
+ 'reconcile_do_nothing' => 'Markeer de geselecteerde transacties als afgestemd, maar maak geen correctie.',
+ 'reconcile_go_back' => 'Je kan een correctie later altijd wijzigen.',
+ 'must_be_asset_account' => 'Je kan alleen betaalrekeningen corrigeren',
+ 'reconciliation_stored' => 'Correctie opgeslagen',
+ 'reconcilliation_transaction_title' => 'Correctie (:from tot :to)',
+ 'reconcile_this_account' => 'Corrigeer deze rekening',
+ 'confirm_reconciliation' => 'Bevestig correctie',
+ 'submitted_start_balance' => 'Ingevoerd startsaldo',
+ 'selected_transactions' => 'Geselecteerde transacties (:count)',
+ 'already_cleared_transactions' => 'Al afgestemde transacties (:count)',
+ 'submitted_end_balance' => 'Ingevoerd eindsaldo',
// categories:
'new_category' => 'Nieuwe categorie',
@@ -659,11 +702,11 @@ return [
'stored_journal' => 'Nieuw transactie ":description" opgeslagen',
'select_transactions' => 'Selecteer transacties',
'stop_selection' => 'Stop met selecteren',
- 'edit_selected' => 'Wijzig geselecteerden',
- 'delete_selected' => 'Verwijder geselecteerden',
+ 'reconcile_selected' => 'Verrekenen',
'mass_delete_journals' => 'Verwijder een aantal transacties',
'mass_edit_journals' => 'Wijzig een aantal transacties',
'cannot_edit_other_fields' => 'Je kan andere velden dan de velden die je hier ziet niet groepsgewijs wijzigen. Er is geen ruimte om ze te laten zien. Als je deze velden toch wilt wijzigen, volg dan de link naast de transactie en wijzig ze stuk voor stuk.',
+ 'no_budget' => '(geen budget)',
'perm-delete-many' => 'Veel items in één keer verwijderen kan zeer storend zijn. Wees voorzichtig.',
'mass_deleted_transactions_success' => 'Verwijder :amount transactie(s).',
'mass_edited_transactions_success' => 'Wijzig :amount transactie(s)',
@@ -699,7 +742,9 @@ return [
'currency' => 'Valuta',
'preferences' => 'Voorkeuren',
'logout' => 'Uitloggen',
+ 'toggleNavigation' => 'Navigatie aan of uit',
'searchPlaceholder' => 'Zoeken...',
+ 'version' => 'Versie',
'dashboard' => 'Dashboard',
'currencies' => 'Valuta',
'accounts' => 'Rekeningen',
@@ -925,6 +970,7 @@ return [
'budgets_with_limits' => 'budget(ten) met een ingesteld bedrag',
'rule_or_rules' => 'regel(s)',
'rulegroup_or_groups' => 'regelgroep(en)',
+ 'tag_or_tags' => 'tag(s)',
'configuration_updated' => 'De configuratie is bijgewerkt',
'setting_is_demo_site' => 'Demo website',
'setting_is_demo_site_explain' => 'Als je dit aanzet doet jouw installatie alsof het een demo-site is, en dat kan problemen opleveren.',
@@ -1000,6 +1046,7 @@ return [
'split_this_transfer' => 'Splits deze overschrijving',
'cannot_edit_multiple_source' => 'Je kan transactie #:id met omschrijving ":description" niet splitsen, want deze bevat meerdere bronrekeningen.',
'cannot_edit_multiple_dest' => 'Je kan transactie #:id met omschrijving ":description" niet wijzigen, want deze bevat meerdere doelrekeningen.',
+ 'cannot_edit_reconciled' => 'U kunt transactie #:id met omschrijving ": description" niet bewerken omdat deze is gemarkeerd als afgestemd (verrekend).',
'cannot_edit_opening_balance' => 'Je kan het startsaldo van een rekening niet wijzigen via dit scherm.',
'no_edit_multiple_left' => 'Je hebt geen geldige transacties geselecteerd.',
'cannot_convert_split_journal' => 'Kan geen gesplitste transactie omzetten',
@@ -1012,6 +1059,7 @@ return [
'import_index_title' => 'Gegevens importeren in Firefly III',
'import_index_sub_title' => 'Index',
'import_general_index_intro' => 'Dit is de import-routine van Firefly. Er zijn verschillende manieren om gegevens te importeren in Firefly III, hier als knoppen weergegeven.',
+ 'import_general_index_csv_file' => 'Importeer een (CSV) bestand',
'import_index_intro' => 'Deze pagina\'s helpen je bestanden van je bank te importeren in Firefly III. Gebruik de hulp-pagina\'s linksboven voor meer informatie.',
'import_index_file' => 'Selecteer je bestand',
'import_index_config' => 'Als je eerder gegevens hebt geïmporteerd in Firefly III, heb je wellicht een configuratiebestand, dat een aantal zaken alvast voor je kan instellen. Voor bepaalde banken hebben andere gebruikers uit de liefde van hun hart het benodigde configuratiebestand gedeeld.',
diff --git a/resources/lang/nl_NL/form.php b/resources/lang/nl_NL/form.php
index 23aee16c7e..6e395b39b1 100644
--- a/resources/lang/nl_NL/form.php
+++ b/resources/lang/nl_NL/form.php
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Verwijderen',
'cancel' => 'Annuleren',
'targetdate' => 'Doeldatum',
+ 'startdate' => 'Startdatum',
'tag' => 'Tag',
'under' => 'Onder',
'symbol' => 'Symbool',
@@ -184,6 +185,8 @@ return [
'csv_tab' => 'Een tab (onzichtbaar)',
'csv_delimiter' => 'CSV scheidingsteken',
'csv_import_account' => 'Standaard rekening voor importeren',
+ 'csv_config' => 'Configuratiebestand',
+
'due_date' => 'Vervaldatum',
'payment_date' => 'Betalingsdatum',
diff --git a/resources/lang/nl_NL/list.php b/resources/lang/nl_NL/list.php
index ccba0762b4..2678a80cd3 100644
--- a/resources/lang/nl_NL/list.php
+++ b/resources/lang/nl_NL/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'ID',
'create_date' => 'Aangemaakt op',
'update_date' => 'Bijgewerkt op',
- 'updated_at' => 'Bijgewerkt op',
+ 'updated_at' => 'Bijgewerkt op',
'balance_before' => 'Saldo voor',
'balance_after' => 'Saldo na',
'name' => 'Naam',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Som van uitgaven',
'sum_deposits' => 'Som van inkomsten',
'sum_transfers' => 'Som van overschrijvingen',
+ 'reconcile' => 'Afstemmen',
];
diff --git a/resources/lang/pl_PL/bank.php b/resources/lang/pl_PL/bank.php
index da46c4be03..7f2f4c5db0 100644
--- a/resources/lang/pl_PL/bank.php
+++ b/resources/lang/pl_PL/bank.php
@@ -1,6 +1,8 @@
'Wymagania wstępne dotyczące importowania z bunq',
'bunq_prerequisites_text' => 'Aby zaimportować dane z bunq, musisz uzyskać klucz API. Możesz to zrobić za pośrednictwem aplikacji.',
-];
\ No newline at end of file
+];
diff --git a/resources/lang/pl_PL/breadcrumbs.php b/resources/lang/pl_PL/breadcrumbs.php
index 52019feac2..8f05e92cee 100644
--- a/resources/lang/pl_PL/breadcrumbs.php
+++ b/resources/lang/pl_PL/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Przychody, dochody oraz depozyty',
'transfer_list' => 'Transfery',
'transfers_list' => 'Transfery',
+ 'reconciliation_list' => 'Reconciliations',
'create_withdrawal' => 'Utwórz nową wypłatę',
'create_deposit' => 'Utwórz nową wpłatę',
'create_transfer' => 'Utwórz nowy transfer',
'edit_journal' => 'Modyfikuj transakcję ":description"',
+ 'edit_reconciliation' => 'Edit ":description"',
'delete_journal' => 'Usuń transakcję ":description"',
'tags' => 'Tagi',
'createTag' => 'Utwórz nowy tag',
diff --git a/resources/lang/pl_PL/csv.php b/resources/lang/pl_PL/csv.php
index 77e80a686a..a4789a5db3 100644
--- a/resources/lang/pl_PL/csv.php
+++ b/resources/lang/pl_PL/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'ID konta aktywów (taki sam jak w Firefly)',
'column_account-name' => 'Konto aktywów (nazwa)',
'column_amount' => 'Kwota',
+ 'column_amount_debet' => 'Amount (debet column)',
+ 'column_amount_credit' => 'Amount (credit column)',
'column_amount-comma-separated' => 'Kwota (przecinek jako separator dziesiętny)',
'column_bill-id' => 'ID rachunku (taki sam jak w Firefly)',
'column_bill-name' => 'Nazwa rachunku',
diff --git a/resources/lang/pl_PL/demo.php b/resources/lang/pl_PL/demo.php
index 0ffd1b88bf..094bff01a7 100644
--- a/resources/lang/pl_PL/demo.php
+++ b/resources/lang/pl_PL/demo.php
@@ -20,7 +20,7 @@ return [
'currencies-index' => 'Firefly III supports multiple currencies. Although it defaults to the Euro it can be set to the US Dollar and many other currencies. As you can see a small selection of currencies has been included but you can add your own if you wish to. Changing the default currency will not change the currency of existing transactions however: Firefly III supports the use of multiple currencies at the same time.',
'transactions-index' => 'These expenses, deposits and transfers are not particularly imaginative. They have been generated automatically.',
'piggy-banks-index' => 'As you can see, there are three piggy banks. Use the plus and minus buttons to influence the amount of money in each piggy bank. Click the name of the piggy bank to see the administration for each piggy bank.',
- 'import-index' => 'Of course, any CSV file can be imported into Firefly III ',
+ 'import-index' => 'Of course, any CSV file can be imported into Firefly III',
'import-configure-security' => 'Because of security concerns, your upload has been replaced with a local file.',
'import-configure-configuration' => 'Konfiguracja, która widzisz poniżej jest prawidłowa dla lokalnego pliku.',
];
diff --git a/resources/lang/pl_PL/firefly.php b/resources/lang/pl_PL/firefly.php
index f1c3209bea..e616a331e8 100644
--- a/resources/lang/pl_PL/firefly.php
+++ b/resources/lang/pl_PL/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Niepełne tłumaczenie',
'close' => 'Zamknij',
'actions' => 'Akcje',
'edit' => 'Modyfikuj',
'delete' => 'Usuń',
'welcomeBack' => 'Co jest grane?',
'everything' => 'Wszystko',
+ 'today' => 'dzisiaj',
'customRange' => 'Niestandardowy zakres',
'apply' => 'Zastosuj',
'select_date' => 'Wybierz datę...',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Dane transakcji',
'invalid_server_configuration' => 'Nieprawidłowa konfiguracja serwera',
'invalid_locale_settings' => 'Firefly III nie może sformatować kwot, ponieważ brakuje wymaganych pakietów na Twoim serwerze. Sprawdźinstrukcje jak je zainstalować (po angielsku).',
+ 'quickswitch' => 'Szybki przełącznik',
// search
'search' => 'Szukaj',
@@ -144,10 +147,10 @@ return [
// repeat frequencies:
'repeat_freq_yearly' => 'rocznie',
- 'repeat_freq_half-year' => 'every half-year',
- 'repeat_freq_quarterly' => 'quarterly',
+ 'repeat_freq_half-year' => 'co pół roku',
+ 'repeat_freq_quarterly' => 'kwartalnie',
'repeat_freq_monthly' => 'miesięcznie',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'tygodniowo',
'weekly' => 'tygodniowo',
'quarterly' => 'kwartalnie',
'half-year' => 'co pół roku',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Bez daty',
'result' => 'Wynik',
'sums_apply_to_range' => 'Wszystkie sumy mają zastosowanie do wybranego zakresu',
+ 'mapbox_api_key' => 'Aby użyć mapy, pobierz klucz API z Mapbox . Otwórz plik .env
i wprowadź ten kod po MAPBOX_API_KEY=
.',
'press_tag_location' => 'Kliknij prawym przyciskiem myszy lub naciśnij i przytrzymaj aby ustawić lokalizację taga.',
'clear_location' => 'Wyczyść lokalizację',
@@ -586,6 +590,8 @@ return [
'not_expected_period' => 'Nie oczekiwany w tym okresie',
'bill_is_active' => 'Rachunek jest aktywny',
'bill_will_automatch' => 'Rachunek będzie automatycznie powiązany z pasującymi transakcjami',
+ 'skips_over' => 'pomija',
+
// accounts:
'details_for_asset' => 'Szczegóły konta aktywów ":name"',
'details_for_expense' => 'Szczegóły konta wydatków ":name"',
@@ -614,6 +620,27 @@ return [
'revenue_accounts' => 'Konta przychodów',
'cash_accounts' => 'Konta gotówkowe',
'Cash account' => 'Konto gotówkowe',
+ 'reconcile_account' => 'Reconcile account ":account"',
+ 'delete_reconciliation' => 'Delete reconciliation',
+ 'update_reconciliation' => 'Update reconciliation',
+ 'amount_cannot_be_zero' => 'The amount cannot be zero',
+ 'end_of_reconcile_period' => 'End of reconcile period: :period',
+ 'start_of_reconcile_period' => 'Start of reconcile period: :period',
+ 'start_balance' => 'Start balance',
+ 'end_balance' => 'End balance',
+ 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"',
+ 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.',
+ 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"',
+ 'date_change_instruction' => 'If you change the date range now, any progress will be lost.',
+ 'update_selection' => 'Update selection',
+ 'store_reconcile' => 'Store reconciliation',
+ 'reconciliation_transaction' => 'Reconciliation transaction',
+ 'Reconciliation' => 'Reconciliation',
+ 'reconciliation' => 'Reconciliation',
+ 'reconcile_options' => 'Reconciliation options',
+ 'reconcile_range' => 'Reconciliation range',
+ 'start_reconcile' => 'Start reconciling',
+ 'cash' => 'gotówka',
'account_type' => 'Typ konta',
'save_transactions_by_moving' => 'Zapisz te transakcje, przenosząc je do innego konta:',
'stored_new_account' => 'Nowe konto ":name" zostało zapisane!',
@@ -626,6 +653,22 @@ return [
'select_more_than_one_budget' => 'Proszę wybierz więcej niż jeden budżet',
'select_more_than_one_tag' => 'Proszę wybierz więcej niż jeden tag',
'account_default_currency' => 'Jeśli wybierzesz inną walutę, nowe transakcje z tego konta będą miały tę walutę wstępnie wybraną.',
+ 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.',
+ 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.',
+ 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.',
+ 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.',
+ 'reconcile_go_back' => 'You can always edit or delete a correction later.',
+ 'must_be_asset_account' => 'You can only reconcile asset accounts',
+ 'reconciliation_stored' => 'Reconciliation stored',
+ 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)',
+ 'reconcile_this_account' => 'Reconcile this account',
+ 'confirm_reconciliation' => 'Confirm reconciliation',
+ 'submitted_start_balance' => 'Submitted start balance',
+ 'selected_transactions' => 'Selected transactions (:count)',
+ 'already_cleared_transactions' => 'Already cleared transactions (:count)',
+ 'submitted_end_balance' => 'Submitted end balance',
// categories:
'new_category' => 'Nowa kategoria',
@@ -659,11 +702,11 @@ return [
'stored_journal' => 'Pomyślnie utworzono nową transakcję ":description"',
'select_transactions' => 'Wybierz transakcje',
'stop_selection' => 'Przestań wybierać transakcje',
- 'edit_selected' => 'Modyfikuj zaznaczone',
- 'delete_selected' => 'Usuń zaznaczone',
+ 'reconcile_selected' => 'Uzgodnij',
'mass_delete_journals' => 'Usuń wiele transakcji',
'mass_edit_journals' => 'Modyfikuj wiele transakcji',
'cannot_edit_other_fields' => 'Nie możesz masowo modyfikować innych pól niż te tutaj, ponieważ nie ma miejsca, aby je pokazać. Proszę użyć ikony edycji i edytować je jedno po drugim, jeśli chcesz edytować te pola.',
+ 'no_budget' => '(bez budżetu)',
'perm-delete-many' => 'Usuwanie wielu elementów jednocześnie może być bardzo destrukcyjne. Proszę zachować ostrożność.',
'mass_deleted_transactions_success' => 'Usunięto :amount transakcję(i).',
'mass_edited_transactions_success' => 'Zaktualizowano :amount transakcję(i)',
@@ -699,7 +742,9 @@ return [
'currency' => 'Waluta',
'preferences' => 'Preferencje',
'logout' => 'Wyloguj',
+ 'toggleNavigation' => 'Przełącz nawigację',
'searchPlaceholder' => 'Szukaj...',
+ 'version' => 'Wersja',
'dashboard' => 'Kokpit',
'currencies' => 'Waluty',
'accounts' => 'Konta',
@@ -825,8 +870,8 @@ return [
'account_role_sharedAsset' => 'Współdzielone konto aktywów',
'account_role_savingAsset' => 'Konto oszczędnościowe',
'account_role_ccAsset' => 'Karta kredytowa',
- 'budget_chart_click' => 'Please click on a budget name in the table above to see a chart.',
- 'category_chart_click' => 'Please click on a category name in the table above to see a chart.',
+ 'budget_chart_click' => 'Kliknij na nazwę budżetu w tabeli powyżej, aby zobaczyć wykres.',
+ 'category_chart_click' => 'Kliknij na nazwę kategorii w tabeli powyżej, aby zobaczyć wykres.',
// charts:
@@ -839,7 +884,7 @@ return [
'earned' => 'Zarobiono',
'overspent' => 'Przepłacono',
'left' => 'Pozostało',
- 'no_budget' => '(bez budżetu)',
+ 'no_budget' => '(no budget)',
'max-amount' => 'Maksymalna kwota',
'min-amount' => 'Minimalna kwota',
'journal-amount' => 'Faktyczna kwota',
@@ -925,6 +970,7 @@ return [
'budgets_with_limits' => 'budżet(y) z określoną kwotą',
'rule_or_rules' => 'reguła(y)',
'rulegroup_or_groups' => 'grupa(y) reguł',
+ 'tag_or_tags' => 'tag(ów)',
'configuration_updated' => 'Konfiguracja została zaktualizowana',
'setting_is_demo_site' => 'Strona demonstracyjna',
'setting_is_demo_site_explain' => 'Jeśli zaznaczysz to pole, ta instalacja będzie zachowywać się jak witryna demonstracyjna, co może mieć dziwne efekty uboczne.',
@@ -1000,6 +1046,7 @@ return [
'split_this_transfer' => 'Podziel ten transfer',
'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.',
'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.',
+ 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.',
'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.',
'no_edit_multiple_left' => 'Nie wybrałeś żadnych poprawnych transakcji do edycji.',
'cannot_convert_split_journal' => 'Nie można przekonwertować podzielonej transakcji',
@@ -1012,6 +1059,7 @@ return [
'import_index_title' => 'Importuj dane do Firefly III',
'import_index_sub_title' => 'Indeks',
'import_general_index_intro' => 'Witamy w procedurze importu Firefly III. Istnieje kilka sposobów importowania danych do Firefly III.',
+ 'import_general_index_csv_file' => 'Importuj plik CSV',
'import_index_intro' => 'Ta procedura pomoże Ci zaimportować pliki z Twojego banku do Firefly III. Proszę sprawdzić stronę pomocy w prawym górnym rogu.',
'import_index_file' => 'Wybierz swój plik',
'import_index_config' => 'Jeśli wcześniej importowałeś dane do Firefly III, może posiadać plik konfiguracji, który wstępnie ustawi wartości parametrów konfiguracyjnych dla Ciebie. Dla niektórych banków, inni użytkownicy uprzejmie dostarczyli swoje pliki konfiguracji .',
@@ -1095,7 +1143,7 @@ return [
'no_piggies_imperative_default' => 'Oszczędzasz pieniądze na coś? Utwórz skarbonkę i śledź:',
'no_piggies_create_default' => 'Utwórz nową skarbonkę',
'no_bills_title_default' => 'Stwórzmy rachunek!',
- 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent of insurance.',
+ 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.',
'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:',
'no_bills_create_default' => 'Utwórz rachunek',
diff --git a/resources/lang/pl_PL/form.php b/resources/lang/pl_PL/form.php
index ea7e8bf603..396568faf3 100644
--- a/resources/lang/pl_PL/form.php
+++ b/resources/lang/pl_PL/form.php
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Usuń trwale',
'cancel' => 'Anuluj',
'targetdate' => 'Data docelowa',
+ 'startdate' => 'Start date',
'tag' => 'Tag',
'under' => 'Poniżej',
'symbol' => 'Symbol',
diff --git a/resources/lang/pl_PL/list.php b/resources/lang/pl_PL/list.php
index b1f02b2b66..b32a13c8ba 100644
--- a/resources/lang/pl_PL/list.php
+++ b/resources/lang/pl_PL/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'ID',
'create_date' => 'Utworzono',
'update_date' => 'Zaktualizowano',
- 'updated_at' => 'Zaktualizowano',
+ 'updated_at' => 'Zaktualizowano',
'balance_before' => 'Saldo przed',
'balance_after' => 'Saldo po',
'name' => 'Nazwa',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Suma wypłat',
'sum_deposits' => 'Suma wpłat',
'sum_transfers' => 'Suma transferów',
+ 'reconcile' => 'Reconcile',
];
diff --git a/resources/lang/pt_BR/bank.php b/resources/lang/pt_BR/bank.php
index 11f05b3785..4becc5984c 100644
--- a/resources/lang/pt_BR/bank.php
+++ b/resources/lang/pt_BR/bank.php
@@ -1,6 +1,8 @@
'Prerequisites for an import from bunq',
'bunq_prerequisites_text' => 'In order to import from bunq, you need to obtain an API key. You can do this through the app.',
-];
\ No newline at end of file
+];
diff --git a/resources/lang/pt_BR/breadcrumbs.php b/resources/lang/pt_BR/breadcrumbs.php
index 1a97cb2988..6e9b01528f 100644
--- a/resources/lang/pt_BR/breadcrumbs.php
+++ b/resources/lang/pt_BR/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Receitas, renda e depósitos',
'transfer_list' => 'Transferências',
'transfers_list' => 'Transferências',
+ 'reconciliation_list' => 'Reconciliations',
'create_withdrawal' => 'Criar uma nova retirada',
'create_deposit' => 'Criar um novo depósito',
'create_transfer' => 'Criar nova transferência',
'edit_journal' => 'Editar transação ":description"',
+ 'edit_reconciliation' => 'Edit ":description"',
'delete_journal' => 'Apagar transação ":description"',
'tags' => 'Etiquetas',
'createTag' => 'Criar nova etiqueta',
diff --git a/resources/lang/pt_BR/csv.php b/resources/lang/pt_BR/csv.php
index 830d7cd73f..961502a938 100644
--- a/resources/lang/pt_BR/csv.php
+++ b/resources/lang/pt_BR/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'ID da Conta de Ativo (correspondente Firefly)',
'column_account-name' => 'Conta de Ativo (nome)',
'column_amount' => 'Quantia',
+ 'column_amount_debet' => 'Amount (debet column)',
+ 'column_amount_credit' => 'Amount (credit column)',
'column_amount-comma-separated' => 'Quantia (vírgula como separador decimal)',
'column_bill-id' => 'ID Fatura (correspondente Firefly)',
'column_bill-name' => 'Nome da Fatura',
diff --git a/resources/lang/pt_BR/demo.php b/resources/lang/pt_BR/demo.php
index 749f6d09b1..83d5bdac9f 100644
--- a/resources/lang/pt_BR/demo.php
+++ b/resources/lang/pt_BR/demo.php
@@ -20,7 +20,7 @@ return [
'currencies-index' => 'Firefly III oferece suporte a várias moedas. Embora o padrão seja o Euro, ela pode ser definida para o dólar americano e muitas outras moedas. Como você pode ver uma pequena seleção de moedas foi incluída, mas você pode adicionar suas próprias se desejar. No entanto, alterar a moeda padrão não vai mudar a moeda de transações existentes: Firefly III suporta o uso de várias moedas ao mesmo tempo.',
'transactions-index' => 'Estas despesas, depósitos e transferências não são fantasiosas. Elas foram geradas automaticamente.',
'piggy-banks-index' => 'Como você pode ver, existem três cofrinhos. Use o sinal de mais e menos botões para influenciar a quantidade de dinheiro em cada cofrinho. Clique no nome do cofrinho para ver a administração de cada cofrinho.',
- 'import-index' => 'Claro, qualquer arquivo .CSV pode ser importado em Firefly III ',
+ 'import-index' => 'Of course, any CSV file can be imported into Firefly III',
'import-configure-security' => 'Por questões de segurança, seu upload foi substituído por um arquivo local.',
'import-configure-configuration' => 'A configuração que você vê abaixo é a correta para o arquivo local.',
];
diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php
index 7dffb37a40..a41bc50f7d 100644
--- a/resources/lang/pt_BR/firefly.php
+++ b/resources/lang/pt_BR/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Incomplete translation',
'close' => 'Fechar',
'actions' => 'Ações',
'edit' => 'Editar',
'delete' => 'Apagar',
'welcomeBack' => 'O que está passando?',
'everything' => 'Tudo',
+ 'today' => 'today',
'customRange' => 'Intervalo Personalizado',
'apply' => 'Aplicar',
'select_date' => 'Selecione a data..',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Transaction data',
'invalid_server_configuration' => 'Invalid server configuration',
'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are instructions how to do this .',
+ 'quickswitch' => 'Quickswitch',
// search
'search' => 'Pesquisa',
@@ -147,7 +150,7 @@ return [
'repeat_freq_half-year' => 'every half-year',
'repeat_freq_quarterly' => 'quarterly',
'repeat_freq_monthly' => 'mensal',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'weekly',
'weekly' => 'semanal',
'quarterly' => 'trimestral',
'half-year' => 'metade de cada ano',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Without date',
'result' => 'Result',
'sums_apply_to_range' => 'All sums apply to the selected range',
+ 'mapbox_api_key' => 'To use map, get an API key from Mapbox . Open your .env
file en enter this code after MAPBOX_API_KEY=
.',
'press_tag_location' => 'Right click or long press to set the tag\'s location.',
'clear_location' => 'Clear location',
@@ -586,6 +590,8 @@ return [
'not_expected_period' => 'Não esperado neste período',
'bill_is_active' => 'Bill is active',
'bill_will_automatch' => 'Bill will automatically linked to matching transactions',
+ 'skips_over' => 'skips over',
+
// accounts:
'details_for_asset' => 'Detalhes para a conta de ativo ":name"',
'details_for_expense' => 'Detalhes para a conta de despesas ":name"',
@@ -614,6 +620,27 @@ return [
'revenue_accounts' => 'Contas de receitas',
'cash_accounts' => 'Contas Correntes',
'Cash account' => 'Conta Corrente',
+ 'reconcile_account' => 'Reconcile account ":account"',
+ 'delete_reconciliation' => 'Delete reconciliation',
+ 'update_reconciliation' => 'Update reconciliation',
+ 'amount_cannot_be_zero' => 'The amount cannot be zero',
+ 'end_of_reconcile_period' => 'End of reconcile period: :period',
+ 'start_of_reconcile_period' => 'Start of reconcile period: :period',
+ 'start_balance' => 'Start balance',
+ 'end_balance' => 'End balance',
+ 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"',
+ 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.',
+ 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"',
+ 'date_change_instruction' => 'If you change the date range now, any progress will be lost.',
+ 'update_selection' => 'Update selection',
+ 'store_reconcile' => 'Store reconciliation',
+ 'reconciliation_transaction' => 'Reconciliation transaction',
+ 'Reconciliation' => 'Reconciliation',
+ 'reconciliation' => 'Reconciliation',
+ 'reconcile_options' => 'Reconciliation options',
+ 'reconcile_range' => 'Reconciliation range',
+ 'start_reconcile' => 'Start reconciling',
+ 'cash' => 'cash',
'account_type' => 'Tipo de conta',
'save_transactions_by_moving' => 'Salve essas transações, movendo-os para outra conta:',
'stored_new_account' => 'Nova conta ":name" armazenado!',
@@ -626,6 +653,22 @@ return [
'select_more_than_one_budget' => 'Please select more than one budget',
'select_more_than_one_tag' => 'Please select more than one tag',
'account_default_currency' => 'If you select another currency, new transactions from this account will have this currency pre-selected.',
+ 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.',
+ 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.',
+ 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.',
+ 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.',
+ 'reconcile_go_back' => 'You can always edit or delete a correction later.',
+ 'must_be_asset_account' => 'You can only reconcile asset accounts',
+ 'reconciliation_stored' => 'Reconciliation stored',
+ 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)',
+ 'reconcile_this_account' => 'Reconcile this account',
+ 'confirm_reconciliation' => 'Confirm reconciliation',
+ 'submitted_start_balance' => 'Submitted start balance',
+ 'selected_transactions' => 'Selected transactions (:count)',
+ 'already_cleared_transactions' => 'Already cleared transactions (:count)',
+ 'submitted_end_balance' => 'Submitted end balance',
// categories:
'new_category' => 'Nova categoria',
@@ -659,11 +702,11 @@ return [
'stored_journal' => 'Transação ":description" excluída com sucesso',
'select_transactions' => 'Selecione as transações',
'stop_selection' => 'Parar de selecionar transações',
- 'edit_selected' => 'Editar selecionado',
- 'delete_selected' => 'Excluir selecionados',
+ 'reconcile_selected' => 'Reconcile',
'mass_delete_journals' => 'Excluir um número de transacções',
'mass_edit_journals' => 'Editar um número de transacções',
'cannot_edit_other_fields' => 'Você não pode editar em massa outros campos que não esse aqui, porque não há espaço para mostrá-los. Por favor siga o link e editá-los por um por um, se você precisar editar esses campos.',
+ 'no_budget' => '(sem orçamento)',
'perm-delete-many' => 'Exclusão de muitos itens de uma só vez pode ser muito perturbador. Por favor, seja cauteloso.',
'mass_deleted_transactions_success' => 'Excluído :amount de transação(ões).',
'mass_edited_transactions_success' => 'Atualizado :amount de transação(ões)',
@@ -699,7 +742,9 @@ return [
'currency' => 'Moeda',
'preferences' => 'Preferências',
'logout' => 'Desconectar',
+ 'toggleNavigation' => 'Toggle navigation',
'searchPlaceholder' => 'Pesquisar...',
+ 'version' => 'Version',
'dashboard' => 'Painel de Controle',
'currencies' => 'Moedas',
'accounts' => 'Contas',
@@ -839,7 +884,7 @@ return [
'earned' => 'Ganho',
'overspent' => 'Gasto excedido',
'left' => 'Esquerda',
- 'no_budget' => '(sem orçamento)',
+ 'no_budget' => '(no budget)',
'max-amount' => 'Maximum amount',
'min-amount' => 'Minumum amount',
'journal-amount' => 'Current bill entry',
@@ -925,6 +970,7 @@ return [
'budgets_with_limits' => 'budget(s) com quantidade configurada',
'rule_or_rules' => 'regra(s)',
'rulegroup_or_groups' => 'grupo(s) de regra',
+ 'tag_or_tags' => 'tag(s)',
'configuration_updated' => 'A configuração foi atualizada',
'setting_is_demo_site' => 'Site demo',
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
@@ -1000,6 +1046,7 @@ return [
'split_this_transfer' => 'Dividir essa transferência',
'cannot_edit_multiple_source' => 'Você não pode editar transações parceladas #:id com a descrição ":description" porque ele contém várias contas de origem.',
'cannot_edit_multiple_dest' => 'Você não pode editar transações parceladas #:id com a descrição ":description" porque ele contém várias contas de destino.',
+ 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.',
'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.',
'no_edit_multiple_left' => 'Você não selecionou nenhuma transação válida para editar.',
'cannot_convert_split_journal' => 'Cannot convert a split transaction',
@@ -1012,6 +1059,7 @@ return [
'import_index_title' => 'Import data into Firefly III',
'import_index_sub_title' => 'Index',
'import_general_index_intro' => 'Welcome to Firefly\'s import routine. There are a few ways of importing data into Firefly III, displayed here as buttons.',
+ 'import_general_index_csv_file' => 'Import a (CSV) file',
'import_index_intro' => 'This routine will help you import files from your bank into Firefly III. Please check out the help pages in the top right corner.',
'import_index_file' => 'Select your file',
'import_index_config' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file .',
@@ -1095,7 +1143,7 @@ return [
'no_piggies_imperative_default' => 'Do you have things you\'re saving money for? Create a piggy bank and keep track:',
'no_piggies_create_default' => 'Create a new piggy bank',
'no_bills_title_default' => 'Let\'s create a bill!',
- 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent of insurance.',
+ 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.',
'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:',
'no_bills_create_default' => 'Create a bill',
diff --git a/resources/lang/pt_BR/form.php b/resources/lang/pt_BR/form.php
index 255a2d254f..1377664080 100644
--- a/resources/lang/pt_BR/form.php
+++ b/resources/lang/pt_BR/form.php
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Apagar permanentemente',
'cancel' => 'Cancelar',
'targetdate' => 'Data Alvo',
+ 'startdate' => 'Start date',
'tag' => 'Etiqueta',
'under' => 'Debaixo',
'symbol' => 'Símbolo',
diff --git a/resources/lang/pt_BR/list.php b/resources/lang/pt_BR/list.php
index 2033eec94c..6e258cdc09 100644
--- a/resources/lang/pt_BR/list.php
+++ b/resources/lang/pt_BR/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'ID',
'create_date' => 'Criado em',
'update_date' => 'Atualizado em',
- 'updated_at' => 'Updated at',
+ 'updated_at' => 'Updated at',
'balance_before' => 'Saldo Antes',
'balance_after' => 'Saldo depois',
'name' => 'Nome',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Sum of withdrawals',
'sum_deposits' => 'Sum of deposits',
'sum_transfers' => 'Sum of transfers',
+ 'reconcile' => 'Reconcile',
];
diff --git a/resources/lang/ru_RU/bank.php b/resources/lang/ru_RU/bank.php
index 11f05b3785..27d103f5f9 100644
--- a/resources/lang/ru_RU/bank.php
+++ b/resources/lang/ru_RU/bank.php
@@ -1,6 +1,8 @@
'Prerequisites for an import from bunq',
- 'bunq_prerequisites_text' => 'In order to import from bunq, you need to obtain an API key. You can do this through the app.',
-];
\ No newline at end of file
+ 'bunq_prerequisites_title' => 'Реквизиты для импорта из bunq',
+ 'bunq_prerequisites_text' => 'Для импорта из bunq вам необходимо получить API ключ. Вы можете сделать это через приложение.',
+];
diff --git a/resources/lang/ru_RU/breadcrumbs.php b/resources/lang/ru_RU/breadcrumbs.php
index 7cd631ef0c..6b9d6eaf60 100644
--- a/resources/lang/ru_RU/breadcrumbs.php
+++ b/resources/lang/ru_RU/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'Мои доходы',
'transfer_list' => 'Переводы',
'transfers_list' => 'Переводы',
+ 'reconciliation_list' => 'Reconciliations',
'create_withdrawal' => 'Создать новый расход',
'create_deposit' => 'Создать новый доход',
'create_transfer' => 'Создать новый перевод',
'edit_journal' => 'Редактирование транзакции ":description"',
+ 'edit_reconciliation' => 'Edit ":description"',
'delete_journal' => 'Удаление транзакции ":description"',
'tags' => 'Метки',
'createTag' => 'Создать новую метку',
diff --git a/resources/lang/ru_RU/csv.php b/resources/lang/ru_RU/csv.php
index 1b3c320594..f81770ec63 100644
--- a/resources/lang/ru_RU/csv.php
+++ b/resources/lang/ru_RU/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'Asset account ID (matching Firefly)',
'column_account-name' => 'Asset account (name)',
'column_amount' => 'Amount',
+ 'column_amount_debet' => 'Amount (debet column)',
+ 'column_amount_credit' => 'Amount (credit column)',
'column_amount-comma-separated' => 'Amount (comma as decimal separator)',
'column_bill-id' => 'Bill ID (matching Firefly)',
'column_bill-name' => 'Bill name',
diff --git a/resources/lang/ru_RU/demo.php b/resources/lang/ru_RU/demo.php
index 57e9277cdb..babdfb5310 100644
--- a/resources/lang/ru_RU/demo.php
+++ b/resources/lang/ru_RU/demo.php
@@ -20,7 +20,7 @@ return [
'currencies-index' => 'Firefly III supports multiple currencies. Although it defaults to the Euro it can be set to the US Dollar and many other currencies. As you can see a small selection of currencies has been included but you can add your own if you wish to. Changing the default currency will not change the currency of existing transactions however: Firefly III supports the use of multiple currencies at the same time.',
'transactions-index' => 'These expenses, deposits and transfers are not particularly imaginative. They have been generated automatically.',
'piggy-banks-index' => 'As you can see, there are three piggy banks. Use the plus and minus buttons to influence the amount of money in each piggy bank. Click the name of the piggy bank to see the administration for each piggy bank.',
- 'import-index' => 'Of course, any CSV file can be imported into Firefly III ',
- 'import-configure-security' => 'Because of security concerns, your upload has been replaced with a local file.',
+ 'import-index' => 'Of course, any CSV file can be imported into Firefly III',
+ 'import-configure-security' => 'По соображениям безопасности, загружаемый вами файл был заменен локальным.',
'import-configure-configuration' => 'The configuration you see below is correct for the local file.',
];
diff --git a/resources/lang/ru_RU/firefly.php b/resources/lang/ru_RU/firefly.php
index 7dcf9afe4d..e56bd79980 100644
--- a/resources/lang/ru_RU/firefly.php
+++ b/resources/lang/ru_RU/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'Incomplete translation',
'close' => 'Закрыть',
'actions' => 'Действия',
'edit' => 'Изменить',
'delete' => 'Удалить',
'welcomeBack' => 'Что происходит с моими финансами?',
'everything' => 'Всё',
+ 'today' => 'today',
'customRange' => 'Другой интервал',
'apply' => 'Применить',
'select_date' => 'Выбрать дату...',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Данные транзакции',
'invalid_server_configuration' => 'Invalid server configuration',
'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are instructions how to do this .',
+ 'quickswitch' => 'Quickswitch',
// search
'search' => 'Поиск',
@@ -147,7 +150,7 @@ return [
'repeat_freq_half-year' => 'every half-year',
'repeat_freq_quarterly' => 'quarterly',
'repeat_freq_monthly' => 'ежемесячно',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'weekly',
'weekly' => 'еженедельно',
'quarterly' => 'раз в квартал',
'half-year' => 'раз в полгода',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Without date',
'result' => 'Result',
'sums_apply_to_range' => 'All sums apply to the selected range',
+ 'mapbox_api_key' => 'To use map, get an API key from Mapbox . Open your .env
file en enter this code after MAPBOX_API_KEY=
.',
'press_tag_location' => 'Right click or long press to set the tag\'s location.',
'clear_location' => 'Clear location',
@@ -586,6 +590,8 @@ return [
'not_expected_period' => 'Not expected this period',
'bill_is_active' => 'Bill is active',
'bill_will_automatch' => 'Bill will automatically linked to matching transactions',
+ 'skips_over' => 'skips over',
+
// accounts:
'details_for_asset' => 'Details for asset account ":name"',
'details_for_expense' => 'Details for expense account ":name"',
@@ -614,6 +620,27 @@ return [
'revenue_accounts' => 'Revenue accounts',
'cash_accounts' => 'Cash accounts',
'Cash account' => 'Cash account',
+ 'reconcile_account' => 'Reconcile account ":account"',
+ 'delete_reconciliation' => 'Delete reconciliation',
+ 'update_reconciliation' => 'Update reconciliation',
+ 'amount_cannot_be_zero' => 'The amount cannot be zero',
+ 'end_of_reconcile_period' => 'End of reconcile period: :period',
+ 'start_of_reconcile_period' => 'Start of reconcile period: :period',
+ 'start_balance' => 'Start balance',
+ 'end_balance' => 'End balance',
+ 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"',
+ 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.',
+ 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"',
+ 'date_change_instruction' => 'If you change the date range now, any progress will be lost.',
+ 'update_selection' => 'Update selection',
+ 'store_reconcile' => 'Store reconciliation',
+ 'reconciliation_transaction' => 'Reconciliation transaction',
+ 'Reconciliation' => 'Reconciliation',
+ 'reconciliation' => 'Reconciliation',
+ 'reconcile_options' => 'Reconciliation options',
+ 'reconcile_range' => 'Reconciliation range',
+ 'start_reconcile' => 'Start reconciling',
+ 'cash' => 'cash',
'account_type' => 'Account type',
'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:',
'stored_new_account' => 'New account ":name" stored!',
@@ -626,6 +653,22 @@ return [
'select_more_than_one_budget' => 'Please select more than one budget',
'select_more_than_one_tag' => 'Please select more than one tag',
'account_default_currency' => 'If you select another currency, new transactions from this account will have this currency pre-selected.',
+ 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.',
+ 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.',
+ 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.',
+ 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.',
+ 'reconcile_go_back' => 'You can always edit or delete a correction later.',
+ 'must_be_asset_account' => 'You can only reconcile asset accounts',
+ 'reconciliation_stored' => 'Reconciliation stored',
+ 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)',
+ 'reconcile_this_account' => 'Reconcile this account',
+ 'confirm_reconciliation' => 'Confirm reconciliation',
+ 'submitted_start_balance' => 'Submitted start balance',
+ 'selected_transactions' => 'Selected transactions (:count)',
+ 'already_cleared_transactions' => 'Already cleared transactions (:count)',
+ 'submitted_end_balance' => 'Submitted end balance',
// categories:
'new_category' => 'Новая категория',
@@ -659,11 +702,11 @@ return [
'stored_journal' => 'Successfully created new transaction ":description"',
'select_transactions' => 'Выбрать транзакции',
'stop_selection' => 'Завершить выбор транзакций',
- 'edit_selected' => 'Edit selected',
- 'delete_selected' => 'Delete selected',
+ 'reconcile_selected' => 'Reconcile',
'mass_delete_journals' => 'Delete a number of transactions',
'mass_edit_journals' => 'Edit a number of transactions',
'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.',
+ 'no_budget' => '(no budget)',
'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.',
'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).',
'mass_edited_transactions_success' => 'Updated :amount transaction(s)',
@@ -699,7 +742,9 @@ return [
'currency' => 'Валюта',
'preferences' => 'Настройки',
'logout' => 'Выход',
+ 'toggleNavigation' => 'Toggle navigation',
'searchPlaceholder' => 'Поиск...',
+ 'version' => 'Version',
'dashboard' => 'Сводка',
'currencies' => 'Валюты',
'accounts' => 'Счета',
@@ -925,6 +970,7 @@ return [
'budgets_with_limits' => 'budget(s) with configured amount',
'rule_or_rules' => 'rule(s)',
'rulegroup_or_groups' => 'rule group(s)',
+ 'tag_or_tags' => 'tag(s)',
'configuration_updated' => 'The configuration has been updated',
'setting_is_demo_site' => 'Demo site',
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
@@ -1000,6 +1046,7 @@ return [
'split_this_transfer' => 'Split this transfer',
'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.',
'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.',
+ 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.',
'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.',
'no_edit_multiple_left' => 'You have selected no valid transactions to edit.',
'cannot_convert_split_journal' => 'Cannot convert a split transaction',
@@ -1012,6 +1059,7 @@ return [
'import_index_title' => 'Импорт данных в Firefly III',
'import_index_sub_title' => 'Index',
'import_general_index_intro' => 'Welcome to Firefly\'s import routine. There are a few ways of importing data into Firefly III, displayed here as buttons.',
+ 'import_general_index_csv_file' => 'Import a (CSV) file',
'import_index_intro' => 'This routine will help you import files from your bank into Firefly III. Please check out the help pages in the top right corner.',
'import_index_file' => 'Select your file',
'import_index_config' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file .',
@@ -1095,7 +1143,7 @@ return [
'no_piggies_imperative_default' => 'Do you have things you\'re saving money for? Create a piggy bank and keep track:',
'no_piggies_create_default' => 'Create a new piggy bank',
'no_bills_title_default' => 'Let\'s create a bill!',
- 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent of insurance.',
+ 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.',
'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:',
'no_bills_create_default' => 'Create a bill',
diff --git a/resources/lang/ru_RU/form.php b/resources/lang/ru_RU/form.php
index b4832f0cf6..c5fd8619f3 100644
--- a/resources/lang/ru_RU/form.php
+++ b/resources/lang/ru_RU/form.php
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Delete permanently',
'cancel' => 'Отмена',
'targetdate' => 'Намеченная дата',
+ 'startdate' => 'Start date',
'tag' => 'Тег',
'under' => 'Under',
'symbol' => 'Символ',
diff --git a/resources/lang/ru_RU/list.php b/resources/lang/ru_RU/list.php
index f1ce3395d5..a0a1d8cd6e 100644
--- a/resources/lang/ru_RU/list.php
+++ b/resources/lang/ru_RU/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'ID',
'create_date' => 'Создан',
'update_date' => 'Обновлён',
- 'updated_at' => 'Updated at',
+ 'updated_at' => 'Updated at',
'balance_before' => 'Баланс до',
'balance_after' => 'Баланс после',
'name' => 'Имя',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Sum of withdrawals',
'sum_deposits' => 'Sum of deposits',
'sum_transfers' => 'Sum of transfers',
+ 'reconcile' => 'Reconcile',
];
diff --git a/resources/lang/ru_RU/validation.php b/resources/lang/ru_RU/validation.php
index 8273315994..a4ef9fd56b 100644
--- a/resources/lang/ru_RU/validation.php
+++ b/resources/lang/ru_RU/validation.php
@@ -22,49 +22,49 @@ return [
'file_invalid_mime' => 'Файл ":name" имеет тип ":mime". Загрузка файлов такого типа невозможна.',
'file_too_large' => 'Файл ":name" слишком большой.',
'belongs_to_user' => 'Значение :attribute неизвестно',
- 'accepted' => 'The :attribute must be accepted.',
- 'bic' => 'This is not a valid BIC.',
- 'more' => ':attribute must be larger than zero.',
- 'active_url' => 'The :attribute is not a valid URL.',
- 'after' => 'The :attribute must be a date after :date.',
- 'alpha' => 'The :attribute may only contain letters.',
- 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
- 'alpha_num' => 'The :attribute may only contain letters and numbers.',
- 'array' => 'The :attribute must be an array.',
- 'unique_for_user' => 'There already is an entry with this :attribute.',
- 'before' => 'The :attribute must be a date before :date.',
- 'unique_object_for_user' => 'This name is already in use',
- 'unique_account_for_user' => 'This account name is already in use',
- 'between.numeric' => 'The :attribute must be between :min and :max.',
- 'between.file' => 'The :attribute must be between :min and :max kilobytes.',
- 'between.string' => 'The :attribute must be between :min and :max characters.',
- 'between.array' => 'The :attribute must have between :min and :max items.',
- 'boolean' => 'The :attribute field must be true or false.',
- 'confirmed' => 'The :attribute confirmation does not match.',
- 'date' => 'The :attribute is not a valid date.',
- 'date_format' => 'The :attribute does not match the format :format.',
- 'different' => 'The :attribute and :other must be different.',
- 'digits' => 'The :attribute must be :digits digits.',
- 'digits_between' => 'The :attribute must be between :min and :max digits.',
- 'email' => 'The :attribute must be a valid email address.',
- 'filled' => 'The :attribute field is required.',
- 'exists' => 'The selected :attribute is invalid.',
- 'image' => 'The :attribute must be an image.',
- 'in' => 'The selected :attribute is invalid.',
- 'integer' => 'The :attribute must be an integer.',
- 'ip' => 'The :attribute must be a valid IP address.',
- 'json' => 'The :attribute must be a valid JSON string.',
+ 'accepted' => 'Необходимо принять :attribute.',
+ 'bic' => 'Это некорректный BIC.',
+ 'more' => ':attribute должен быть больше нуля.',
+ 'active_url' => ':attribute не является допустимым URL-адресом.',
+ 'after' => ':attribute должна быть позже :date.',
+ 'alpha' => ':attribute может содержать только буквы.',
+ 'alpha_dash' => ':attribute может содержать только буквы, числа и дефис.',
+ 'alpha_num' => ':attribute может содержать только буквы и числа.',
+ 'array' => ':attribute должен быть массивом.',
+ 'unique_for_user' => 'Уже существует запись с этим :attribute.',
+ 'before' => ':attribute должна быть раньше :date.',
+ 'unique_object_for_user' => 'Это имя уже используется',
+ 'unique_account_for_user' => 'Имя аккаунта уже используется',
+ 'between.numeric' => ':attribute должен быть больше :min и меньше :max.',
+ 'between.file' => ':attribute должен быть размером :min - :max килобайт.',
+ 'between.string' => ':attribute должен содержать :min - :max символов.',
+ 'between.array' => ':attribute должен содержать :min - :max элементов.',
+ 'boolean' => 'Поле :attribute должно быть истинным или ложным.',
+ 'confirmed' => ':attribute не совпадает с подтверждением.',
+ 'date' => ':attribute не является верной датой.',
+ 'date_format' => ':attribute не совпадает с форматом :format.',
+ 'different' => ':attribute и :other не должны совпадать.',
+ 'digits' => ':attribute должно содержать :digits цифр.',
+ 'digits_between' => ':attribute должен содержать :min - :max цифр.',
+ 'email' => ':attribute не является верным email адресом.',
+ 'filled' => 'Поле :attribute должно быть заполнено.',
+ 'exists' => 'Выбран неверный :attribute.',
+ 'image' => ':attribute должен быть изображением.',
+ 'in' => 'Выбранный :attribute не верный.',
+ 'integer' => ':attribute должно быть целым числом.',
+ 'ip' => ':attribute должен быть верным IP-адресом.',
+ 'json' => ':attribute должно быть верной JSON строкой.',
'max.numeric' => 'The :attribute may not be greater than :max.',
'max.file' => 'The :attribute may not be greater than :max kilobytes.',
'max.string' => 'The :attribute may not be greater than :max characters.',
'max.array' => 'The :attribute may not have more than :max items.',
'mimes' => 'The :attribute must be a file of type: :values.',
- 'min.numeric' => 'The :attribute must be at least :min.',
- 'min.file' => 'The :attribute must be at least :min kilobytes.',
+ 'min.numeric' => ':attribute должен быть минимум :min.',
+ 'min.file' => ':attribute должен быть минимум :min килобайт.',
'min.string' => 'The :attribute must be at least :min characters.',
'min.array' => 'The :attribute must have at least :min items.',
- 'not_in' => 'The selected :attribute is invalid.',
- 'numeric' => 'The :attribute must be a number.',
+ 'not_in' => 'Выбранный :attribute не верный.',
+ 'numeric' => ':attribute должен быть числом.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.',
@@ -72,22 +72,22 @@ return [
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values is present.',
'required_without' => 'The :attribute field is required when :values is not present.',
- 'required_without_all' => 'The :attribute field is required when none of :values are present.',
- 'same' => 'The :attribute and :other must match.',
- 'size.numeric' => 'The :attribute must be :size.',
- 'size.file' => 'The :attribute must be :size kilobytes.',
- 'size.string' => 'The :attribute must be :size characters.',
- 'size.array' => 'The :attribute must contain :size items.',
- 'unique' => 'The :attribute has already been taken.',
- 'string' => 'The :attribute must be a string.',
- 'url' => 'The :attribute format is invalid.',
- 'timezone' => 'The :attribute must be a valid zone.',
- '2fa_code' => 'The :attribute field is invalid.',
- 'dimensions' => 'The :attribute has invalid image dimensions.',
- 'distinct' => 'The :attribute field has a duplicate value.',
- 'file' => 'The :attribute must be a file.',
- 'in_array' => 'The :attribute field does not exist in :other.',
- 'present' => 'The :attribute field must be present.',
- 'amount_zero' => 'The total amount cannot be zero',
- 'secure_password' => 'This is not a secure password. Please try again. For more information, visit https://goo.gl/NCh2tN',
+ 'required_without_all' => ':attribute поле обязательно для заполнения, так как ни одно из :values не существует.',
+ 'same' => ':attribute и :other должны совпадать.',
+ 'size.numeric' => ':attribute должен быть размером :size.',
+ 'size.file' => ':attribute должен быть размером :size килобайт.',
+ 'size.string' => ':attribute должен состоять из :size символов.',
+ 'size.array' => ':attribute должен содержать :size элементов.',
+ 'unique' => ':attribute уже занят.',
+ 'string' => 'Значение :attribute должно быть строкой.',
+ 'url' => 'Неверный формат ввода :attribute.',
+ 'timezone' => ':attribute должен быть в допустимом диапазоне.',
+ '2fa_code' => ':attribute введен неверно.',
+ 'dimensions' => 'Недопустимые размеры изображения :attribute.',
+ 'distinct' => 'Поле :attribute содержит повторяющееся значение.',
+ 'file' => ':attribute должен быть файлом.',
+ 'in_array' => 'Поле :attribute не существует в :other.',
+ 'present' => 'Поле :attribute должно быть заполнено.',
+ 'amount_zero' => 'Общее количество не может быть равно нулю',
+ 'secure_password' => 'Это не безопасный пароль. Попробуйте еще раз. Для получения справки посетите https://goo.gl/NCh2tN',
];
diff --git a/resources/lang/sl_SI/bank.php b/resources/lang/sl_SI/bank.php
index 964f43f024..fd0521b288 100644
--- a/resources/lang/sl_SI/bank.php
+++ b/resources/lang/sl_SI/bank.php
@@ -1,6 +1,8 @@
'Predpogoji za uvoz iz bunq',
'bunq_prerequisites_text' => 'Če želite uvoziti iz bunq-a, morate pridobiti ključ za API. To lahko storite s pomočjo aplikacije.',
-];
\ No newline at end of file
+];
diff --git a/resources/lang/sl_SI/breadcrumbs.php b/resources/lang/sl_SI/breadcrumbs.php
index 04b738b939..c221d3df3f 100644
--- a/resources/lang/sl_SI/breadcrumbs.php
+++ b/resources/lang/sl_SI/breadcrumbs.php
@@ -31,10 +31,12 @@ return [
'deposit_list' => 'prihodki',
'transfer_list' => 'prenosi',
'transfers_list' => 'prenosi',
+ 'reconciliation_list' => 'Poravnave',
'create_withdrawal' => 'ustvari nov odhodek',
'create_deposit' => 'ustvari nov prihodek',
'create_transfer' => 'ustvari nov prenos',
'edit_journal' => 'uredi transakcijo ":description"',
+ 'edit_reconciliation' => 'Uredi ":description"',
'delete_journal' => 'izbriši transakcijo ":description"',
'tags' => 'značke',
'createTag' => 'ustvari novo značko',
diff --git a/resources/lang/sl_SI/csv.php b/resources/lang/sl_SI/csv.php
index 216c4886ae..e9a21edc07 100644
--- a/resources/lang/sl_SI/csv.php
+++ b/resources/lang/sl_SI/csv.php
@@ -51,6 +51,8 @@ return [
'column_account-id' => 'ID premoženjskega računa (Firefly)',
'column_account-name' => 'premoženjski račun (ime)',
'column_amount' => 'znesek',
+ 'column_amount_debet' => 'Znesek v breme',
+ 'column_amount_credit' => 'Znesek v dobro',
'column_amount-comma-separated' => 'znesek (z decimalno vejico)',
'column_bill-id' => 'ID trajnika (Firefly)',
'column_bill-name' => 'Ime trajnika',
diff --git a/resources/lang/sl_SI/demo.php b/resources/lang/sl_SI/demo.php
index dca94a9aa7..a3df49a192 100644
--- a/resources/lang/sl_SI/demo.php
+++ b/resources/lang/sl_SI/demo.php
@@ -21,7 +21,7 @@ Konti prihodkov so računi iz katerih dobivate denar, kot npr. vaš delodajalec,
'currencies-index' => 'Firefly III supports multiple currencies. Although it defaults to the Euro it can be set to the US Dollar and many other currencies. As you can see a small selection of currencies has been included but you can add your own if you wish to. Changing the default currency will not change the currency of existing transactions however: Firefly III supports the use of multiple currencies at the same time.',
'transactions-index' => 'These expenses, deposits and transfers are not particularly imaginative. They have been generated automatically.',
'piggy-banks-index' => 'As you can see, there are three piggy banks. Use the plus and minus buttons to influence the amount of money in each piggy bank. Click the name of the piggy bank to see the administration for each piggy bank.',
- 'import-index' => 'Of course, any CSV file can be imported into Firefly III ',
+ 'import-index' => 'Of course, any CSV file can be imported into Firefly III',
'import-configure-security' => 'Because of security concerns, your upload has been replaced with a local file.',
'import-configure-configuration' => 'The configuration you see below is correct for the local file.',
];
diff --git a/resources/lang/sl_SI/firefly.php b/resources/lang/sl_SI/firefly.php
index 22124ba713..b171129468 100644
--- a/resources/lang/sl_SI/firefly.php
+++ b/resources/lang/sl_SI/firefly.php
@@ -13,12 +13,14 @@ declare(strict_types=1);
return [
// general stuff:
+ 'language_incomplete' => 'nepopoln prevod',
'close' => 'zapri',
'actions' => 'Dejanja',
'edit' => 'uredi',
'delete' => 'izbriši',
'welcomeBack' => 'Kaj dogaja?',
'everything' => 'vse',
+ 'today' => 'danes',
'customRange' => 'obseg po meri',
'apply' => 'uporabi',
'select_date' => 'Izberi datum..',
@@ -82,11 +84,11 @@ return [
'expenses_by_expense_account' => 'stroški po stroškovnih kontih',
'cannot_redirect_to_account' => 'Firefly III cannot redirect you to the correct page. Apologies.',
'sum_of_expenses' => 'vsota stroškov',
- 'sum_of_income' => 'Sum of income',
+ 'sum_of_income' => 'Vsota dohodkov',
'spent_in_specific_budget' => 'Spent in budget ":budget"',
'sum_of_expenses_in_budget' => 'Spent total in budget ":budget"',
'left_in_budget_limit' => 'Left to spend according to budgeting',
- 'current_period' => 'Current period',
+ 'current_period' => 'Tekoče obdobje',
'show_the_current_period_and_overview' => 'Show the current period and overview',
'pref_languages_locale' => 'For a language other than English to work properly, your operating system must be equipped with the correct locale-information. If these are not present, currency data, dates and amounts may be formatted wrong.',
'budget_in_period' => 'All transactions for budget ":name" between :start and :end',
@@ -94,30 +96,30 @@ return [
'chart_account_in_period' => 'Chart for all transactions for account ":name" between :start and :end',
'chart_category_in_period' => 'Chart for all transactions for category ":name" between :start and :end',
'chart_category_all' => 'Chart for all transactions for category ":name"',
- 'clone_withdrawal' => 'Clone this withdrawal',
- 'clone_deposit' => 'Clone this deposit',
- 'clone_transfer' => 'Clone this transfer',
- 'multi_select_no_selection' => 'None selected',
- 'multi_select_all_selected' => 'All selected',
- 'multi_select_filter_placeholder' => 'Find..',
- 'between_dates_breadcrumb' => 'Between :start and :end',
- 'all_journals_without_budget' => 'All transactions without a budget',
- 'journals_without_budget' => 'Transactions without a budget',
- 'all_journals_without_category' => 'All transactions without a category',
- 'journals_without_category' => 'Transactions without a category',
- 'all_journals_for_account' => 'All transactions for account :name',
- 'chart_all_journals_for_account' => 'Chart of all transactions for account :name',
- 'journals_in_period_for_account' => 'All transactions for account :name between :start and :end',
- 'transferred' => 'Transferred',
+ 'clone_withdrawal' => 'Kloniraj ta odhodek',
+ 'clone_deposit' => 'Kloniraj ta prihodek',
+ 'clone_transfer' => 'Kloniraj ta prenos',
+ 'multi_select_no_selection' => 'Nič ni izbrano',
+ 'multi_select_all_selected' => 'Vse je izbrano',
+ 'multi_select_filter_placeholder' => 'Najdi..',
+ 'between_dates_breadcrumb' => 'Med :start in :end',
+ 'all_journals_without_budget' => 'Vse transakcije brez budžeta',
+ 'journals_without_budget' => 'Transakcije brez budžeta',
+ 'all_journals_without_category' => 'Vse transakcije brez kategorije',
+ 'journals_without_category' => 'Transakcije brez kategorije',
+ 'all_journals_for_account' => 'Vse transakcije za konto :ime',
+ 'chart_all_journals_for_account' => 'Graf vseh transakcij za konto :name',
+ 'journals_in_period_for_account' => 'stroški na kontu ":name" med :start in :end',
+ 'transferred' => 'Prenešeno',
'all_withdrawal' => 'vsi stroški',
- 'all_transactions' => 'All transactions',
+ 'all_transactions' => 'Vse transakcije',
'title_withdrawal_between' => 'vsi stroški med :start in :end',
- 'all_deposit' => 'All revenue',
- 'title_deposit_between' => 'All revenue between :start and :end',
- 'all_transfers' => 'All transfers',
- 'title_transfers_between' => 'All transfers between :start and :end',
- 'all_transfer' => 'All transfers',
- 'all_journals_for_tag' => 'All transactions for tag ":tag"',
+ 'all_deposit' => 'Vsi prihodki',
+ 'title_deposit_between' => 'Vsi prihodki med :start in :end',
+ 'all_transfers' => 'Vsi prenosi',
+ 'title_transfers_between' => 'vsi prenosi med :start in :end',
+ 'all_transfer' => 'Vsi prenosi',
+ 'all_journals_for_tag' => 'Vse transakcije za značko ":tag"',
'title_transfer_between' => 'All transfers between :start and :end',
'all_journals_for_category' => 'All transactions for category :name',
'all_journals_for_budget' => 'All transactions for budget :name',
@@ -130,6 +132,7 @@ return [
'transaction_data' => 'Transaction data',
'invalid_server_configuration' => 'Invalid server configuration',
'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are instructions how to do this .',
+ 'quickswitch' => 'Quickswitch',
// search
'search' => 'Search',
@@ -147,7 +150,7 @@ return [
'repeat_freq_half-year' => 'every half-year',
'repeat_freq_quarterly' => 'quarterly',
'repeat_freq_monthly' => 'monthly',
- 'repeat_freq_weekly' => 'weekly',
+ 'repeat_freq_weekly' => 'weekly',
'weekly' => 'weekly',
'quarterly' => 'quarterly',
'half-year' => 'every half year',
@@ -354,6 +357,7 @@ return [
'without_date' => 'Without date',
'result' => 'Result',
'sums_apply_to_range' => 'All sums apply to the selected range',
+ 'mapbox_api_key' => 'To use map, get an API key from Mapbox . Open your .env
file en enter this code after MAPBOX_API_KEY=
.',
'press_tag_location' => 'Right click or long press to set the tag\'s location.',
'clear_location' => 'Clear location',
@@ -586,6 +590,8 @@ return [
'not_expected_period' => 'Not expected this period',
'bill_is_active' => 'Bill is active',
'bill_will_automatch' => 'Bill will automatically linked to matching transactions',
+ 'skips_over' => 'skips over',
+
// accounts:
'details_for_asset' => 'podrobnosti za premoženjski račun ":name"',
'details_for_expense' => 'podrobnosti stroškovnega konta ":name"',
@@ -614,6 +620,27 @@ return [
'revenue_accounts' => 'Revenue accounts',
'cash_accounts' => 'Cash accounts',
'Cash account' => 'Cash account',
+ 'reconcile_account' => 'Reconcile account ":account"',
+ 'delete_reconciliation' => 'Delete reconciliation',
+ 'update_reconciliation' => 'Update reconciliation',
+ 'amount_cannot_be_zero' => 'The amount cannot be zero',
+ 'end_of_reconcile_period' => 'End of reconcile period: :period',
+ 'start_of_reconcile_period' => 'Start of reconcile period: :period',
+ 'start_balance' => 'Start balance',
+ 'end_balance' => 'End balance',
+ 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"',
+ 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.',
+ 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"',
+ 'date_change_instruction' => 'If you change the date range now, any progress will be lost.',
+ 'update_selection' => 'Update selection',
+ 'store_reconcile' => 'Store reconciliation',
+ 'reconciliation_transaction' => 'Reconciliation transaction',
+ 'Reconciliation' => 'Reconciliation',
+ 'reconciliation' => 'Reconciliation',
+ 'reconcile_options' => 'Reconciliation options',
+ 'reconcile_range' => 'Reconciliation range',
+ 'start_reconcile' => 'Start reconciling',
+ 'cash' => 'cash',
'account_type' => 'Account type',
'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:',
'stored_new_account' => 'New account ":name" stored!',
@@ -626,6 +653,22 @@ return [
'select_more_than_one_budget' => 'Please select more than one budget',
'select_more_than_one_tag' => 'Please select more than one tag',
'account_default_currency' => 'If you select another currency, new transactions from this account will have this currency pre-selected.',
+ 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
+ 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.',
+ 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.',
+ 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.',
+ 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.',
+ 'reconcile_go_back' => 'You can always edit or delete a correction later.',
+ 'must_be_asset_account' => 'You can only reconcile asset accounts',
+ 'reconciliation_stored' => 'Reconciliation stored',
+ 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)',
+ 'reconcile_this_account' => 'Reconcile this account',
+ 'confirm_reconciliation' => 'Confirm reconciliation',
+ 'submitted_start_balance' => 'Submitted start balance',
+ 'selected_transactions' => 'Selected transactions (:count)',
+ 'already_cleared_transactions' => 'Already cleared transactions (:count)',
+ 'submitted_end_balance' => 'Submitted end balance',
// categories:
'new_category' => 'New category',
@@ -659,11 +702,11 @@ return [
'stored_journal' => 'Successfully created new transaction ":description"',
'select_transactions' => 'Select transactions',
'stop_selection' => 'Stop selecting transactions',
- 'edit_selected' => 'Edit selected',
- 'delete_selected' => 'Delete selected',
+ 'reconcile_selected' => 'Reconcile',
'mass_delete_journals' => 'Delete a number of transactions',
'mass_edit_journals' => 'Edit a number of transactions',
'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.',
+ 'no_budget' => '(no budget)',
'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.',
'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).',
'mass_edited_transactions_success' => 'Updated :amount transaction(s)',
@@ -699,7 +742,9 @@ return [
'currency' => 'Currency',
'preferences' => 'Preferences',
'logout' => 'Logout',
+ 'toggleNavigation' => 'Toggle navigation',
'searchPlaceholder' => 'Search...',
+ 'version' => 'Version',
'dashboard' => 'Dashboard',
'currencies' => 'Currencies',
'accounts' => 'Accounts',
@@ -925,6 +970,7 @@ return [
'budgets_with_limits' => 'budget(s) with configured amount',
'rule_or_rules' => 'rule(s)',
'rulegroup_or_groups' => 'rule group(s)',
+ 'tag_or_tags' => 'tag(s)',
'configuration_updated' => 'The configuration has been updated',
'setting_is_demo_site' => 'Demo site',
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
@@ -1000,6 +1046,7 @@ return [
'split_this_transfer' => 'Split this transfer',
'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.',
'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.',
+ 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.',
'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.',
'no_edit_multiple_left' => 'You have selected no valid transactions to edit.',
'cannot_convert_split_journal' => 'Cannot convert a split transaction',
@@ -1012,6 +1059,7 @@ return [
'import_index_title' => 'Import data into Firefly III',
'import_index_sub_title' => 'Index',
'import_general_index_intro' => 'Welcome to Firefly\'s import routine. There are a few ways of importing data into Firefly III, displayed here as buttons.',
+ 'import_general_index_csv_file' => 'Import a (CSV) file',
'import_index_intro' => 'This routine will help you import files from your bank into Firefly III. Please check out the help pages in the top right corner.',
'import_index_file' => 'Select your file',
'import_index_config' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file .',
@@ -1095,7 +1143,7 @@ return [
'no_piggies_imperative_default' => 'Do you have things you\'re saving money for? Create a piggy bank and keep track:',
'no_piggies_create_default' => 'Create a new piggy bank',
'no_bills_title_default' => 'Let\'s create a bill!',
- 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent of insurance.',
+ 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.',
'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:',
'no_bills_create_default' => 'Create a bill',
diff --git a/resources/lang/sl_SI/form.php b/resources/lang/sl_SI/form.php
index 178718ace6..69ec14c2f2 100644
--- a/resources/lang/sl_SI/form.php
+++ b/resources/lang/sl_SI/form.php
@@ -91,6 +91,7 @@ return [
'deletePermanently' => 'Delete permanently',
'cancel' => 'Cancel',
'targetdate' => 'Target date',
+ 'startdate' => 'Start date',
'tag' => 'Tag',
'under' => 'Under',
'symbol' => 'Symbol',
diff --git a/resources/lang/sl_SI/list.php b/resources/lang/sl_SI/list.php
index 6aa58450e2..15f7b08998 100644
--- a/resources/lang/sl_SI/list.php
+++ b/resources/lang/sl_SI/list.php
@@ -17,7 +17,7 @@ return [
'id' => 'ID',
'create_date' => 'Ustvarjeno',
'update_date' => 'Posodobljeno',
- 'updated_at' => 'Posodobljeno',
+ 'updated_at' => 'Posodobljeno',
'balance_before' => 'Stanje prej',
'balance_after' => 'Stanje potem',
'name' => 'ime',
@@ -89,4 +89,5 @@ return [
'sum_withdrawals' => 'Vsota odlivov',
'sum_deposits' => 'Vsota prilivov',
'sum_transfers' => 'Vsota prenosov',
+ 'reconcile' => 'Poravnaj',
];
diff --git a/resources/stubs/binary.bin b/resources/stubs/binary.bin
new file mode 100644
index 0000000000..25602c8fbc
Binary files /dev/null and b/resources/stubs/binary.bin differ
diff --git a/resources/views/accounts/reconcile/edit.twig b/resources/views/accounts/reconcile/edit.twig
new file mode 100644
index 0000000000..dff6c8c6dc
--- /dev/null
+++ b/resources/views/accounts/reconcile/edit.twig
@@ -0,0 +1,115 @@
+{% extends "./layout/default" %}
+
+{% block breadcrumbs %}
+ {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }}
+{% endblock %}
+
+{% block content %}
+
+
+
+{% endblock %}
+{% block scripts %}
+
+
+
+
+
+
+
+
+
+{% endblock %}
+{% block styles %}
+
+
+
+{% endblock %}
diff --git a/resources/views/accounts/reconcile/index.twig b/resources/views/accounts/reconcile/index.twig
new file mode 100644
index 0000000000..70b82ee4b2
--- /dev/null
+++ b/resources/views/accounts/reconcile/index.twig
@@ -0,0 +1,139 @@
+{% extends "./layout/default" %}
+
+{% block breadcrumbs %}
+ {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, account, moment, start, end) }}
+{% endblock %}
+
+{% block content %}
+
+
+
+
+
+
+
+
+
+
+ {{ 'store_reconcile'|_ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ 'select_range_and_balance'|_ }}
+
+
+
+
+
+
+
+
+{% endblock %}
+
+{% block scripts %}
+
+
+{% endblock %}
diff --git a/resources/views/accounts/reconcile/overview.twig b/resources/views/accounts/reconcile/overview.twig
new file mode 100644
index 0000000000..abc2fe9af3
--- /dev/null
+++ b/resources/views/accounts/reconcile/overview.twig
@@ -0,0 +1,102 @@
+
+
diff --git a/resources/views/accounts/reconcile/show.twig b/resources/views/accounts/reconcile/show.twig
new file mode 100644
index 0000000000..0dab366f46
--- /dev/null
+++ b/resources/views/accounts/reconcile/show.twig
@@ -0,0 +1,107 @@
+{% extends "./layout/default" %}
+
+{% block breadcrumbs %}
+ {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }}
+{% endblock %}
+
+{% block content %}
+
+
+
+
+
+
+
+
+ {{ trans('list.type') }}
+ {{ journal.transactiontype.type|_ }}
+
+
+ {{ trans('list.description') }}
+ {{ journal.description }}
+
+ {# total amount #}
+
+ {{ 'total_amount'|_ }}
+
+ {{ formatAmountByAccount(transaction.account, transaction.amount) }}
+
+
+
+
+ {{ trans('list.date') }}
+ {{ journal.date.formatLocalized(monthAndDayFormat) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ 'categories'|_ }}
+ {{ journalCategories(journal)|raw }}
+
+ {% if journal.tags|length > 0 %}
+
+ {{ 'tags'|_ }}
+
+ {% for tag in journal.tags %}
+
+
+ {% endfor %}
+
+
+ {% endif %}
+
+
+
+
+
+
+
+{% endblock %}
+{% block scripts %}
+{% endblock %}
diff --git a/resources/views/accounts/reconcile/transactions.twig b/resources/views/accounts/reconcile/transactions.twig
new file mode 100644
index 0000000000..fb1ddbf4eb
--- /dev/null
+++ b/resources/views/accounts/reconcile/transactions.twig
@@ -0,0 +1,133 @@
+
\ No newline at end of file
diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig
index 43c219fc54..194d232703 100644
--- a/resources/views/accounts/show.twig
+++ b/resources/views/accounts/show.twig
@@ -85,7 +85,7 @@
{{ 'transactions'|_ }}
- {% include 'list.journals' with {sorting:true, hideBills:true, hideBudgets: true, hideCategories: true} %}
+ {% include 'list.journals' with {sorting:true, hideBills:true, hideBudgets: true, hideCategories: true, showReconcile: true} %}
{% if periods.count > 0 %}
diff --git a/resources/views/admin/link/show.twig b/resources/views/admin/link/show.twig
index bf71cb1f5a..9515d56588 100644
--- a/resources/views/admin/link/show.twig
+++ b/resources/views/admin/link/show.twig
@@ -34,13 +34,14 @@
{{ link.source.description }}
-
{{ journalAmount(link.source) }}
+
{{ link.source|journalTotalAmount }}
{{ linkType.outward }}
{{ link.destination.description }}
- {{ journalAmount(link.destination) }}
+ {{ link.destination|journalTotalAmount }}
+
{% endfor %}
diff --git a/resources/views/admin/users/show.twig b/resources/views/admin/users/show.twig
index 2922ed89ff..b627f4c2f0 100644
--- a/resources/views/admin/users/show.twig
+++ b/resources/views/admin/users/show.twig
@@ -32,9 +32,9 @@
{{ trans('list.is_admin') }}
{% if information.is_admin %}
- Yes
+ {{ 'yes'|_ }}
{% else %}
- No
+ {{ 'no'|_ }}
{% endif %}
@@ -42,9 +42,9 @@
{{ trans('list.has_two_factor') }}
{% if information.has_2fa %}
- Yes
+ {{ 'yes'|_ }}
{% else %}
- No
+ {{ 'no'|_ }}
{% endif %}
@@ -52,7 +52,7 @@
{{ trans('list.is_blocked') }}
{% if information.blocked %}
- Yes:
+ {{ 'yes'|_ }}:
{% if information.blocked_code == "" %}
~
@@ -61,7 +61,7 @@
{% endif %}
{% else %}
- No
+ {{ 'no'|_ }}
{% endif %}
@@ -122,7 +122,7 @@
{{ trans('list.tags_count') }}
- {{ information.tags }} tags
+ {{ information.tags }} {{ 'tag_or_tags'|_ }}
diff --git a/resources/views/bills/create.twig b/resources/views/bills/create.twig
index 5ee65cf3c8..3f2701cbcd 100644
--- a/resources/views/bills/create.twig
+++ b/resources/views/bills/create.twig
@@ -6,7 +6,7 @@
{% block content %}
-
diff --git a/resources/views/bills/edit.twig b/resources/views/bills/edit.twig
index ee48b4375b..e2983cd929 100644
--- a/resources/views/bills/edit.twig
+++ b/resources/views/bills/edit.twig
@@ -6,7 +6,7 @@
{% block content %}
- {{ Form.model(bill, {'class' : 'form-horizontal','id' : 'update','url' : route('bills.update', bill.id)}) }}
+ {{ Form.model(bill, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('bills.update', bill.id)}) }}
@@ -34,6 +34,8 @@
{{ 'optionalFields'|_ }}
+ {{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
+ {{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
{{ ExpandedForm.integer('skip') }}
{{ ExpandedForm.checkbox('automatch',1) }}
{{ ExpandedForm.checkbox('active',1) }}
diff --git a/resources/views/bills/index.twig b/resources/views/bills/index.twig
index ef136db47f..0870429463 100644
--- a/resources/views/bills/index.twig
+++ b/resources/views/bills/index.twig
@@ -19,7 +19,7 @@
@@ -39,4 +39,4 @@
{% block scripts %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig
index d233a6de8c..24846d11c4 100644
--- a/resources/views/bills/show.twig
+++ b/resources/views/bills/show.twig
@@ -24,7 +24,7 @@
-
+
{{ 'matching_on'|_ }}
@@ -84,12 +84,60 @@
-
-
- {{ 'rescan_old'|_ }}
-
+
+ {% if bill.notes.count == 1 %}
+
+
+ {{ trans('list.notes') }}
+ {{ bill.notes.first.text|markdown }}
+
+
+ {% endif %}
+
+
+
+ {% if bill.attachments|length > 0 %}
+
+ {% endif %}
diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig
index 71ba5fd301..6c071bd65a 100644
--- a/resources/views/budgets/index.twig
+++ b/resources/views/budgets/index.twig
@@ -164,7 +164,7 @@
{% endif %}
{% if budgetInformation[budget.id]['currentLimit'] %}
- {% set repAmount = budgetInformation[budget.id]['currentLimit'].amount %}
+ {% set repAmount = budgetInformation[budget.id]['budgeted'] %}
{% else %}
{% set repAmount = '0' %}
{% endif %}
@@ -174,8 +174,8 @@
{{ defaultCurrency.symbol|raw }}
+ data-id="{{ budget.id }}" value="{{ repAmount }}" autocomplete="off"
+ min="0" name="amount" type="number">
-
- Please copy and paste the content of this textbox into a (new) Github issue. Don't change anything, don't add enters or something.
+
+ If you are running into problems, you can use the information in this box as debug information. Please copy-and-paste into a new
+ or existing Github issue . It will generate a beautiful table that can
+ be used to quickly diagnose your problem.
-