コード例 #1
0
ファイル: models.py プロジェクト: ybandco27/PyPayroll
 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()
コード例 #2
0
ファイル: models.py プロジェクト: ybandco27/PyPayroll
 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)
コード例 #3
0
ファイル: models.py プロジェクト: ybandco27/PyPayroll
 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()
コード例 #4
0
ファイル: models.py プロジェクト: ybandco27/PyPayroll
 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]
コード例 #5
0
ファイル: models.py プロジェクト: ybandco27/PyPayroll
 def loadProductionData(self):
     self.production = myobjects.Department("Production").employees