From 229ea7a312e84b3c330082b66e1aa3687adf0028 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 30 Sep 2021 09:14:15 +0100 Subject: [PATCH] Bug 29139: Fix incorrect relation call The bug here was worse than originally thought. We were calling the wrong relation too.. we should probably add some exceptions to catch this, it confuses me every single time! Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall --- Koha/Account.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index a2b0ffa6ed..2c4f8bf0a6 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -113,7 +113,7 @@ sub pay { } my $patron = Koha::Patrons->find( $self->{patron_id} ); - my @account_offsets = $payment->debit_offsets->as_list; + my @account_offsets = $payment->credit_offsets->as_list; if ( C4::Context->preference('UseEmailReceipts') ) { if ( my $letter = C4::Letters::GetPreparedLetter( -- 2.39.5