diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 4f5f8d445c..d0ddcc429e 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -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';