add Account.TYPE_CARD

This commit is contained in:
Romain Bignon 2014-02-02 10:50:01 +01:00
commit 5b03648b68
2 changed files with 2 additions and 0 deletions

View file

@ -148,6 +148,7 @@ class CardsPage(BasePage):
get = lambda name: self.parser.tocleanstring(table.xpath(xpaths[name])[0])
account = Account()
account.type = account.TYPE_CARD
account.id = ''.join(get('_id').split()[1:])
account.label = '%s - %s' % (get('label1'),
re.sub('\s*-\s*$', '', get('label2')))

View file

@ -74,6 +74,7 @@ class Account(Recipient):
TYPE_LOAN = 4
TYPE_MARKET = 5 # Stock market or other variable investments
TYPE_JOINT = 6 # Joint account
TYPE_CARD = 7 # Card account
type = IntField('Type of account', default=TYPE_UNKNOWN)
balance = DecimalField('Balance on this bank account')