match one payment for multiple partially payed invoices

Bug #1203628 reported by Alvar Vilu on 2013-07-22
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Banking Addons
Undecided
Unassigned

Bug Description

If i have a invoice no 1, lets say 500€ and invoice no 2, 70€
One payment is 200€ for invoice 1... that leaves us 300 for residual
if next payment is 370 and i want to pay multiple invoices (1 and 2)
it will match 370 for that first invoice (move_line credit/debet)
what it should do is to check for residual amount instead

a little bugfix for the problem

account_banking/wizard/banking_transaction_wizard.py around line 201

                    if len(todo) > 0:
### This is nt the leftover amount and it will not take any partial reconcilations in there !
# statement_line_id = wiz.statement_line_id.split_off(
# move_line.debit or -move_line.credit)[0]
                        statement_line_id = wiz.statement_line_id.split_off(
                                move_line.amount_residual)[0]

Tags: 7.0 Edit Tag help

This also affects us on OpenERP 6.1.
When selecting a statement line to match with multiple invoices, it always seems to only take the first invoice and ignore the rest. We will give your suggested fix a try.

Alvar Vilu (alvar-vilu) wrote :

Did it fix the problem?
It's working fine for me :)

Alvar Vilu (alvar-vilu) wrote :

                        statement_line_id = wiz.statement_line_id.split_off(
                                move_line.amount_residual * (move_line.debit and 1 or -1))[0]

this is the correct way for including the sign of the amount

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers