[FIX] account_voucher: wrong accounting entry for supplier payment in foreign currency
lp bug: https://launchpad.net/bugs/1007487 fixed bzr revid: qdp-launchpad@openerp.com-20121010135359-0h0cxeyvk8lrtzni
This commit is contained in:
@@ -1070,7 +1070,8 @@ class account_voucher(osv.osv):
|
||||
if line.amount == line.amount_unreconciled:
|
||||
if not line.move_line_id.amount_residual:
|
||||
raise osv.except_osv(_('Wrong bank statement line'),_("You have to delete the bank statement line which the payment was reconciled to manually. Please check the payment of the partner %s by the amount of %s.")%(line.voucher_id.partner_id.name, line.voucher_id.amount))
|
||||
currency_rate_difference = line.move_line_id.amount_residual - amount
|
||||
sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1
|
||||
currency_rate_difference = sign * (line.move_line_id.amount_residual - amount)
|
||||
else:
|
||||
currency_rate_difference = 0.0
|
||||
move_line = {
|
||||
|
||||
Reference in New Issue
Block a user