diff --git a/invoice.py b/invoice.py index dda9cecb7d..9960fbc8c0 100644 --- a/invoice.py +++ b/invoice.py @@ -2314,7 +2314,7 @@ class PayInvoice(Wizard): ctx['date'] = data['form']['date'] amount = currency_obj.compute(cursor, user, data['form']['currency'], data['form']['amount'], invoice.company.currency, - context=context) + context=ctx) res = invoice_obj.get_reconcile_lines_for_amount(cursor, user, invoice, amount) if res[1] == Decimal('0.0') and amount <= invoice.amount_to_pay: @@ -2386,7 +2386,7 @@ class PayInvoice(Wizard): ctx['date'] = data['form']['date'] amount = currency_obj.compute(cursor, user, data['form']['currency'], data['form']['amount'], invoice.company.currency, - context=context) + context=ctx) reconcile_lines = invoice_obj.get_reconcile_lines_for_amount(cursor, user, invoice, amount)