8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 19:33:11 +00:00

Fix le rechargement : la facture est sauvegardée avant la vente.

This commit is contained in:
Hugo LEVY-FALK 2018-07-03 21:19:33 +02:00
parent 068a78a5ae
commit a0c696edce

View file

@ -826,14 +826,13 @@ def recharge(request):
invoice = Facture(user=request.user)
invoice.paiement = refill_form.cleaned_data['payment']
invoice.valid = False
purchase = Vente.objects.create(
invoice.save()
Vente.objects.create(
facture=invoice,
name='solde',
prix=refill_form.cleaned_data['value'],
number=1
)
purchase.save()
invoice.save()
return invoice.paiement.end_payment(invoice, request)
return form({
'rechargeform': refill_form,