Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
DirkJanJansen authored Jan 5, 2020
1 parent 0d3e406 commit 6b44045
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
13 changes: 11 additions & 2 deletions urenImutaties.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ def invoerOK():
msg.setWindowTitle('Uren werkorders muteren')
msg.exec_()

def geenUren():
msg = QMessageBox()
msg.setStyleSheet("color: black; background-color: gainsboro")
msg.setIcon(QMessageBox.Warning)
msg.setText('Geen uren ingevoerd!')
msg.setWindowTitle('Uren werkorders muteren')
msg.exec_()

def windowSluit(self, m_email):
self.close()
hoofdMenu(m_email)
Expand Down Expand Up @@ -106,7 +114,6 @@ def __init__(self, parent=None):
k0Edit.setFixedWidth(150)
k0Edit.setFont(QFont("Arial",10))
k0Edit.setStyleSheet("color: black; background-color: gainsboro; selection-background-color: gainsboro; selection-color: black")
k0Edit.addItem(' Soort uren')
k0Edit.addItem('100%')
k0Edit.addItem('125%')
k0Edit.addItem('150%')
Expand All @@ -119,7 +126,6 @@ def __init__(self, parent=None):
k0Edit.addItem('Dokter')
k0Edit.addItem('Geoorl. verzuim')
k0Edit.addItem('Ong. verzuim')
k0Edit.setCurrentIndex(1) #start combobox with default 100%
k0Edit.activated[str].connect(self.k0Changed)

self.Werkuren = QLabel()
Expand Down Expand Up @@ -326,6 +332,9 @@ def getData(parent=None):
mwerknr = 1
werkGereed()
return(maccountnr, mwerknr)
elif not data[3] or int(data[3]) == 0:
geenUren()
return(maccountnr, mwerknr)
elif data[3] and keuze == '100%' and mstatus:
mmeerw100 = float(data[3])
elif data[3] and keuze == '100%':
Expand Down
24 changes: 17 additions & 7 deletions urenMutaties.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,39 @@ def werkGereed():
msg.setStyleSheet("color: black; background-color: gainsboro")
msg.setIcon(QMessageBox.Warning)
msg.setText('Werknummer is afgemeld,\nboekingen niet meer mogelijk!')
msg.setWindowTitle('Mutaties diensten werken')
msg.setWindowTitle('Mutaties uren werken')
msg.exec_()

def geenKeuze():
msg = QMessageBox()
msg.setStyleSheet("color: black; background-color: gainsboro")
msg.setIcon(QMessageBox.Warning)
msg.setText('Geen kostensoort keuze gemaakt')
msg.setWindowTitle('Mutaties diensten werken')
msg.setWindowTitle('Mutaties uren werken')
msg.exec_()

def ongDatum():
msg = QMessageBox()
msg.setStyleSheet("color: black; background-color: gainsboro")
msg.setIcon(QMessageBox.Warning)
msg.setText('Ongeldige datum ingevoerd')
msg.setWindowTitle('Mutaties diensten werken')
msg.setWindowTitle('Mutaties uren werken')
msg.exec_()

def invoerOK():
msg = QMessageBox()
msg.setStyleSheet("color: black; background-color: gainsboro")
msg.setIcon(QMessageBox.Information)
msg.setText('Uren zijn ingevoerd')
msg.setWindowTitle('Mutaties diensten werken')
msg.setWindowTitle('Mutaties uren werken')
msg.exec_()

def geenUren():
msg = QMessageBox()
msg.setStyleSheet("color: black; background-color: gainsboro")
msg.setIcon(QMessageBox.Information)
msg.setText('Geen uren ingevoerd!')
msg.setWindowTitle('Mutaties uren werken')
msg.exec_()

def windowSluit(self, m_email):
Expand Down Expand Up @@ -106,7 +114,6 @@ def __init__(self, parent=None):
k0Edit.setFixedWidth(150)
k0Edit.setFont(QFont("Arial",10))
k0Edit.setStyleSheet("color: black; background-color: gainsboro; selection-background-color: gainsboro; selection-color: black")
k0Edit.addItem(' Soort uren')
k0Edit.addItem('100%')
k0Edit.addItem('125%')
k0Edit.addItem('150%')
Expand All @@ -119,7 +126,6 @@ def __init__(self, parent=None):
k0Edit.addItem('Dokter')
k0Edit.addItem('Geoorl. verzuim')
k0Edit.addItem('Ong. verzuim')
k0Edit.setCurrentIndex(1) #start combobox with default 100%
k0Edit.activated[str].connect(self.k0Changed)

self.Werkuren = QLabel()
Expand Down Expand Up @@ -325,6 +331,10 @@ def getData(parent=None):
mwerknr = 1
werkGereed()
return(maccountnr, mwerknr)
elif not data[3] or int(data[3]) == 0:
print(data[3], type(data[3]))
geenUren()
return(maccountnr, mwerknr)
elif data[3] and keuze == '100%' and mstatus:
mmeerw100 = float(data[3])
elif data[3] and keuze == '100%':
Expand Down Expand Up @@ -369,7 +379,7 @@ def getData(parent=None):
elif data[3] and keuze == 'Ong. verzuim':
moverzuim = float(data[3])
mstatus = False

metadata = MetaData()
wrkwnrln = Table('wrkwnrln', metadata,
Column('wrkwnrurenID', Integer, primary_key=True),
Expand Down

0 comments on commit 6b44045

Please sign in to comment.