def parse(self): """Main entry point for parsers super() implementation will call to split_records and parse_record to process the file. """ stmt = super(bnpParser, self).parse() statement.recalculate_balance(stmt) return stmt
def parse(self): """Main entry point for parsers super() implementation will call to split_records and parse_record to process the file. """ stmt = super(KeytradeParser, self).parse() statement.recalculate_balance(stmt) return stmt
def parse(self): """Main entry point for parsers super() implementation will call to split_records and parse_record to process the file. """ stmt = super().parse() stmt.account_id = self.acct stmt.bank_id = None stmt.currency = "EUR" statement.recalculate_balance(stmt) return stmt
def parse(self): stmt = super(DanskeCsvStatementParser, self).parse() statement.recalculate_balance(stmt) return stmt
def parse(self): """Parse.""" stmt = super(IngDiBaCsvParser, self).parse() statement.recalculate_balance(stmt) return stmt
def parse(self): super().parse() recalculate_balance(self.statement) return self.statement
def parse(self): """Parse.""" stmt = super(RaiffeisenCsvParser, self).parse() statement.recalculate_balance(stmt) return stmt
def parse(self): stmt = super(DBPLParser, self).parse() recalculate_balance(stmt) return stmt
def parse(self): stmt = super(MillenniumParser, self).parse() recalculate_balance(stmt) return stmt
def parse(self): """Main entry point for parsers super() implementation will call to split_records and parse_record to process the file. """ with_saldo = False # initialize csv reader self.reader = csv.reader(self.fin, delimiter=';') # iterate over objects until we get to first important row for row in self.reader: # skip empty line if len(row) == 0: continue # IBAN number if row[0] == 'IBAN': account_id = self.format_iban(row[1]) # Account name / type if row[0] == 'Kontoname': account_type_ger = row[1] # bank id if row[0] == 'Bank': bank_id = row[1] # date range if row[0] == 'Zeitraum': start_date = datetime.datetime.strptime( row[1].split(' - ')[0], self.date_format) end_date = datetime.datetime.strptime(row[1].split(' - ')[1], self.date_format) # starting saldo if row[0] == 'Saldo': start_balance = decimal.Decimal(self.format_number_de(row[1])) self.currency = row[2] with_saldo = True # header of actual statement data # generate mapping if row[0] == 'Buchung': for i, column in enumerate(row): # date user initiated transaction if column == 'Buchung': self.mappings['date_user'] = i # date transaction was posted to account if column == 'Valuta': self.mappings['date'] = i # payee if column == 'Auftraggeber/Empfänger': self.mappings['payee'] = i # transaction type (in german) if column == 'Buchungstext': self.mappings['trntype'] = i # transaction description if column == 'Verwendungszweck': self.mappings['memo'] = i # saldo if column == 'Saldo': self.mappings['saldo'] = i # currency (this may appear twice if saldo is included, # but that should be no problem, because we are interested # in the second "Währung" column for the actual amount) if column == 'Währung': self.mappings['curr'] = i # the actual amount if column == 'Betrag': self.mappings['amount'] = i # break the loop over rows break # check if saldo is present if not with_saldo: raise RuntimeError('CSV must be exported with saldo!') # parse each line stmt = super(IngDeParser, self).parse() # fill in bank infos stmt.account_id = account_id stmt.bank_id = bank_id stmt.currency = self.currency stmt.start_date = start_date stmt.end_date = end_date stmt.start_balance = start_balance # try to get account type if account_type_ger == 'Girokonto': stmt.account_type = "CHECKING" elif account_type_ger == 'Extra-Konto': stmt.account_type = "SAVINGS" # finalize statement statement.recalculate_balance(stmt) return stmt
def parse(self): """Parse.""" stmt = super(EasybankCreditCardCsvParser, self).parse() statement.recalculate_balance(stmt) return stmt
def parse(self): stmt = super(IngRoParser, self).parse() statement.recalculate_balance(stmt) return stmt