Exemple #1
0
    def ownerMails(self):
        mails = excel_utils.ExtractCellValueByColumn(self, 'מייל שוכר')
        try:
            return mails.split()
        #probably an integer, therfore could not be splitted, so str it
        except:
            return str(mails)

        return excel_utils.ExtractCellValueByColumn(self, 'מייל שוכר').split()
Exemple #2
0
 def renterPhones(self):
     phones = excel_utils.ExtractCellValueByColumn(self, 'טלפון שוכרים')
     try:
         return phones.split()
     # probably a phone which was written without a leading zero therefore is treated as a number in the excel
     except:
         return ['0' + str(phones)]
Exemple #3
0
    def monthlyData(self, year, excelCellInfoPerDate=None):

        #find columns in this sheet which represent months
        allMonths = sorted([k for k in self.__dict__ if dates.datify(k, year)],
                           key=(lambda dateColumn: dates.datify(dateColumn)))

        #build monthly expected payments table
        monthlyExpectedPaymentOf = {}

        #if there are different expected payment throughtout this sheet, then monthlyColumns gets updated
        #ar the c'tor of the excel record
        if len(self.monthlyColumns):
            currExpectedPayment = self.payment
            for m in allMonths:
                if int(m) in self.monthlyColumns:
                    currExpectedPayment = utils.Intify(
                        excel_utils.ExtractCellValueByColumn(
                            self, 'ת.חודשי_%d' % int(m)))
                monthlyExpectedPaymentOf[m] = currExpectedPayment
        else:
            for m in allMonths:
                monthlyExpectedPaymentOf[m] = utils.Intify(self.payment)

        for month in allMonths:

            cell_info = excelCellInfoPerDate[dates.datify(month, year)]

            expected_payment = monthlyExpectedPaymentOf[month]
            actual_payment = utils.Intify(self.monthlyPayment(month))

            cell_info.payment_details.actual_payment = actual_payment
            cell_info.payment_details.expected_payment = expected_payment
Exemple #4
0
 def renterMails(self):               
     mails = excel_utils.ExtractCellValueByColumn(self, 'דואר אלקטרוני שוכרים')
     try:
         return mails.split()
     #probably an integer, therfore could not be splitted, so str it 
     except:            
         return str(mails)
Exemple #5
0
 def debt(self):
     return utils.Intify(excel_utils.ExtractCellValueByColumn(self, 'יתרה'))
Exemple #6
0
 def tenant(self):
     return excel_utils.ExtractCellValueByColumn(self, 'שם דיירים')
Exemple #7
0
 def appartment(self):
     app = excel_utils.ExtractCellValueByColumn(self, 'דירה')
     try:
         return int(app)
     except:
         return app.strip()
Exemple #8
0
 def ownerMails(self):
     return excel_utils.ExtractCellValueByColumn(self, 'מייל בעלים').split()
Exemple #9
0
 def owner(self):
     return excel_utils.ExtractCellValueByColumn(self, 'שם בעלים')
Exemple #10
0
 def special_debt(self):
     # if payment does not exist, treat as 0 as it is defined integer in the data base
     return utils.Intify(
         excel_utils.ExtractCellValueByColumn(self, 'יתרה לתשלום'))
Exemple #11
0
 def paid(self):
     paid = excel_utils.ExtractCellValueByColumn(self, 'תשלום בהוראת קבע')
     if type(paid) == int or type(paid) == float or len(paid):
         return True
Exemple #12
0
 def tenantPhones(self):
     return excel_utils.ExtractCellValueByColumn(self,
                                                 'טלפון דיירים').split()
Exemple #13
0
 def ownerPhones(self):
     return excel_utils.ExtractCellValueByColumn(self,
                                                 'טלפון בעלים').split()
Exemple #14
0
 def tenantMails(self):
     return excel_utils.ExtractCellValueByColumn(self,
                                                 'מייל דיירים').split()
Exemple #15
0
 def building(self):
     return excel_utils.ExtractCellValueByColumn(self, 'בנין')
Exemple #16
0
 def building_code(self):
     return utils.Intify(
         excel_utils.ExtractCellValueByColumn(self, 'קוד בניין'))
Exemple #17
0
 def monthlyPayment(self, month):
     return excel_utils.ExtractCellValueByColumn(self, str(month))
Exemple #18
0
 def appartment(self):
     try:
         app = excel_utils.ExtractCellValueByColumn(self, 'כרטיס')
         return int(str(int(app))[3:]) - 5000
     except ValueError:
         return app
Exemple #19
0
 def payment(self):
     #if payment does not exist, treat as 0 as it is defined integer in the data base
     return utils.Intify(
         excel_utils.ExtractCellValueByColumn(self, 'ת.חודשי'))
Exemple #20
0
 def renter(self):
     return excel_utils.ExtractCellValueByColumn(self, 'שם שוכרים')
Exemple #21
0
 def focal_point(self):
     return excel_utils.ExtractCellValueByColumn(self, 'נציגי בניין')