Bug 15397 - Pay selected does not works as expected

When patron has more fees (account lines) and you wan't to pay just some
of them, you select wanted lines a click on "pay selected" button. But
the fine isn't paid, the "amountoutstandig" is not modified, but it is
added new line with "pay" code an with amountoutstanding below zero.
Paying one or all fine works as expected. Paying selected worked some
time ago, but I don't know when it stopped working, we realize it after
upgrade to 3.22.

Test Plan:
1) Apply this patch
2) Pay fines using "Pay selected"
3) Note the payment and the fees outstanding balances are reduced!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 537adde2d2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c0e2610bda)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Kyle M Hall 2016-05-19 13:28:02 +00:00 committed by Julian Maurice
parent 0d1853382b
commit 45e9592eb5
1 changed files with 1 additions and 1 deletions

View File

@ -608,7 +608,7 @@ sub recordpayment_selectaccts {
my $sql = 'SELECT * FROM accountlines WHERE (borrowernumber = ?) ' .
'AND (amountoutstanding<>0) ';
if (@{$accts} ) {
$sql .= ' AND accountno IN ( ' . join ',', @{$accts};
$sql .= ' AND accountlines_id IN ( ' . join ',', @{$accts};
$sql .= ' ) ';
}
$sql .= ' ORDER BY date';