Esempio n. 1
0
 def transform(self, this_row, next_row):
     essence = dict()
     essence['Date'] = Essence.normalizeDateField(this_row['Settlement Date'])  
     essence['Amount'] = Essence.normalizeAmountField(this_row['Amount ($)'])
     essence['TransferMech1'] = this_row['Type']   
     essence['TransferMech2'] = this_row['Description 1']
     essence['AccountAlias'] = this_row['Description 2']   
     essence['Institution'] = 'Beyond Banking'
     return True, essence
Esempio n. 2
0
 def transform(self, this_row, next_row):
     essence = dict()
     essence['Date'] = Essence.normalizeDateField(this_row['Date'])      
     if this_row['Transaction Type'] == 'debit':
         maybe_minus = "-"+this_row['Amount']
     elif this_row['Transaction Type'] == 'credit':
         maybe_minus = this_row['Amount']
     else:
         maybe_minus = '0.0'
         print "ERROR: Db_Raw_Finance_Mint: transaction type is not credit or debit"
     essence['Amount'] = Essence.normalizeAmountField(maybe_minus)
     essence['TransferMech1'] = this_row['Category']   
     essence['TransferMech2'] = this_row['Description']
     essence['AccountAlias'] = this_row['Original Description'] 
     if this_row['Account Name'] == 'VISA SIGNATURE':  
         essence['Institution'] = 'Mint Capital One'
     elif this_row['Account Name'] == 'CREDIT CARD':  
         essence['Institution'] = 'Mint Chase'
     else:
         essence['Institution'] = this_row['Account Name']
     return True, essence