Corrections
This commit is contained in:
parent
3dbb48d7fc
commit
a500e22678
28
IFPass.py
28
IFPass.py
@ -237,12 +237,7 @@ def writeindb(titre, firstname, surname, clientID, dateinsc, dateexp, new):
|
|||||||
csvfile.truncate(0)
|
csvfile.truncate(0)
|
||||||
csvfile.write(content)
|
csvfile.write(content)
|
||||||
|
|
||||||
reader = csv.reader(csvfile, delimiter=';')
|
print(colored('[OK]', 'green'))
|
||||||
writer = csv.writer(csvfile, delimiter=';')
|
|
||||||
for index, member in enumerate(reader):
|
|
||||||
if member[3] == clientID:
|
|
||||||
|
|
||||||
print(colored('[OK]', 'green'))
|
|
||||||
|
|
||||||
|
|
||||||
def bkpdb():
|
def bkpdb():
|
||||||
@ -351,7 +346,7 @@ def newmember():
|
|||||||
if version not in ('dev', 'devnocam'):
|
if version not in ('dev', 'devnocam'):
|
||||||
bkpdb()
|
bkpdb()
|
||||||
printcard(cartefilename)
|
printcard(cartefilename)
|
||||||
writeindb(titre, firstname, surname, clientID, dateinsc, dateexp, new=True)
|
writeindb(titre, firstname, surname, clientID, dateinsc, dateexp, new=True)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
@ -421,6 +416,7 @@ def memberdo(choix, member):
|
|||||||
clientID = member[3]
|
clientID = member[3]
|
||||||
dateinsc = member[4]
|
dateinsc = member[4]
|
||||||
dateexp = member[5]
|
dateexp = member[5]
|
||||||
|
|
||||||
os.system('cls')
|
os.system('cls')
|
||||||
if choix == '1': # Edit member
|
if choix == '1': # Edit member
|
||||||
while "the informations are incorrect": # Loop Filling informations
|
while "the informations are incorrect": # Loop Filling informations
|
||||||
@ -439,19 +435,19 @@ def memberdo(choix, member):
|
|||||||
os.system('cls')
|
os.system('cls')
|
||||||
if version != 'devnocam':
|
if version != 'devnocam':
|
||||||
picture = getpic()
|
picture = getpic()
|
||||||
clientID = member[3]
|
|
||||||
barcode = barcode_gen(clientID)
|
|
||||||
fillcard(clientID, titrename, firstname, dateexp, barcode, picture)
|
|
||||||
cartefilename = mergepdf()
|
|
||||||
if version not in ('dev', 'devnocam'):
|
|
||||||
bkpdb()
|
|
||||||
printcard(cartefilename)
|
|
||||||
writeindb(titre, firstname, surname, clientID, dateinsc, dateexp, new=False)
|
|
||||||
break
|
|
||||||
else:
|
else:
|
||||||
# We crop pic from the previous card
|
# We crop pic from the previous card
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
barcode = barcode_gen(clientID)
|
||||||
|
fillcard(clientID, titrename, firstname, dateexp, barcode, picture)
|
||||||
|
cartefilename = mergepdf()
|
||||||
|
if version not in ('dev', 'devnocam'):
|
||||||
|
bkpdb()
|
||||||
|
printcard(cartefilename)
|
||||||
|
writeindb(titre, firstname, surname, clientID, dateinsc, dateexp, new=False)
|
||||||
|
break
|
||||||
|
|
||||||
elif choix == '2': # Renew subscription
|
elif choix == '2': # Renew subscription
|
||||||
print(2)
|
print(2)
|
||||||
elif choix == '3': # Print card
|
elif choix == '3': # Print card
|
||||||
|
Loading…
Reference in New Issue
Block a user