Add new bank specific fixes.

This commit is contained in:
James Cole
2015-07-06 20:21:55 +02:00
parent af13d1943f
commit c555e28988
13 changed files with 471 additions and 336 deletions

View File

@@ -37,6 +37,8 @@ class Importer
protected $roles;
/** @var int */
protected $rows = 0;
/** @var array */
protected $specifix;
/**
* @return array
@@ -69,9 +71,10 @@ class Importer
{
set_time_limit(0);
$this->map = $this->data->getMap();
$this->roles = $this->data->getRoles();
$this->mapped = $this->data->getMapped();
$this->map = $this->data->getMap();
$this->roles = $this->data->getRoles();
$this->mapped = $this->data->getMapped();
$this->specifix = $this->data->getSpecifix();
foreach ($this->data->getReader() as $index => $row) {
if ($this->parseRow($index)) {
@@ -174,8 +177,7 @@ class Importer
{
// do bank specific fixes (must be enabled but now all of them.
$set = Config::get('csv.specifix');
foreach ($set as $className) {
foreach ($this->getSpecifix() as $className) {
/** @var SpecifixInterface $specifix */
$specifix = App::make('FireflyIII\Helpers\Csv\Specifix\\' . $className);
$specifix->setData($data);
@@ -195,6 +197,14 @@ class Importer
return $data;
}
/**
* @return array
*/
public function getSpecifix()
{
return $this->specifix;
}
/**
* @param $data
*
@@ -304,4 +314,5 @@ class Importer
{
$this->data = $data;
}
}