bnw / firefly-iii-fints-importer

Import financial transactions from you FinTS enabled bank into Firefly III.
GNU Affero General Public License v3.0
151 stars 23 forks source link

Fetch more data #26

Open totti4ever opened 3 years ago

totti4ever commented 3 years ago

I was wondering whether it just wasn't implemented because of time/need or because it is not possible.

bnw commented 3 years ago

I am missing e.g. the target account number.

The imported transactions should contain the iban of the opposite account, as long as it's an "iban transaction". Your bank might also list other type of transactions. If you have a transaction where the iban is not correctly set, could you share it?
To do so, add the line var_dump($transactions); to index.php at the end of STEP4_GET_IMPORT_DATA (line 226). If you then proceed to the step in the importer where it lists your transactions, at the bottom you will find a representation of all the fields that are provided by the api. If you think that any of those should be included in your firefly transactions, please let me know :)

Also, compared to MoneyMoney all information is upper case

The importer does not change the case. I'm not sure where it happens. It might be in the used library or it might be part of the finTS protocol. Unfortunately, there is nothing I can do about this.

totti4ever commented 3 years ago

Allright, after it took me quite a while that I won't find line 226 in the index.php of the csv importer, I managed to get the info :-o Plus, I added <pre> </pre> to prettify the dump a bit

 [1]=>
  object(Fhp\Model\StatementOfAccount\Transaction)#610 (14) {
    ["bookingDate":protected]=>
    object(DateTime)#611 (3) {
      ["date"]=>
      string(26) "2020-11-02 00:00:00.000000"
      ["timezone_type"]=>
      int(3)
      ["timezone"]=>
      string(3) "UTC"
    }
    ["valutaDate":protected]=>
    object(DateTime)#612 (3) {
      ["date"]=>
      string(26) "2020-11-02 00:00:00.000000"
      ["timezone_type"]=>
      int(3)
      ["timezone"]=>
      string(3) "UTC"
    }
    ["amount":protected]=>
    float(777.77)
    ["creditDebit":protected]=>
    string(5) "debit"
    ["bookingCode":protected]=>
    string(3) "820"
    ["bookingText":protected]=>
    string(0) ""
    ["description1":protected]=>
    string(88) "ÜBERTRAG / ÜBERWEISUNGDKB ACTIVEEND-TO-END-REF.:NICHT ANGEGEBENRef. WJ23927733826164/1"
    ["description2":protected]=>
    string(0) ""
    ["structuredDescription":protected]=>
    array(1) {
      ["SVWZ"]=>
      string(88) "ÜBERTRAG / ÜBERWEISUNGDKB ACTIVEEND-TO-END-REF.:NICHT ANGEGEBENRef. WJ23927733826164/1"
    }
    ["bankCode":protected]=>
    string(11) "target-BIC"
    ["accountNumber":protected]=>
    string(22) "target-IBAN"
    ["name":protected]=>
    string(14) "target-NAME"
    ["booked":protected]=>
    bool(true)
    ["pn":protected]=>
    int(0)
  }

So, the information is there, but still the transaction is not booked against the target asset account but against a deposit account by the given name.

P.S.: Regarding the upper-case: interesting, is MoneyMoney doing Webscraping than rather than finTS?