{"action":"closed","issue":{"url":"https://api.github.com/repos/csingley/ofxtools/issues/4","labels_url":"https://api.github.com/repos/csingley/ofxtools/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/csingley/ofxtools/issues/4/comments","events_url":"https://api.github.com/repos/csingley/ofxtools/issues/4/events","html_url":"https://github.com/csingley/ofxtools/issues/4","id":98986087,"number":4,"title":" Error parsing TRNAMT (should also accept commas)","user":{"login":"turicas","id":186126,"avatar_url":"https://avatars.githubusercontent.com/u/186126?v=3","gravatar_id":"","url":"https://api.github.com/users/turicas","html_url":"https://github.com/turicas","followers_url":"https://api.github.com/users/turicas/followers","following_url":"https://api.github.com/users/turicas/following{/other_user}","gists_url":"https://api.github.com/users/turicas/gists{/gist_id}","starred_url":"https://api.github.com/users/turicas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turicas/subscriptions","organizations_url":"https://api.github.com/users/turicas/orgs","repos_url":"https://api.github.com/users/turicas/repos","events_url":"https://api.github.com/users/turicas/events{/privacy}","received_events_url":"https://api.github.com/users/turicas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-04T14:39:54Z","updated_at":"2015-08-28T19:51:58Z","closed_at":"2015-08-28T19:51:58Z","body":"Hello,\r\n\r\nI have an OFX file generated by a Brazilian bank (Santander) - here we use \",\" as the decimal separator and the OFX have mixed \",\" and \".\" as decimal separators on the `TRNAMT` values (probably this difference occurs based on which integration they have, like the debit card or ATM systems).\r\n\r\nHere is a sample:\r\n\r\n```\r\n<STMTTRN>\r\n    <TRNTYPE>OTHER\r\n    <DTPOSTED>20150706000000[-3:GMT]\r\n    <TRNAMT>            -12.80\r\n    <FITID>00451065\r\n    <CHECKNUM>00451065\r\n    <PAYEEID>0\r\n    <MEMO>DEBITO VISA ELECTRON BRASIL        05/07 CAFE ALBRECHT L\r\n</STMTTRN>\r\n<STMTTRN>\r\n    <TRNTYPE>OTHER\r\n    <DTPOSTED>20150706000000[-3:GMT]\r\n    <TRNAMT>           -200,00\r\n    <FITID>00239183\r\n    <CHECKNUM>00239183\r\n    <PAYEEID>0\r\n    <MEMO>SAQUE NO BANCO 24 HORAS\r\n</STMTTRN>\r\n```\r\n\r\nI thought it was an error on the file (so Santander should fix it), but looking into the OFX specification I found that it's actually supported:\r\n\r\n```\r\n3.2.5 Transaction Amount <TRNAMT>\r\nFormat: Amount\r\nOpen Financial Exchange uses <TRNAMT> in any request or response that reports the total amount of an individual transaction.\r\nUsage: Bank statement download, investment statement download, payments\r\n```\r\n\r\nAnd:\r\n\r\n```\r\nAmount: Amounts that do not represent whole numbers (for example, 540.32), must include a decimal point or comma to indicate the start of the fractional amount. Amounts should not include any punctuation separating thousands, millions, and so forth. The maximum value accepted depends on the client.\r\n```\r\n\r\nSo, the \"amount\" types should not be represented by `ofxtools.types.Decimal` because it does not support commas as decimal separators. We should create another type to handle this properly or modify the `ofxtools.types.Decimal` to accept commas.\r\n\r\n> Note: I had [the same error on the ofxparse library](https://github.com/jseutter/ofxparse/issues/83)."}}