Commit 07c6868a authored by Hugo LEVY-FALK's avatar Hugo LEVY-FALK

Validation des factures à la recharge

parent c1f55e79
...@@ -677,9 +677,9 @@ def credit_solde(request, user, **_kwargs): ...@@ -677,9 +677,9 @@ def credit_solde(request, user, **_kwargs):
""" """
refill_form = RechargeForm(request.POST or None, user=request.user) refill_form = RechargeForm(request.POST or None, user=request.user)
if refill_form.is_valid(): if refill_form.is_valid():
invoice = Facture(user=request.user) invoice = Facture(user=user)
invoice.paiement = refill_form.cleaned_data['payment'] invoice.paiement = refill_form.cleaned_data['payment']
invoice.valid = False invoice.valid = True
invoice.save() invoice.save()
Vente.objects.create( Vente.objects.create(
facture=invoice, facture=invoice,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment