Fixed bug change date

This commit is contained in:
Jordan ERNST 2019-04-02 12:03:07 +02:00
parent a93c05bcc3
commit d879cf389d

View File

@ -436,9 +436,10 @@ def memberdo(choix, member):
titre, firstname, surname, dateexp = memberedit(titre, firstname, surname, clientID, dateinsc, dateexp)
elif choix == '2': # Renew subscription
print("1 - Renouveller l'abonnement automatiquement", "2 - Choisir la date d'expiration", sep='\n')
choix = input("Choix : ")
if choix == 1:
changeexp = yes_or_no("Voulez-vous choisir la date d'expiration ?")
if changeexp:
dateexp = getdateexp()
else:
dateexp = datetime.strptime(dateexp, '%d/%m/%Y').date()
diff = (dateexp - date.today()).days
if diff >= 0:
@ -446,8 +447,6 @@ def memberdo(choix, member):
elif diff < 0:
dateexp = date.today() + timedelta(days=365)
dateexp = dateexp.strftime('%d/%m/%Y')
elif choix == 2:
dateexp = getdateexp()
if titre == 'Dr.':
titrename = titre + ' ' + surname