Commit 7a07c1fe authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Fix up condition

   Fix up don't create line if line is found.
parent 225bf137
...@@ -48,8 +48,8 @@ if cloud_invitation.getMaximumInvoiceDelay(0) > contract.getMaximumInvoiceDelay( ...@@ -48,8 +48,8 @@ if cloud_invitation.getMaximumInvoiceDelay(0) > contract.getMaximumInvoiceDelay(
for invitation_line in cloud_invitation.objectValues(): for invitation_line in cloud_invitation.objectValues():
has_line = False has_line = False
for line in contract.objectValues(): for line in contract.objectValues():
if line.getPriceCurrency() == invitation_line.getPriceCurrency() and \ if line.getPriceCurrency() == invitation_line.getPriceCurrency():
invitation_line.getMaximumInvoiceCredit(0) > line.getMaximumInvoiceCredit(0): if invitation_line.getMaximumInvoiceCredit(0) > line.getMaximumInvoiceCredit(0):
line.edit( line.edit(
maximum_invoice_credit=invitation_line.getMaximumInvoiceCredit()) maximum_invoice_credit=invitation_line.getMaximumInvoiceCredit())
has_line = True has_line = True
......
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