main #7
@@ -48,7 +48,7 @@ class PaymentTerm(DeactivableMixin, ModelSQL, ModelView):
|
|||||||
'.msg_payment_term_missing_last_remainder',
|
'.msg_payment_term_missing_last_remainder',
|
||||||
payment_term=term.rec_name))
|
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
|
"""Calculate payment terms and return a list of tuples
|
||||||
with (date, amount) for each payment term line.
|
with (date, amount) for each payment term line.
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ class PaymentTerm(DeactivableMixin, ModelSQL, ModelView):
|
|||||||
remainder = amount
|
remainder = amount
|
||||||
for line in self.lines:
|
for line in self.lines:
|
||||||
value = line.get_value(remainder, amount, currency)
|
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:
|
if value is None or not value_date:
|
||||||
continue
|
continue
|
||||||
if ((remainder - value) * sign) < Decimal(0):
|
if ((remainder - value) * sign) < Decimal(0):
|
||||||
|
|||||||
Reference in New Issue
Block a user