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 <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-04-06 10:36:35 +01:00
parent e065b86abd
commit f2efa1898d
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -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
}
);
}