Browse Source

Merge branch 'fix_invalidate' into dev

pull/4/head
Yoann Piétri 7 years ago
parent
commit
d99d5a9ae3
  1. 1
      users/templates/users/profile.html
  2. 2
      users/views.py

1
users/templates/users/profile.html

@ -80,7 +80,6 @@
console.log(baseColor)
$.get("http://www.thecolorapi.com/scheme?rgb=" + baseColor + "&mode=analogic&count={{products | length}}", function( data ) {
colors = data.colors
console.log(colors)
var bgColor = []
for(var i = 0; i < colors.length; i++){
color = colors[i]

2
users/views.py

@ -922,7 +922,7 @@ def invalidateCotisationHistory(request, pk):
user = cotisationHistory.user
user.profile.cotisationEnd = user.profile.cotisationEnd - timedelta(days=cotisationHistory.duration)
if(cotisationHistory.paymentMethod.affect_balance):
user.profile.balance += cotisation.amount
user.profile.debit -= cotisationHistory.cotisation.amount
user.save()
messages.success(request, "La cotisation a bien été invalidée")
return HttpResponseRedirect(request.META.get('HTTP_REFERER'))

Loading…
Cancel
Save