Make sure each source of transactions stores where it's from.

This commit is contained in:
James Cole
2018-09-05 19:45:59 +02:00
parent 2afbef63aa
commit b1cc17d96e
10 changed files with 16 additions and 4 deletions

View File

@@ -235,7 +235,7 @@ class ImportableConverter
'payment_date' => $this->convertDateValue($importable->meta['date-payment'] ?? null),
'invoice_date' => $this->convertDateValue($importable->meta['date-invoice'] ?? null),
'external_id' => $importable->externalId,
'original-source' => $importable->meta['original-source'] ?? null,
// journal data:
'description' => $importable->description,
'piggy_bank_id' => null,

View File

@@ -201,6 +201,12 @@ class MappingConverger
Log::debug('Column skipped because value is empty.');
}
}
// add a special column value for the "source"
$columnValue = new ColumnValue;
$columnValue->setValue(sprintf('csv-import-v%s', config('firefly.version')));
$columnValue->setMappedValue(0);
$columnValue->setRole('original-source');
$return[] = $columnValue;
return $return;
}