Skip to content
Extraits de code Groupes Projets
Valider 723c3ad8 rédigé par jordan's avatar jordan
Parcourir les fichiers

[fix] if invoice is overpaid -> payments/refund are too

parent d36d011f
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -123,7 +123,7 @@ class ScopCotisationsIDF(models.Model): ...@@ -123,7 +123,7 @@ class ScopCotisationsIDF(models.Model):
elif invoice.amount_residual < 0: elif invoice.amount_residual < 0:
invoice.state = 'overpaid' invoice.state = 'overpaid'
for r in invoice.payment_or_refund_ids: for r in invoice.payment_or_refund_ids:
r.state = 'awaiting_payments' r.state = 'overpaid'
else: else:
invoice.state = 'paid' invoice.state = 'paid'
for r in invoice.payment_or_refund_ids: for r in invoice.payment_or_refund_ids:
......
...@@ -113,7 +113,7 @@ class ScopinvoiceIDF(models.Model): ...@@ -113,7 +113,7 @@ class ScopinvoiceIDF(models.Model):
elif invoice.amount_residual < 0: elif invoice.amount_residual < 0:
invoice.state = 'overpaid' invoice.state = 'overpaid'
for r in invoice.payment_or_refund_ids: for r in invoice.payment_or_refund_ids:
r.state = 'awaiting_payments' r.state = 'overpaid'
else: else:
invoice.state = 'paid' invoice.state = 'paid'
for r in invoice.payment_or_refund_ids: for r in invoice.payment_or_refund_ids:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter