From f2efa1898db8b4d8d73bbc99de95571815561750 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 6 Apr 2020 10:36:35 +0100 Subject: [PATCH] Bug 24492: (RM follow-up) Varaible name corretion Bug 24492 was not correctly rebased after bug 23355 and did not account for a variable name change in the 'add_cashup' action. This patch deals with that. Signed-off-by: Martin Renvoize --- pos/registers.pl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pos/registers.pl b/pos/registers.pl index fafaf64fe1..620b45dbab 100755 --- a/pos/registers.pl +++ b/pos/registers.pl @@ -56,20 +56,21 @@ else { my $op = $input->param('op') // ''; if ( $op eq 'cashup' ) { my $registerid = $input->param('registerid'); - if ( $registerid ) { + if ($registerid) { my $register = Koha::Cash::Registers->find( { id => $registerid } ); $register->add_cashup( { - user_id => $logged_in_user->id, - amount => $register->outstanding_accountlines->total + manager_id => $logged_in_user->id, + amount => $register->outstanding_accountlines->total } ); - } else { + } + else { for my $register ( $registers->as_list ) { $register->add_cashup( { - user_id => $logged_in_user->id, - amount => $register->outstanding_accountlines->total + manager_id => $logged_in_user->id, + amount => $register->outstanding_accountlines->total } ); } -- 2.39.2