Commodity column in default CSV format should match the displayed amount

If one uses --exchange to force CSV display amounts into a particular
currency, then the commodity output column should match that currency.

Without this patch, the commodity column contains the original
commodity, not the commodity for the exported amount.
This commit is contained in:
Steve Purcell 2014-01-06 17:22:43 +00:00
parent bde5e69c9a
commit d7742cd654
2 changed files with 3 additions and 3 deletions

View file

@ -5833,7 +5833,7 @@ Strings}). The default is:
"%(quoted(code))," "%(quoted(code)),"
"%(quoted(payee))," "%(quoted(payee)),"
"%(quoted(display_account))," "%(quoted(display_account)),"
"%(quoted(commodity))," "%(quoted(commodity(scrub(display_amount)))),"
"%(quoted(quantity(scrub(display_amount))))," "%(quoted(quantity(scrub(display_amount)))),"
"%(quoted(cleared ? \"*\" : (pending ? \"!\" : \"\")))," "%(quoted(cleared ? \"*\" : (pending ? \"!\" : \"\"))),"
"%(quoted(join(note | xact.note)))\n" "%(quoted(join(note | xact.note)))\n"
@ -6780,7 +6780,7 @@ Set the format for @command{csv} reports. The default is:
%(quoted(code)), %(quoted(code)),
%(quoted(payee)), %(quoted(payee)),
%(quoted(display_account)), %(quoted(display_account)),
%(quoted(commodity)), %(quoted(commodity(scrub(display_amount)))),
%(quoted(quantity(scrub(display_amount)))), %(quoted(quantity(scrub(display_amount)))),
%(quoted(cleared ? \"*\" : (pending ? \"!\" : \"\"))), %(quoted(cleared ? \"*\" : (pending ? \"!\" : \"\"))),
%(quoted(join(note | xact.note)))\n" %(quoted(join(note | xact.note)))\n"

View file

@ -521,7 +521,7 @@ public:
"%(quoted(code))," "%(quoted(code)),"
"%(quoted(payee))," "%(quoted(payee)),"
"%(quoted(display_account))," "%(quoted(display_account)),"
"%(quoted(commodity))," "%(quoted(commodity(scrub(display_amount)))),"
"%(quoted(quantity(scrub(display_amount))))," "%(quoted(quantity(scrub(display_amount)))),"
"%(quoted(cleared ? \"*\" : (pending ? \"!\" : \"\")))," "%(quoted(cleared ? \"*\" : (pending ? \"!\" : \"\"))),"
"%(quoted(join(note | xact.note)))\n"); "%(quoted(join(note | xact.note)))\n");