Commit d3a6fd49 authored by Łukasz Nowak's avatar Łukasz Nowak

Unlock locked person only in case is nothing is ongoing.

parent 5bf8740e
......@@ -77,8 +77,8 @@ if context.portal_catalog.countResults(\n
# there are ongoing old payments, shall be locked\n
if not locked and operation == \'lock\':\n
context.lock(comment="Payment transaction not paid for more than %s days" % maximum_due_date)\n
else:\n
# there are no ongoing payments and balance is acceptable\n
elif balance >= 0.0:\n
# there are no ongoing payments and customer owns nothing\n
if locked and operation == \'unlock\':\n
context.unlock()\n
......
532
\ No newline at end of file
533
\ No newline at end of file
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