display the 'N' entry only when available
This commit is contained in:
parent
c450ffde06
commit
51f8efc41d
2 changed files with 3 additions and 2 deletions
|
|
@ -42,8 +42,9 @@ class QifFormatter(IFormatter):
|
|||
result += u'!type:Bank\n'
|
||||
result += u'D%s\n' % item['date'].strftime('%d/%m/%y')
|
||||
result += u'T%s\n' % item['amount']
|
||||
if item['category']:
|
||||
result += u'N%s\n' % item['category']
|
||||
result += u'M%s\n' % item['label']
|
||||
result += u'N%s\n' % item['category']
|
||||
result += u'^\n'
|
||||
self.count += 1
|
||||
return result
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ class Operation(CapBaseObject):
|
|||
def __init__(self, id):
|
||||
CapBaseObject.__init__(self, id)
|
||||
self.add_field('date', (basestring, datetime, date))
|
||||
self.add_field('category', unicode)
|
||||
self.add_field('label', unicode)
|
||||
self.add_field('amount', float)
|
||||
self.add_field('category', unicode)
|
||||
|
||||
def __repr__(self):
|
||||
return "<Operation date='%s' label='%s' amount=%s>" % (self.date,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue