Commit 2ba21dfe authored by Romain Courteaud's avatar Romain Courteaud

slapos_crm: only check automated Outstanding Invoices

parent 9317609c
......@@ -24,7 +24,7 @@ if ticket is not None:
return ticket, None
mail_message = None
if person.Entity_hasOutstandingAmount():
if person.Entity_hasOutstandingAmount(ledger_uid=portal.portal_categories.ledger.automated.getUid()):
tag = "%s_addRegularisationRequest_inProgress" % person.getUid()
if (portal.portal_activities.countMessageWithTag(tag) > 0):
# The regularisation request is already under creation but can not be fetched from catalog
......
......@@ -8,5 +8,5 @@ if (state not in ('suspended', 'validated')) or \
(person is None):
return
if not person.Entity_hasOutstandingAmount():
if not person.Entity_hasOutstandingAmount(ledger_uid=context.getPortalObject().portal_categories.ledger.automated.getUid()):
context.invalidate(comment="Automatically disabled as balance is ok")
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