本文整理汇总了Python中weboob.tools.capabilities.bank.transactions.FrenchTransaction._coming方法的典型用法代码示例。如果您正苦于以下问题:Python FrenchTransaction._coming方法的具体用法?Python FrenchTransaction._coming怎么用?Python FrenchTransaction._coming使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类weboob.tools.capabilities.bank.transactions.FrenchTransaction
的用法示例。
在下文中一共展示了FrenchTransaction._coming方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_history
# 需要导入模块: from weboob.tools.capabilities.bank.transactions import FrenchTransaction [as 别名]
# 或者: from weboob.tools.capabilities.bank.transactions.FrenchTransaction import _coming [as 别名]
def get_history(self, account):
transactions = []
last_order = None
for tr in self.document.split('\n')[1:]:
cols = tr.split(';')
if len(cols) < 4:
continue
t = FrenchTransaction(0)
date = cols[self.COL_DATE]
raw = cols[self.COL_TEXT]
amount = cols[self.COL_AMOUNT]
t.parse(date, re.sub(r'[ ]+', ' ', raw))
if t.raw.startswith('PRELEVEMENT ACHATS DIFFERES'):
t._coming = False
if last_order is None:
last_order = t.date
else:
t._coming = True
t.set_amount(amount)
transactions.append(t)
# go to the previous stop date before the last order
while last_order is not None and last_order.day != account._outstanding_date.day:
last_order = last_order - datetime.timedelta(days=1)
for t in transactions:
if t.date <= last_order:
t._coming = False
return iter(transactions)