Commit 9fb63b5f authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: do not hardcode any reversal trick

Invoice must be correctly grouped.
parent 6141c53e
......@@ -30,14 +30,7 @@ else:
paid = False
break
reversal = portal.portal_catalog.getResultValue(
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:
if paid:
result = "Paid"
elif context.getTotalPrice() == 0:
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