Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix some spelling errors.
James Colee21e339cb027
diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.phpindex 9a57385d3e..d8c2736153 100644--- a/app/Http/Controllers/Chart/ReportController.php+++ b/app/Http/Controllers/Chart/ReportController.php@@ -88,7 +88,7 @@ class ReportController extends Controller}/**- * Shows income and expense, debet/credit: operations.+ * Shows income and expense, debit/credit: operations.** @param Collection $accounts* @param Carbon $start@@ -143,7 +143,7 @@ class ReportController extends Controller}/**- * Shows sum income and expense, debet/credit: operations.+ * Shows sum income and expense, debit/credit: operations.** @param Carbon $start* @param Carbon $enddiff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.phpindex 54a188de5d..db6c7fe744 100644--- a/app/Http/Controllers/HomeController.php+++ b/app/Http/Controllers/HomeController.php@@ -102,7 +102,7 @@ class HomeController extends Controller*/public function displayDebug(Request $request){- $phpVersion = PHP_VERSION;+ $phpVersion = str_replace('~','\~',PHP_VERSION);$phpOs = php_uname();$interface = PHP_SAPI;$now = Carbon::create()->format('Y-m-d H:i:s e');diff --git a/app/Import/Converter/Amount.php b/app/Import/Converter/Amount.phpindex 5d6708c5be..e35604a0ba 100644--- a/app/Import/Converter/Amount.php+++ b/app/Import/Converter/Amount.php@@ -25,7 +25,7 @@ namespace FireflyIII\Import\Converter;use Log;/**- * Class RabobankDebetCredit.+ * Class Amount.*/class Amount implements ConverterInterface{diff --git a/app/Import/Converter/AmountDebet.php b/app/Import/Converter/AmountDebit.phpsimilarity index 93%rename from app/Import/Converter/AmountDebet.phprename to app/Import/Converter/AmountDebit.phpindex f4c55153e4..46162ec484 100644--- a/app/Import/Converter/AmountDebet.php+++ b/app/Import/Converter/AmountDebit.php@@ -1,6 +1,6 @@<?php/**- * AmountDebet.php+ * AmountDebit.php* Copyright (c) 2017 [email protected]** This file is part of Firefly III.@@ -23,9 +23,9 @@ declare(strict_types=1);namespace FireflyIII\Import\Converter;/**- * Class AmountDebet+ * Class AmountDebit*/-class AmountDebet implements ConverterInterface+class AmountDebit implements ConverterInterface{/*** @param $valuediff --git a/app/Import/Converter/INGDebetCredit.php b/app/Import/Converter/INGDebitCredit.phpsimilarity index 87%rename from app/Import/Converter/INGDebetCredit.phprename to app/Import/Converter/INGDebitCredit.phpindex cb5ec42560..4779cecca6 100644--- a/app/Import/Converter/INGDebetCredit.php+++ b/app/Import/Converter/INGDebitCredit.php@@ -1,6 +1,6 @@<?php/**- * INGDebetCredit.php+ * INGDebitCredit.php* Copyright (c) 2017 [email protected]** This file is part of Firefly III.@@ -25,9 +25,9 @@ namespace FireflyIII\Import\Converter;use Log;/**- * Class INGDebetCredit.+ * Class INGDebitCredit.*/-class INGDebetCredit implements ConverterInterface+class INGDebitCredit implements ConverterInterface{/*** @param $value@@ -36,7 +36,7 @@ class INGDebetCredit implements ConverterInterface*/public function convert($value){- Log::debug('Going to convert ing debet credit', ['value' => $value]);+ Log::debug('Going to convert ing debit credit', ['value' => $value]);if ('Af' === $value) {Log::debug('Return -1');diff --git a/app/Import/Converter/RabobankDebetCredit.php b/app/Import/Converter/RabobankDebitCredit.phpsimilarity index 91%rename from app/Import/Converter/RabobankDebetCredit.phprename to app/Import/Converter/RabobankDebitCredit.phpindex 626f457cca..242f4ca38f 100644--- a/app/Import/Converter/RabobankDebetCredit.php+++ b/app/Import/Converter/RabobankDebitCredit.php@@ -1,6 +1,6 @@<?php/**- * RabobankDebetCredit.php+ * RabobankDebitCredit.php* Copyright (c) 2017 [email protected]** This file is part of Firefly III.@@ -25,9 +25,9 @@ namespace FireflyIII\Import\Converter;use Log;/**- * Class RabobankDebetCredit.+ * Class RabobankDebitCredit.*/-class RabobankDebetCredit implements ConverterInterface+class RabobankDebitCredit implements ConverterInterface{/*** @param $valuediff --git a/app/Import/Object/ImportJournal.php b/app/Import/Object/ImportJournal.phpindex 85c7ddbb59..c573d747a2 100644--- a/app/Import/Object/ImportJournal.php+++ b/app/Import/Object/ImportJournal.php@@ -63,7 +63,7 @@ class ImportJournal/** @var array */private $amountCredit;/** @var array */- private $amountDebet;+ private $amountDebit;/** @var string */private $convertedAmount = null;/** @var string */@@ -105,7 +105,7 @@ class ImportJournal{Log::debug('Now in getAmount()');Log::debug(sprintf('amount is %s', var_export($this->amount, true)));- Log::debug(sprintf('debet amount is %s', var_export($this->amountDebet, true)));+ Log::debug(sprintf('debit amount is %s', var_export($this->amountDebit, true)));Log::debug(sprintf('credit amount is %s', var_export($this->amountCredit, true)));if (null === $this->convertedAmount) {@@ -188,8 +188,8 @@ class ImportJournalcase 'amount':$this->amount = $array;break;- case 'amount_debet':- $this->amountDebet = $array;+ case 'amount_debit':+ $this->amountDebit = $array;break;case 'amount_credit':$this->amountCredit = $array;@@ -250,8 +250,8 @@ class ImportJournalbreak;case '_ignore':break;- case 'ing-debet-credit':- case 'rabo-debet-credit':+ case 'ing-debit-credit':+ case 'rabo-debit-credit':$this->addToModifier($array);break;case 'opposing-iban':@@ -284,7 +284,7 @@ class ImportJournal/*** If convertedAmount is NULL, this method will try to calculate the correct amount.- * It starts with amount, but can be overruled by debet and credit amounts.+ * It starts with amount, but can be overruled by debit and credit amounts.** @throws FireflyException*/@@ -332,13 +332,13 @@ class ImportJournal$converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amount['role'])));$info = $this->amount;}- if (!is_null($this->amountDebet)) {- Log::debug('Amount DEBET value is not NULL, assume this is the correct value (overrules Amount).');- $converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amountDebet['role'])));- $info = $this->amountDebet;+ if (!is_null($this->amountDebit)) {+ Log::debug('Amount DEBIT value is not NULL, assume this is the correct value (overrules Amount).');+ $converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amountDebit['role'])));+ $info = $this->amountDebit;}if (!is_null($this->amountCredit)) {- Log::debug('Amount CREDIT value is not NULL, assume this is the correct value (overrules Amount and AmountDebet).');+ Log::debug('Amount CREDIT value is not NULL, assume this is the correct value (overrules Amount and AmountDebit).');$converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amountCredit['role'])));$info = $this->amountCredit;}diff --git a/app/Support/Import/Configuration/File/Initial.php b/app/Support/Import/Configuration/File/Initial.phpindex b17090bd72..d41277d84c 100644--- a/app/Support/Import/Configuration/File/Initial.php+++ b/app/Support/Import/Configuration/File/Initial.php@@ -35,7 +35,7 @@ use Log;class Initial implements ConfigurationInterface{/**- * @var+ * @var ImportJob*/private $job;@@ -53,6 +53,11 @@ class Initial implements ConfigurationInterface'tab' => trans('form.csv_tab'),];+ // update job with default date format:+ $config = $this->job->configuration;+ $config['date-format'] = 'Ymd';+ $this->job->configuration = $config;+ $this->job->save();$specifics = [];// collect specifics.@@ -68,6 +73,7 @@ class Initial implements ConfigurationInterface'specifix' => [],'delimiters' => $delimiters,'specifics' => $specifics,+];return $data;diff --git a/app/Support/Import/Configuration/File/Roles.php b/app/Support/Import/Configuration/File/Roles.phpindex fe270a12cc..466c0c515c 100644--- a/app/Support/Import/Configuration/File/Roles.php+++ b/app/Support/Import/Configuration/File/Roles.php@@ -55,7 +55,6 @@ class Roles implements ConfigurationInterface{$config = $this->job->configuration;$content = $this->job->uploadFileContents();- $config['has-headers'] = true;$headers = [];$offset = 0;// create CSV reader.@@ -272,7 +271,7 @@ class Roles implements ConfigurationInterfaceif ('_ignore' !== $role) {++$assigned;}- if (in_array($role, ['amount', 'amount_credit', 'amount_debet'])) {+ if (in_array($role, ['amount', 'amount_credit', 'amount_debit'])) {$hasAmount = true;}}diff --git a/config/csv.php b/config/csv.phpindex e580b36383..0677cc1f8b 100644--- a/config/csv.php+++ b/config/csv.php@@ -175,16 +175,16 @@ return ['field' => 'budget','mapper' => 'Budgets',],- 'rabo-debet-credit' => [+ 'rabo-debit-credit' => ['mappable' => false,'pre-process-map' => false,- 'converter' => 'RabobankDebetCredit',+ 'converter' => 'RabobankDebitCredit','field' => 'amount-modifier',],- 'ing-debet-credit' => [+ 'ing-debit-credit' => ['mappable' => false,'pre-process-map' => false,- 'converter' => 'INGDebetCredit',+ 'converter' => 'INGDebitCredit','field' => 'amount-modifier',],'category-id' => [@@ -280,11 +280,11 @@ return ['converter' => 'Amount','field' => 'amount',],- 'amount_debet' => [+ 'amount_debit' => ['mappable' => false,'pre-process-map' => false,- 'converter' => 'AmountDebet',- 'field' => 'amount_debet',+ 'converter' => 'AmountDebit',+ 'field' => 'amount_debit',],'amount_credit' => ['mappable' => false,diff --git a/resources/lang/en_US/import.php b/resources/lang/en_US/import.phpindex 709c5baddd..6fffe9a597 100644--- a/resources/lang/en_US/import.php+++ b/resources/lang/en_US/import.php@@ -106,7 +106,7 @@ 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_debit' => 'Amount (debit column)','column_amount_credit' => 'Amount (credit column)','column_amount-comma-separated' => 'Amount (comma as decimal separator)','column_bill-id' => 'Bill ID (matching Firefly)',@@ -128,11 +128,11 @@ return ['column_opposing-id' => 'Opposing account ID (matching Firefly)','column_external-id' => 'External ID','column_opposing-name' => 'Opposing account (name)',- 'column_rabo-debet-credit' => 'Rabobank specific debet/credit indicator',- 'column_ing-debet-credit' => 'ING specific debet/credit indicator',+ 'column_rabo-debit-credit' => 'Rabobank specific debit/credit indicator',+ 'column_ing-debit-credit' => 'ING specific debit/credit indicator','column_sepa-ct-id' => 'SEPA Credit Transfer end-to-end ID','column_sepa-ct-op' => 'SEPA Credit Transfer opposing account',- 'column_sepa-db' => 'SEPA Direct Debet',+ 'column_sepa-db' => 'SEPA Direct Debit','column_tags-comma' => 'Tags (comma separated)','column_tags-space' => 'Tags (space separated)','column_account-number' => 'Asset account (account number)',