cantino / reckon

Flexibly import bank account CSV files into Ledger for command-line accounting
http://blog.andrewcantino.com/blog/2013/02/16/command-line-accounting-with-ledger-and-reckon/
MIT License
414 stars 46 forks source link

Debit/Credit Columns from SunTrust #42

Closed ghost closed 9 years ago

ghost commented 9 years ago

This is from SunTrust. It has separate Debit and Credit columns which are not signed. Reckon will pick up either the Debit or Credit column, but I can't get it to recognize that Debit is checks and Credit is deposits.

Date,Check Number,Description,Debit,Credit,Running Balance 11/03/2014,0, AMEX EPayment ACH PMT A26,100.00,0,500.00 11/07/2014,0, AcadiaHealthcare PAYROLL ,0,100.00,600.00

reckon -f mwe.csv -v -p --contains-header --date-format '%d/%m/%Y' --ignore-columns 2,6

I didn't find a high-likelyhood money column, but I'm taking my best guess with column 4. +------------+----------+-----------------------------------+ | Date | Amount | Description | +------------+----------+-----------------------------------+ | 2014/03/11 | $0.00 | AMEX EPayment ACH PMT A26; 100.00 | | 2014/07/11 | $100.00 | AcadiaHealthcare PAYROLL; 0 | +------------+----------+-----------------------------------+

BlackEdder commented 9 years ago

I thought this should work. How large is the csv file though, if it is only two rows then reckon does not have enough data to figure it out.

Could you attach an example csv file?

ghost commented 9 years ago

Actual file is 38 rows. SunTrust won't download more than 90 days at a time.

BlackEdder commented 9 years ago

That should be plenty. Could you attach/copy and paste the (anonimized) csv file?

ghost commented 9 years ago

Attaching to the email didn't seem to work and I don't see any way to attach here in github, so I'm pasting the example file below. When I run this through ledger, it detects the debit column and shows those amounts in the Amount column, but for rows with a credit amount, it shows a zero in the Amount column.

Date,Check Number,Description,Debit,Credit,Running Balance 11/01/2014,0, Deposit,0,500.00,500.00 11/02/2014,101,Check,100.00,0,400.00 11/03/2014,102,Check,100.00,0,300.00 11/04/2014,103,Check,100.00,0,200.00 11/05/2014,104,Check,100.00,0,100.00 11/06/2014,105,Check,100.00,0,0.00 11/07/2014,0, Deposit,0,700.00,700.00 11/08/2014,106,Check,100.00,0,600.00 11/09/2014,107,Check,100.00,0,500.00 11/10/2014,108,Check,100.00,0,400.00 11/11/2014,109,Check,100.00,0,300.00 11/12/2014,110,Check,100.00,0,200.00 11/13/2014,111,Check,100.00,0,100.00 11/14/2014,0, Deposit,0,700.00,800.00 11/15/2014,112,Check,100.00,0,700.00 11/16/2014,113,Check,100.00,0,600.00 11/17/2014,114,Check,100.00,0,500.00 11/18/2014,115,Check,100.00,0,400.00 11/19/2014,116,Check,100.00,0,300.00 11/20/2014,117,Check,100.00,0,200.00 11/21/2014,0, Deposit,0,700.00,900.00 11/22/2014,118,Check,100.00,0,800.00 11/23/2014,119,Check,100.00,0,700.00 11/24/2014,120,Check,100.00,0,600.00 11/25/2014,121,Check,100.00,0,500.00 11/26/2014,122,Check,100.00,0,400.00 11/27/2014,123,Check,100.00,0,300.00 11/28/2014,0, Deposit,0,700.00,1000.00 11/29/2014,124,Check,100.00,0,900.00 11/30/2014,125,Check,100.00,0,800.00 12/01/2014,126,Check,100.00,0,700.00 12/02/2014,127,Check,100.00,0,600.00 12/03/2014,128,Check,100.00,0,500.00 12/04/2014,129,Check,100.00,0,400.00 12/05/2014,0, Deposit,0,500.00,900.00 12/06/2014,130,Check,100.00,0,800.00 12/07/2014,131,Check,100.00,0,700.00

cantino commented 9 years ago

Great! Pushing an update to the gem now.