More code for new importer

This commit is contained in:
James Cole
2016-08-12 09:27:09 +02:00
parent 2111873bcf
commit 28962007c1
11 changed files with 146 additions and 86 deletions

View File

@@ -30,7 +30,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
*/
public function convert($value): TransactionCurrency
{
Log::debug('Going to convert ', ['value' => $value]);
Log::debug('Going to convert currency code', ['value' => $value]);
/** @var CurrencyRepositoryInterface $repository */
$repository = app(CurrencyRepositoryInterface::class);

View File

@@ -32,7 +32,7 @@ class Date extends BasicConverter implements ConverterInterface
*/
public function convert($value): Carbon
{
Log::debug('Going to convert ', ['value' => $value]);
Log::debug('Going to convert date', ['value' => $value]);
Log::debug('Format: ', ['format' => $this->config['date-format']]);
try {
$date = Carbon::createFromFormat($this->config['date-format'], $value);

View File

@@ -29,7 +29,7 @@ class INGDebetCredit extends BasicConverter implements ConverterInterface
*/
public function convert($value)
{
Log::debug('Going to convert ', ['value' => $value]);
Log::debug('Going to convert ing debet credit', ['value' => $value]);
if ($value === 'Af') {
Log::debug('Return -1');

View File

@@ -31,7 +31,7 @@ class OpposingAccountIban extends BasicConverter implements ConverterInterface
public function convert($value): Account
{
$value = trim($value);
Log::debug('Going to convert ', ['value' => $value]);
Log::debug('Going to convert opposing IBAN', ['value' => $value]);
if (strlen($value) === 0) {
$this->setCertainty(0);

View File

@@ -31,10 +31,11 @@ class OpposingAccountName extends BasicConverter implements ConverterInterface
public function convert($value): Account
{
$value = trim($value);
Log::debug('Going to convert ', ['value' => $value]);
Log::debug('Going to convert opposing account name', ['value' => $value]);
if (strlen($value) === 0) {
$value = '(empty account name)';
$this->setCertainty(0);
return new Account;
}
/** @var AccountCrudInterface $repository */