Skip to content

Firefly III: a personal finances manager

Add account number to export #107

James Colece09da084c97
diff --git a/app/Export/Entry.php b/app/Export/Entry.php
index 40f2d84f46..3580cc6960 100644
--- a/app/Export/Entry.php
+++ b/app/Export/Entry.php
@@ -58,6 +58,7 @@ class Entry
public $fromAccountId;
/** @var string */
public $fromAccountName;
+ public $fromAccountNumber;
/** @var string */
public $fromAccountType;
/** @var string */
@@ -66,6 +67,7 @@ class Entry
public $toAccountId;
/** @var string */
public $toAccountName;
+ public $toAccountNumber;
/** @var string */
public $toAccountType;
@@ -107,6 +109,8 @@ class Entry
$entry->setFromAccountName($sourceAccount->name);
$entry->setFromAccountIban($sourceAccount->iban);
$entry->setFromAccountType($sourceAccount->accountType->type);
+ $entry->setFromAccountNumber($sourceAccount->getMeta('accountNumber'));
+
/** @var Account $destination */
$destination = TransactionJournal::destinationAccount($journal);
@@ -114,6 +118,7 @@ class Entry
$entry->setToAccountName($destination->name);
$entry->setToAccountIban($destination->iban);
$entry->setToAccountType($destination->accountType->type);
+ $entry->setToAccountNumber($destination->getMeta('accountNumber'));
return $entry;
@@ -339,6 +344,22 @@ class Entry
$this->fromAccountName = $fromAccountName;
}
+ /**
+ * @return mixed
+ */
+ public function getFromAccountNumber()
+ {
+ return $this->fromAccountNumber;
+ }
+
+ /**
+ * @param mixed $fromAccountNumber
+ */
+ public function setFromAccountNumber($fromAccountNumber)
+ {
+ $this->fromAccountNumber = $fromAccountNumber;
+ }
+
/**
* @return string
*/
@@ -403,6 +424,22 @@ class Entry
$this->toAccountName = $toAccountName;
}
+ /**
+ * @return mixed
+ */
+ public function getToAccountNumber()
+ {
+ return $this->toAccountNumber;
+ }
+
+ /**
+ * @param mixed $toAccountNumber
+ */
+ public function setToAccountNumber($toAccountNumber)
+ {
+ $this->toAccountNumber = $toAccountNumber;
+ }
+
/**
* @return string
*/