Ejemplo n.º 1
0
 def accumulate(self, row):
     amount = row['Amount']
     if self.fieldsHaveChanged(self.fields):
         self.total = Container.getFloatNoCommas(amount)
     else:
         self.total += Container.getFloatNoCommas(amount) 
     return self.get()
Ejemplo n.º 2
0
 def get(self):
     if self.fieldsWillChange(self.fields):
         return Container.formatDollars(self.total)
     else:
         return Container.formatDollars(self.total)
         return ' '
     return Container.formatDollars(self.total)
Ejemplo n.º 3
0
 def transform(self, essence_col, next_col):
     derived_col = dict(essence_col)  
     derived_col['Year'] = \
         Container.convertStandardDateToYear(essence_col['Date'])
     derived_col['YearMonth'] = \
         Container.convertStandardDateToYearMonth(essence_col['Date'])
     derived_col['SimplifiedAlias'], \
     derived_col['Account'],         \
     derived_col['Category'],        \
     derived_col['Subcategory'] =    \
         self.processAccountAlias(essence_col['AccountAlias'])
     return True, derived_col
Ejemplo n.º 4
0
 def accumulate(self, row):
     amount = row['Amount']
     money = Container.getFloatNoCommas(amount)
     if self.fieldsHaveChanged(self.fields):
         if money < 0.0: self.total = money
         else:           self.total = 0.0
     else:
         if money < 0.0: self.total += money
     return self.get()
Ejemplo n.º 5
0
 def isSelectedRow(self, row):
     partial_first_month = Container.convertStandardDateToYearMonth(self.first_row['Date'])
     ignore_partial_first_month = (partial_first_month == row["YearMonth"])
     return (
         not     (row["Category"] == "Banking" and row["Subcategory"] == "ML Internal Transfer") 
         and not (row["Category"] == "Banking" and row["Subcategory"] == "Wire In") 
         and not (row["Category"] == "Banking" and row["Subcategory"] == "Check Deposit" and  row["Amount"] == "123,755.05") 
         and not (row["Category"] == "Charitable Donations" and row["Subcategory"] == "Wire Out" and  row["Amount"] == "-200,000.00") 
         and not (row["Category"] == "Credit Card" and row["Subcategory"] == "Pay Credit Card" and  row["Account"] == "Capital One")      
         and not (row["Category"] == "Credit Card" and row["Subcategory"] == "Pay Credit Card" and  row["Account"] == "Chase" and  row["Date"] > "2013-07-19")      
         and not ignore_partial_first_month     
     )
     return True
Ejemplo n.º 6
0
 def normalizeAmountField(self, amount_text):
     as_float = Container.getFloat(amount_text)
     return  Container.formatDollars(as_float)
Ejemplo n.º 7
0
 def normalizeDateField(self, date_text):
     return Container.convertDateWithSlashes(date_text)
Ejemplo n.º 8
0
 def pages(self, dirpath = Container.temporaryFolder()):
     #print "pages", dirpath
     self.htmlPresentation(dirpath)
     return 
Ejemplo n.º 9
0
 def get(self):
     return Container.formatDollars(self.total)