Commit f2f66264 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: Minor fixup

parent fb4b1c16
Pipeline #15222 failed with stage
in 0 seconds
...@@ -20,12 +20,11 @@ if invoice is None: ...@@ -20,12 +20,11 @@ if invoice is None:
line_found = False line_found = False
line_list = invoice.getMovementList(portal.getPortalAccountingMovementTypeList()) line_list = invoice.getMovementList(portal.getPortalAccountingMovementTypeList())
if not len(line_list): if not len(line_list):
# Ignore since lines to group don't exist yet # Ignore since lines to group don't exist yet
return return
for line in invoice.getMovementList(portal.getPortalAccountingMovementTypeList()): for line in line_list:
if isNodeFromLineReceivable(line): if isNodeFromLineReceivable(line):
line_found = True line_found = True
if line.hasGroupingReference(): if line.hasGroupingReference():
...@@ -40,7 +39,8 @@ if line_found and paid: ...@@ -40,7 +39,8 @@ if line_found and paid:
with grouping reference %s" % letter) with grouping reference %s" % letter)
# Should be safe now to fix everything XXXXXXX # Should be safe now to fix everything XXXXXXX
context.SaleInvoiceTransaction_resetPaymentMode() invoice.SaleInvoiceTransaction_resetPaymentMode()
return "Payment Cancelled"
return return "Skipped"
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