Beispiel #1
0
 def extractBusiness(self, row):
     # In the leumi files, the action is in a td with either class=ActivityTableColumn1 or class=ActivityTableColumn1LTR
     action1 = myString.strip(
         row.find("td", {"class": "ActivityTableColumn1"}))
     action2 = myString.strip(
         row.find("td", {"class": "ActivityTableColumn1LTR"}))
     return action1 + action2
Beispiel #2
0
 def extractDebit(self, row):
     # In the leumi files, the debit is in a td with class=AmountDebitUniqeClass
     data = myString.strip(
         row.find("td",
                  {"class": "AmountDebitUniqeClass"})).replace(',', '')
     if (myString.isEmpty(data)):
         return None
     return Decimal(data)
Beispiel #3
0
 def extractBalance(self, row):
     # In the leumi files, the balance is in a td with class=number_column
     # There are 3 such td in each row: debit, credit, balance. Balance is always the 3rd.
     totals = row.find_all("td", {"class": "number_column"})
     total = ""
     if (len(totals) > 1):
         total = myString.strip(totals[2]).replace(',', '')
     if (myString.isEmpty(total)):
         return None
     return Decimal(total)
Beispiel #4
0
    def extractDate(self, row):
        # In the leumi files, the date is in a td with class=ExtendedActivityColumnDate
        dateString = myString.strip(
            row.find("td", {"class": "ExtendedActivityColumnDate"}))
        if (myString.isEmpty(dateString)):
            return None

        date = datetime.strptime(dateString,
                                 '%d/%m/%y').date().strftime("%Y-%m-%d")
        return date
Beispiel #5
0
 def extractRefId(self, row):
     # In the leumi files, the refId is in a td with class=ReferenceNumberUniqeClass
     refString = myString.strip(
         row.find("td", {"class": "ReferenceNumberUniqeClass"}))
     return refString
Beispiel #6
0
 def extractDate(self, row):
     # In the leumi files, the date is in a td with class=ExtendedActivityColumnDate
     dateString = myString.strip(
         row.find("td", {"class": "ExtendedActivityColumnDate"}))
     date = self.formatDate(dateString)
     return date