Exemple #1
0
 def __init__(self,
              department='Gray',
              startdate='2019-01-01',
              enddate='2019-02-01'):
     super().__init__()
     self.department = myobjects.Department(department)
     self.startdate = startdate
     self.enddate = enddate
     self.employees = self.department.employees
     self.empids = [employee.id for employee in self.employees]
     self.setTransactions()
Exemple #2
0
 def getProductionData(self):
     self.proddata = []
     prod = myobjects.Department("Production")
     for emp in prod.employees:
         tmp = {}
         emp.setAttendanceHalf(self.month, self.half)
         emp.calculatePay()
         tmp["name"] = emp.name
         self.meters = emp.meters
         self.redyeing = emp.redyeing
         tmp["total"] = emp.totalpay
         tmp["balance"] = emp.balance
         tmp["loans"] = emp.loans
         self.proddata.append(tmp)
Exemple #3
0
 def setDepartment(self, department):
     # print(department)
     self.department = myobjects.Department(department)
     self.employees = self.department.employees
     self.empids = [employee.id for employee in self.employees]
     self.setTransactions()
Exemple #4
0
 def loadDepartments(self):
     with sqlite3.connect('test2.db') as conn:
         deps = conn.execute(
             'select * from departments where not department in ("Staff", "Production")'
         ).fetchall()
         self.departments = [myobjects.Department(x[0]) for x in deps]
Exemple #5
0
 def loadProductionData(self):
     self.production = myobjects.Department("Production").employees