From d88aad2d57d25a939e99c9425d9d3c12a2f5bee7 Mon Sep 17 00:00:00 2001 From: Laura_Escamilla Date: Thu, 29 Jan 2026 21:56:37 +0000 Subject: [PATCH] Bug 40871: filter out VOID and VOID adjustments in outstanding_accountlines --- Koha/Cash/Register.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Koha/Cash/Register.pm b/Koha/Cash/Register.pm index 030d80d608..df15057775 100644 --- a/Koha/Cash/Register.pm +++ b/Koha/Cash/Register.pm @@ -59,6 +59,15 @@ sub cashups { my $local_conditions = { code => 'CASHUP' }; $conditions //= {}; + + # Voided payments (status VOID) and the VOID debit adjustment should not be bankable + my $exclude_void = { + status => [ { '!=' => 'VOID' }, undef ], + debit_type_code => [ { '!=' => 'VOID' }, undef ], + }; + + $local_conditions = { %{$local_conditions}, %{$exclude_void} }; + my $merged_conditions = { %{$conditions}, %{$local_conditions} }; my $rs = $self->_result->search_related( -- 2.39.5