mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Make sure new CSV reader is compatible with specifics #1015
This commit is contained in:
@@ -58,7 +58,7 @@ class AbnAmroDescription implements SpecificInterface
|
|||||||
*/
|
*/
|
||||||
public function run(array $row): array
|
public function run(array $row): array
|
||||||
{
|
{
|
||||||
$this->row = $row;
|
$this->row = array_values($row);
|
||||||
|
|
||||||
if (!isset($row[7])) {
|
if (!isset($row[7])) {
|
||||||
return $row;
|
return $row;
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class PresidentsChoice implements SpecificInterface
|
|||||||
*/
|
*/
|
||||||
public function run(array $row): array
|
public function run(array $row): array
|
||||||
{
|
{
|
||||||
|
$row = array_values($row);
|
||||||
// first, if column 2 is empty and 3 is not, do nothing.
|
// first, if column 2 is empty and 3 is not, do nothing.
|
||||||
// if column 3 is empty and column 2 is not, move amount to column 3, *-1
|
// if column 3 is empty and column 2 is not, move amount to column 3, *-1
|
||||||
if (isset($row[3]) && 0 === strlen($row[3])) {
|
if (isset($row[3]) && 0 === strlen($row[3])) {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ class RabobankDescription implements SpecificInterface
|
|||||||
*/
|
*/
|
||||||
public function run(array $row): array
|
public function run(array $row): array
|
||||||
{
|
{
|
||||||
|
$row = array_values($row);
|
||||||
Log::debug(sprintf('Now in RabobankSpecific::run(). Row has %d columns', count($row)));
|
Log::debug(sprintf('Now in RabobankSpecific::run(). Row has %d columns', count($row)));
|
||||||
$oppositeAccount = isset($row[5]) ? trim($row[5]) : '';
|
$oppositeAccount = isset($row[5]) ? trim($row[5]) : '';
|
||||||
$oppositeName = isset($row[6]) ? trim($row[6]) : '';
|
$oppositeName = isset($row[6]) ? trim($row[6]) : '';
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class SnsDescription implements SpecificInterface
|
|||||||
*/
|
*/
|
||||||
public function run(array $row): array
|
public function run(array $row): array
|
||||||
{
|
{
|
||||||
|
$row = array_values($row);
|
||||||
$row[17] = ltrim($row[17], "'");
|
$row[17] = ltrim($row[17], "'");
|
||||||
$row[17] = rtrim($row[17], "'");
|
$row[17] = rtrim($row[17], "'");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user