Closed afh closed 12 years ago
Hi, I understand the usefulness of the proposed change. BUT I do not agree on the way it is implemented. Here is my alternative proposition : addon (I still prefer "field") is implemented to save csv field as names. Then why not using the template like:
{date} {cleared_character} {payee}, {addon_whatever1}, {addon_whatever2}, ; MD5Sum: {md5sum} ; CSV: {csv} {debit_account:<60} {debit_currency} {debit} {credit_account:<60} {credit_currency} {credit}
I also do not agree because ",\s" is hardcoded, and also because comma is certainly a delimiter for the 1 billion English native speakers, but it is decimal separator for 5 billion people.
I think you misunderstand the change, it's simply to make the description coming from the csv file be a concatenation of a number of fields from the csv rather than one field.
Thanks for merging.
I may have misunderstood, but I still have not understood. Why the solution I proposed (that is concatenating the fields) is not giving the same results ? And this without code modification.
@thdox: The changes affect how icsv2ledger does its mapping by helping to distinguish transactions that may look similar if only one CSV field is used for mapping.
Given the following sample CSV
"Date","Effective Date","Transactiontext","Payee","Purpose","Account","BIN","Amount",
25.10.2012,25.10.2012,online banking,Acme Inc.,Down Payment,1234567890,12312312,100.00
Without the above changes icsv2leger uses only one field for the mapping. In this case we could
configure icsv2ledger to use the Payee desc=4
or the Purpose desc=5
field, so only
Acme Inc.
or Down Payment
would be used in the mapping file.
With the above changes I can configure icsv2ledger concatenate any number of fields for mapping
use, e.g. Payee and Purpose desc=4,5
which would result in the following string ending up
in the mapping file Amce Inc. Down Payment
.
Hope this illustrates my intent and use, the changes have already proven very useful for me.
Perfect explanation with the example. Thanks. I know understand how helpful it is. What I had not understood was the relation with the mapping. I was believing it was only for ledger template.
Glad that the explanation cleared things up.
Some banks issue an account statement that has a payee and a purpose field (see example translated from German below), which make a more precise desc for transaction mapping.
These changes allow the desc configuration in the
~/.icsv2legerrc
to be a comma separated list of csv column indices which will be concatenated to form a more precise and unique desc used for mapping.Example bank statement CSV header with two fields relevant for desc.
"Date","Effective Date","Transactiontext","Payee","Purpose","Account","BIN","Amount",