diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 5243712fe5..485e453b8e 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -606,7 +606,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';