Bug 9122: fix the problem when writing-off a fine
authorPaul Poulain <paul.poulain@biblibre.com>
Fri, 23 Nov 2012 13:32:42 +0000 (14:32 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 23 Nov 2012 14:09:53 +0000 (09:09 -0500)
commitab159bd8a2eecc3e602343fbeb37b97f79998be1
tree4d5f5b0b42f9acc11052d0bc15f93804bb62c6f5
parentafc860d66bd706a80fe1b6404b648aa4592f3f79
Bug 9122: fix the problem when writing-off a fine

The problem was introduced by the addition of accountlines_id in bug 7671

The WriteOffFee sub was called with accountlines_id as second parameter
but still dealing with the accountno column.

As a result, the UPDATE was failing (updating nothing), and the fine
note written off even if the writeoff itself was saved. In other words:
the writeoff was not "attached" to the fine.

This patch fixes the problem.

Test plan: do what katrin says in initial description of the problem:
- add some fines manually, I did 'new card' and sundry
- try writing off all of them or one of them
- the fine is correctly written off

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Accounts.pm