Commit 3e76725a authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: do not hardcode any reversal trick

Invoice must be correctly grouped.
parent 6b846d88
...@@ -30,14 +30,7 @@ else: ...@@ -30,14 +30,7 @@ else:
paid = False paid = False
break break
reversal = portal.portal_catalog.getResultValue( if paid:
portal_type="Sale Invoice Transaction",
simulation_state="stopped",
default_causality_uid=context.getUid()
)
if reversal is not None and (context.getTotalPrice() + reversal.getTotalPrice()) == 0:
result = "Cancelled"
elif paid:
result = "Paid" result = "Paid"
elif context.getTotalPrice() == 0: elif context.getTotalPrice() == 0:
result = "Free!" result = "Free!"
......
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