mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix some spelling errors.
This commit is contained in:
parent
9ede6755c5
commit
e21e339cb0
@ -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 Collection $accounts
|
||||||
* @param Carbon $start
|
* @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 $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
@ -102,7 +102,7 @@ class HomeController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function displayDebug(Request $request)
|
public function displayDebug(Request $request)
|
||||||
{
|
{
|
||||||
$phpVersion = PHP_VERSION;
|
$phpVersion = str_replace('~','\~',PHP_VERSION);
|
||||||
$phpOs = php_uname();
|
$phpOs = php_uname();
|
||||||
$interface = PHP_SAPI;
|
$interface = PHP_SAPI;
|
||||||
$now = Carbon::create()->format('Y-m-d H:i:s e');
|
$now = Carbon::create()->format('Y-m-d H:i:s e');
|
||||||
|
@ -25,7 +25,7 @@ namespace FireflyIII\Import\Converter;
|
|||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class RabobankDebetCredit.
|
* Class Amount.
|
||||||
*/
|
*/
|
||||||
class Amount implements ConverterInterface
|
class Amount implements ConverterInterface
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* AmountDebet.php
|
* AmountDebit.php
|
||||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III.
|
* This file is part of Firefly III.
|
||||||
@ -23,9 +23,9 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Import\Converter;
|
namespace FireflyIII\Import\Converter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AmountDebet
|
* Class AmountDebit
|
||||||
*/
|
*/
|
||||||
class AmountDebet implements ConverterInterface
|
class AmountDebit implements ConverterInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param $value
|
* @param $value
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* INGDebetCredit.php
|
* INGDebitCredit.php
|
||||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III.
|
* This file is part of Firefly III.
|
||||||
@ -25,9 +25,9 @@ namespace FireflyIII\Import\Converter;
|
|||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class INGDebetCredit.
|
* Class INGDebitCredit.
|
||||||
*/
|
*/
|
||||||
class INGDebetCredit implements ConverterInterface
|
class INGDebitCredit implements ConverterInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param $value
|
* @param $value
|
||||||
@ -36,7 +36,7 @@ class INGDebetCredit implements ConverterInterface
|
|||||||
*/
|
*/
|
||||||
public function convert($value)
|
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) {
|
if ('Af' === $value) {
|
||||||
Log::debug('Return -1');
|
Log::debug('Return -1');
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* RabobankDebetCredit.php
|
* RabobankDebitCredit.php
|
||||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III.
|
* This file is part of Firefly III.
|
||||||
@ -25,9 +25,9 @@ namespace FireflyIII\Import\Converter;
|
|||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class RabobankDebetCredit.
|
* Class RabobankDebitCredit.
|
||||||
*/
|
*/
|
||||||
class RabobankDebetCredit implements ConverterInterface
|
class RabobankDebitCredit implements ConverterInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param $value
|
* @param $value
|
@ -63,7 +63,7 @@ class ImportJournal
|
|||||||
/** @var array */
|
/** @var array */
|
||||||
private $amountCredit;
|
private $amountCredit;
|
||||||
/** @var array */
|
/** @var array */
|
||||||
private $amountDebet;
|
private $amountDebit;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $convertedAmount = null;
|
private $convertedAmount = null;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -105,7 +105,7 @@ class ImportJournal
|
|||||||
{
|
{
|
||||||
Log::debug('Now in getAmount()');
|
Log::debug('Now in getAmount()');
|
||||||
Log::debug(sprintf('amount is %s', var_export($this->amount, true)));
|
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)));
|
Log::debug(sprintf('credit amount is %s', var_export($this->amountCredit, true)));
|
||||||
|
|
||||||
if (null === $this->convertedAmount) {
|
if (null === $this->convertedAmount) {
|
||||||
@ -188,8 +188,8 @@ class ImportJournal
|
|||||||
case 'amount':
|
case 'amount':
|
||||||
$this->amount = $array;
|
$this->amount = $array;
|
||||||
break;
|
break;
|
||||||
case 'amount_debet':
|
case 'amount_debit':
|
||||||
$this->amountDebet = $array;
|
$this->amountDebit = $array;
|
||||||
break;
|
break;
|
||||||
case 'amount_credit':
|
case 'amount_credit':
|
||||||
$this->amountCredit = $array;
|
$this->amountCredit = $array;
|
||||||
@ -250,8 +250,8 @@ class ImportJournal
|
|||||||
break;
|
break;
|
||||||
case '_ignore':
|
case '_ignore':
|
||||||
break;
|
break;
|
||||||
case 'ing-debet-credit':
|
case 'ing-debit-credit':
|
||||||
case 'rabo-debet-credit':
|
case 'rabo-debit-credit':
|
||||||
$this->addToModifier($array);
|
$this->addToModifier($array);
|
||||||
break;
|
break;
|
||||||
case 'opposing-iban':
|
case 'opposing-iban':
|
||||||
@ -284,7 +284,7 @@ class ImportJournal
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If convertedAmount is NULL, this method will try to calculate the correct amount.
|
* 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
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
@ -332,13 +332,13 @@ class ImportJournal
|
|||||||
$converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amount['role'])));
|
$converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amount['role'])));
|
||||||
$info = $this->amount;
|
$info = $this->amount;
|
||||||
}
|
}
|
||||||
if (!is_null($this->amountDebet)) {
|
if (!is_null($this->amountDebit)) {
|
||||||
Log::debug('Amount DEBET value is not NULL, assume this is the correct value (overrules Amount).');
|
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->amountDebet['role'])));
|
$converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amountDebit['role'])));
|
||||||
$info = $this->amountDebet;
|
$info = $this->amountDebit;
|
||||||
}
|
}
|
||||||
if (!is_null($this->amountCredit)) {
|
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'])));
|
$converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amountCredit['role'])));
|
||||||
$info = $this->amountCredit;
|
$info = $this->amountCredit;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ use Log;
|
|||||||
class Initial implements ConfigurationInterface
|
class Initial implements ConfigurationInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var
|
* @var ImportJob
|
||||||
*/
|
*/
|
||||||
private $job;
|
private $job;
|
||||||
|
|
||||||
@ -53,6 +53,11 @@ class Initial implements ConfigurationInterface
|
|||||||
'tab' => trans('form.csv_tab'),
|
'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 = [];
|
$specifics = [];
|
||||||
|
|
||||||
// collect specifics.
|
// collect specifics.
|
||||||
@ -68,6 +73,7 @@ class Initial implements ConfigurationInterface
|
|||||||
'specifix' => [],
|
'specifix' => [],
|
||||||
'delimiters' => $delimiters,
|
'delimiters' => $delimiters,
|
||||||
'specifics' => $specifics,
|
'specifics' => $specifics,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
@ -55,7 +55,6 @@ class Roles implements ConfigurationInterface
|
|||||||
{
|
{
|
||||||
$config = $this->job->configuration;
|
$config = $this->job->configuration;
|
||||||
$content = $this->job->uploadFileContents();
|
$content = $this->job->uploadFileContents();
|
||||||
$config['has-headers'] = true;
|
|
||||||
$headers = [];
|
$headers = [];
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
// create CSV reader.
|
// create CSV reader.
|
||||||
@ -272,7 +271,7 @@ class Roles implements ConfigurationInterface
|
|||||||
if ('_ignore' !== $role) {
|
if ('_ignore' !== $role) {
|
||||||
++$assigned;
|
++$assigned;
|
||||||
}
|
}
|
||||||
if (in_array($role, ['amount', 'amount_credit', 'amount_debet'])) {
|
if (in_array($role, ['amount', 'amount_credit', 'amount_debit'])) {
|
||||||
$hasAmount = true;
|
$hasAmount = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,16 +175,16 @@ return [
|
|||||||
'field' => 'budget',
|
'field' => 'budget',
|
||||||
'mapper' => 'Budgets',
|
'mapper' => 'Budgets',
|
||||||
],
|
],
|
||||||
'rabo-debet-credit' => [
|
'rabo-debit-credit' => [
|
||||||
'mappable' => false,
|
'mappable' => false,
|
||||||
'pre-process-map' => false,
|
'pre-process-map' => false,
|
||||||
'converter' => 'RabobankDebetCredit',
|
'converter' => 'RabobankDebitCredit',
|
||||||
'field' => 'amount-modifier',
|
'field' => 'amount-modifier',
|
||||||
],
|
],
|
||||||
'ing-debet-credit' => [
|
'ing-debit-credit' => [
|
||||||
'mappable' => false,
|
'mappable' => false,
|
||||||
'pre-process-map' => false,
|
'pre-process-map' => false,
|
||||||
'converter' => 'INGDebetCredit',
|
'converter' => 'INGDebitCredit',
|
||||||
'field' => 'amount-modifier',
|
'field' => 'amount-modifier',
|
||||||
],
|
],
|
||||||
'category-id' => [
|
'category-id' => [
|
||||||
@ -280,11 +280,11 @@ return [
|
|||||||
'converter' => 'Amount',
|
'converter' => 'Amount',
|
||||||
'field' => 'amount',
|
'field' => 'amount',
|
||||||
],
|
],
|
||||||
'amount_debet' => [
|
'amount_debit' => [
|
||||||
'mappable' => false,
|
'mappable' => false,
|
||||||
'pre-process-map' => false,
|
'pre-process-map' => false,
|
||||||
'converter' => 'AmountDebet',
|
'converter' => 'AmountDebit',
|
||||||
'field' => 'amount_debet',
|
'field' => 'amount_debit',
|
||||||
],
|
],
|
||||||
'amount_credit' => [
|
'amount_credit' => [
|
||||||
'mappable' => false,
|
'mappable' => false,
|
||||||
|
@ -106,7 +106,7 @@ return [
|
|||||||
'column_account-id' => 'Asset account ID (matching Firefly)',
|
'column_account-id' => 'Asset account ID (matching Firefly)',
|
||||||
'column_account-name' => 'Asset account (name)',
|
'column_account-name' => 'Asset account (name)',
|
||||||
'column_amount' => 'Amount',
|
'column_amount' => 'Amount',
|
||||||
'column_amount_debet' => 'Amount (debet column)',
|
'column_amount_debit' => 'Amount (debit column)',
|
||||||
'column_amount_credit' => 'Amount (credit column)',
|
'column_amount_credit' => 'Amount (credit column)',
|
||||||
'column_amount-comma-separated' => 'Amount (comma as decimal separator)',
|
'column_amount-comma-separated' => 'Amount (comma as decimal separator)',
|
||||||
'column_bill-id' => 'Bill ID (matching Firefly)',
|
'column_bill-id' => 'Bill ID (matching Firefly)',
|
||||||
@ -128,11 +128,11 @@ return [
|
|||||||
'column_opposing-id' => 'Opposing account ID (matching Firefly)',
|
'column_opposing-id' => 'Opposing account ID (matching Firefly)',
|
||||||
'column_external-id' => 'External ID',
|
'column_external-id' => 'External ID',
|
||||||
'column_opposing-name' => 'Opposing account (name)',
|
'column_opposing-name' => 'Opposing account (name)',
|
||||||
'column_rabo-debet-credit' => 'Rabobank specific debet/credit indicator',
|
'column_rabo-debit-credit' => 'Rabobank specific debit/credit indicator',
|
||||||
'column_ing-debet-credit' => 'ING specific debet/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-id' => 'SEPA Credit Transfer end-to-end ID',
|
||||||
'column_sepa-ct-op' => 'SEPA Credit Transfer opposing account',
|
'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-comma' => 'Tags (comma separated)',
|
||||||
'column_tags-space' => 'Tags (space separated)',
|
'column_tags-space' => 'Tags (space separated)',
|
||||||
'column_account-number' => 'Asset account (account number)',
|
'column_account-number' => 'Asset account (account number)',
|
||||||
|
Loading…
Reference in New Issue
Block a user