{"action":"created","issue":{"url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/934","repository_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex","labels_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/934/labels{/name}","comments_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/934/comments","events_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/934/events","html_url":"https://github.com/moneymanagerex/moneymanagerex/issues/934","id":184685240,"number":934,"title":"Withdrawals not imported from CSV","user":{"login":"jucor","id":660037,"avatar_url":"https://avatars.githubusercontent.com/u/660037?v=3","gravatar_id":"","url":"https://api.github.com/users/jucor","html_url":"https://github.com/jucor","followers_url":"https://api.github.com/users/jucor/followers","following_url":"https://api.github.com/users/jucor/following{/other_user}","gists_url":"https://api.github.com/users/jucor/gists{/gist_id}","starred_url":"https://api.github.com/users/jucor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jucor/subscriptions","organizations_url":"https://api.github.com/users/jucor/orgs","repos_url":"https://api.github.com/users/jucor/repos","events_url":"https://api.github.com/users/jucor/events{/privacy}","received_events_url":"https://api.github.com/users/jucor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-23T11:37:14Z","updated_at":"2016-10-23T13:38:32Z","closed_at":null,"body":"Hi MMX team\r\n\r\nVery attracted by MMEX for its very customisable reporting, I found my first bug when importing my first CSV file with custom format:  only the Deposit lines are taken into account, Withdraw lines are discarded with error message \".\r\n\r\nCould you please have a look? Thanks!\r\n\r\n### Version used \r\n\r\n* MMEX 1.2.7\r\n* Mac OSX 10.11.3\r\n\r\n### Steps to reproduce\r\n\r\n1. Create a fresh new database\r\n* Single account with GBP currency\r\n* Create a CSV file with the following two lines (minimal example, anything bigger will exhibit the same problem):\r\n\r\n        2016-06-29,PaymentOut,10.0,0.0\r\n        2016-06-30,PaymentIn,0.0,10.0\r\n* Import with `Date Format` set to `YYYY-MM-DD` and the following fields list:\r\na. Date\r\nb. Payee\r\nc. Withdrawal\r\nd. Deposit\r\n* Click `Import`.\r\n\r\n### Expected result\r\n\r\n* Two new lines in the account:\r\n1. one for the PaymentOut with a Withdrawal of 10.0\r\n2. one for the PaymentIn with a Deposit of 10.0\r\n\r\n### Actual result\r\n\r\n* Only one line in the account:\r\n1. PaymentIn with a Deposit of 10.0\r\n\r\n### Log\r\n* Logfile says:\r\n\r\n```text\r\nLine: 1 One of the following fields: Date, Amount, Type is missing, skipping\r\nLine : 2 imported OK.\r\n```\r\n\r\n* Screenshot after import:\r\n<img width=\"1017\" alt=\"screen shot 2016-10-23 at 12 26 18\" src=\"https://cloud.githubusercontent.com/assets/660037/19625863/56485e06-991c-11e6-90a2-dbdea407aa51.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/comments/255589087","html_url":"https://github.com/moneymanagerex/moneymanagerex/issues/934#issuecomment-255589087","issue_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/934","id":255589087,"user":{"login":"jucor","id":660037,"avatar_url":"https://avatars.githubusercontent.com/u/660037?v=3","gravatar_id":"","url":"https://api.github.com/users/jucor","html_url":"https://github.com/jucor","followers_url":"https://api.github.com/users/jucor/followers","following_url":"https://api.github.com/users/jucor/following{/other_user}","gists_url":"https://api.github.com/users/jucor/gists{/gist_id}","starred_url":"https://api.github.com/users/jucor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jucor/subscriptions","organizations_url":"https://api.github.com/users/jucor/orgs","repos_url":"https://api.github.com/users/jucor/repos","events_url":"https://api.github.com/users/jucor/events{/privacy}","received_events_url":"https://api.github.com/users/jucor/received_events","type":"User","site_admin":false},"created_at":"2016-10-23T13:38:32Z","updated_at":"2016-10-23T13:38:32Z","body":"Ah! After more experimenting, it turns out that it is fails on lines whose amount is in the *last* field! So if you put the Withdrawal field first (in both the field list and the CSV), you'll only import the Withdrawal line. Wicked! \r\nI'm checking the parser."}}
{"actor":{"display_login":"jucor"}}