Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inflow inverses when Outflow/Inflow used #33

Closed
iofjuupasli opened this issue Dec 28, 2021 · 1 comment
Closed

Inflow inverses when Outflow/Inflow used #33

iofjuupasli opened this issue Dec 28, 2021 · 1 comment

Comments

@iofjuupasli
Copy link
Contributor

if (outflow !== undefined || in_out_flag?.startsWith(outflow_indicator)) {
value = -value; // 420.69 ==> -420.69
}

Config:

import_from: "/home/iofjuupasli/Downloads"
search_subfolders: false

bank_transaction_files:
  # Repeat the following block for every account:
  - account_name: USD
    pattern: Transactions_*.csv
    parser: payoneer-parser
    ynab_account_id: 00000000-0000-0000-0000-000000000000
    ynab_budget_id: 00000000-0000-0000-0000-000000000000
    # ynab_flag_color: purple
    upload: false
    save_parsed_file: true
    delete_original_file: false

parsers:
  - name: payoneer-parser
    header_rows: 1
    footer_rows: 0
    delimiter: ","
    columns: [date, skip, skip, skip, payee, inflow, outflow]
    date_format: M/d/yyyy

upload_to_ynab:
  # This is the default. If you've set the 'upload' option on
  # a bank_transaction_file, that one will take precedence.
  upload_transactions: false
  ynab_token: ABC12345

# When you're done configuring, delete the next line:
configuration_done: true

Transaction file:

Transaction Date,Transaction Time,Time Zone,Transaction ID,Description,Credit Amount,Debit Amount,Currency,Transfer Amount,Transfer Amount Currency,Status,Running Balance,Additional Description,Store Name,Source,Target,Reference ID
12/09/2021,18:17:43,UTC,353553541,GBP to EUR - transfer between balances,582.27,,EUR,,,Completed,598.91,,,GBP balance,EUR balance,

Result:

amount,date,memo,payee_name
-582.27,2021-12-09T00:00:00.000Z,,GBP to EUR - transfer between balances

Expected result:

amount,date,memo,payee_name
- -582.27,2021-12-09T00:00:00.000Z,,GBP to EUR - transfer between balances
+ 582.27,2021-12-09T00:00:00.000Z,,GBP to EUR - transfer between balances
iofjuupasli added a commit to iofjuupasli/ynab-buddy that referenced this issue Dec 28, 2021
nielsmaerten added a commit to iofjuupasli/ynab-buddy that referenced this issue Dec 28, 2021
nielsmaerten added a commit to iofjuupasli/ynab-buddy that referenced this issue Dec 28, 2021
@nielsmaerten
Copy link
Owner

Thanks for the bugreport and the PR :)
I'm adding a unit test and a couple changes to #34. Can you check if those fix your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants