use given date for computation of amount with differing currency instead of currenct date

(transplanted from 8b325f26eb8b9ed0020933493e0c7862c1fc713b)
This commit is contained in:
Korbinian Preisler
2009-09-08 21:52:19 +02:00
parent b247c81668
commit 63da18d7eb
+2 -2
View File
@@ -2307,7 +2307,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:
@@ -2379,7 +2379,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)