[GNC] CSV Importer - Debit vs Credit
Paul Kroitor
paul at kroitor.ca
Thu Jul 4 15:40:28 EDT 2024
Yes, I see.
Interestingly, I realize I can use a simple search and replace for this.
Here are a couple of lines from the CSV file:
"","2024-06-26","Credit Memo","Credit","4.00","xxxx.xx"
"","2024-06-26","Service Charge","Debit","7.95","xxxx.xx"
(final field -- the new balance -- obscured for privacy)
All I need to do is replace 'Debit","' with 'Debit","-' everywhere and all
the debit amounts will have '-' prepended.
NB: since " is used in the actual data, I'm using ' above as a delimiter and
" as a character in the string.
-----Original Message-----
From: Kalpesh Patel <kalpesh.patel at usa.net>
Sent: Thursday, July 4, 2024 1:20 PM
To: 'Paul Kroitor' <paul at kroitor.ca>; gnucash-user at gnucash.org
Subject: RE: [GNC] CSV Importer - Debit vs Credit
As an after-thought, put minus sign in front of lines with credits and
payments to minimize number of edits, and then adjust your amount column as
withdrawal (or credit based upon your books settings). The minus sign will
move the amount over to "deposit" side. Once you are satisfied how it
imports, you can save that as a template to use it next time in the future
so you don't have to figure it out again.
-----Original Message-----
From: Kalpesh Patel <kalpesh.patel at usa.net>
Sent: Thursday, July 04, 2024 12:59 PM
To: 'Paul Kroitor' <paul at kroitor.ca>; 'gnucash-user at gnucash.org'
<gnucash-user at gnucash.org>
Subject: RE: [GNC] CSV Importer - Debit vs Credit
Sadly, you will have to do some pre-processing before import. Put minus sign
in front of debits or credits, depending upon how the book is setup. GNUCash
does not have a conditional way of importing data in CSV by looking at a
column. CSV files can be edited in any text editor.
-----Original Message-----
From: Paul Kroitor <paul at kroitor.ca>
Sent: Thursday, July 04, 2024 11:30 AM
To: gnucash-user at gnucash.org
Subject: [GNC] CSV Importer - Debit vs Credit
I'm sure this has been asked in a dozen different variations over the years
but I'm now faced with the issue myself since I now need to use CSV for
downloading (I hate TD Bank, who have removed the OFX download option). I
can't immediately find any old messages describing this particular issue, so
I thought I'd just ask.
Simplified, TD Bank CSV downloads only basically have four fields:
* Date
* Description
* "Debit" or "Credit"
* Amount (always positive)
Import works fine, except that I can't see any way (short of pre-editing the
file) to get the CSV importer to understand that the amount field goes in a
different column (D or C) depending on a different field's value. This must
be fairly common - am I just blind?
More information about the gnucash-user
mailing list