Merge branch 'dev'

This commit is contained in:
Jordan ERNST 2019-04-02 12:03:37 +02:00
commit 971bf846ab

View File

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