mirror of
https://github.com/nanoy42/coope
synced 2024-11-22 11:23:11 +00:00
Fix invalidation
This commit is contained in:
parent
f377ffb7c2
commit
a28d9660dd
2 changed files with 1 additions and 2 deletions
|
@ -80,7 +80,6 @@
|
||||||
console.log(baseColor)
|
console.log(baseColor)
|
||||||
$.get("http://www.thecolorapi.com/scheme?rgb=" + baseColor + "&mode=analogic&count={{products | length}}", function( data ) {
|
$.get("http://www.thecolorapi.com/scheme?rgb=" + baseColor + "&mode=analogic&count={{products | length}}", function( data ) {
|
||||||
colors = data.colors
|
colors = data.colors
|
||||||
console.log(colors)
|
|
||||||
var bgColor = []
|
var bgColor = []
|
||||||
for(var i = 0; i < colors.length; i++){
|
for(var i = 0; i < colors.length; i++){
|
||||||
color = colors[i]
|
color = colors[i]
|
||||||
|
|
|
@ -922,7 +922,7 @@ def invalidateCotisationHistory(request, pk):
|
||||||
user = cotisationHistory.user
|
user = cotisationHistory.user
|
||||||
user.profile.cotisationEnd = user.profile.cotisationEnd - timedelta(days=cotisationHistory.duration)
|
user.profile.cotisationEnd = user.profile.cotisationEnd - timedelta(days=cotisationHistory.duration)
|
||||||
if(cotisationHistory.paymentMethod.affect_balance):
|
if(cotisationHistory.paymentMethod.affect_balance):
|
||||||
user.profile.balance += cotisation.amount
|
user.profile.debit -= cotisationHistory.cotisation.amount
|
||||||
user.save()
|
user.save()
|
||||||
messages.success(request, "La cotisation a bien été invalidée")
|
messages.success(request, "La cotisation a bien été invalidée")
|
||||||
return HttpResponseRedirect(request.META.get('HTTP_REFERER'))
|
return HttpResponseRedirect(request.META.get('HTTP_REFERER'))
|
||||||
|
|
Loading…
Reference in a new issue