display 'category' in priority, 'type' otherwise
This commit is contained in:
parent
0b9322eca5
commit
00c784e331
1 changed files with 7 additions and 7 deletions
|
|
@ -65,16 +65,16 @@ class TransactionsFormatter(IFormatter):
|
|||
|
||||
result = u''
|
||||
if self.count == 1:
|
||||
result += ' Date Type Label Amount \n'
|
||||
result += ' Date Category Label Amount \n'
|
||||
result += '------------+------------+---------------------------------------------------+-----------\n'
|
||||
|
||||
try:
|
||||
_type = self.TYPES[item['type']]
|
||||
except IndexError:
|
||||
_type = ''
|
||||
|
||||
if not _type and item['category']:
|
||||
if item['category']:
|
||||
_type = item['category']
|
||||
else:
|
||||
try:
|
||||
_type = self.TYPES[item['type']]
|
||||
except IndexError:
|
||||
_type = ''
|
||||
|
||||
label = item['label']
|
||||
if not label:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue