This commit is contained in:
2026-02-16 20:01:57 +01:00
parent 0e5c40e9a2
commit 697b53e68a

View File

@@ -48,7 +48,7 @@ class PaymentTerm(DeactivableMixin, ModelSQL, ModelView):
'.msg_payment_term_missing_last_remainder',
payment_term=term.rec_name))
def compute(self, amount, currency, date, line = None):
def compute(self, amount, currency, date, line_ = None):
"""Calculate payment terms and return a list of tuples
with (date, amount) for each payment term line.
@@ -61,7 +61,7 @@ class PaymentTerm(DeactivableMixin, ModelSQL, ModelView):
remainder = amount
for line in self.lines:
value = line.get_value(remainder, amount, currency)
value_date = line.get_date(date, line)
value_date = line.get_date(date, line_)
if value is None or not value_date:
continue
if ((remainder - value) * sign) < Decimal(0):