Lines 55-67
else {
Link Here
|
55 |
|
55 |
|
56 |
my $op = $input->param('op') // ''; |
56 |
my $op = $input->param('op') // ''; |
57 |
if ( $op eq 'cashup' ) { |
57 |
if ( $op eq 'cashup' ) { |
58 |
for my $register ( $registers->as_list ) { |
58 |
my $registerid = $input->param('registerid'); |
|
|
59 |
if ( $registerid ) { |
60 |
my $register = Koha::Cash::Registers->find( { id => $registerid } ); |
59 |
$register->add_cashup( |
61 |
$register->add_cashup( |
60 |
{ |
62 |
{ |
61 |
user_id => $logged_in_user->id, |
63 |
user_id => $logged_in_user->id, |
62 |
amount => $register->outstanding_accountlines->total |
64 |
amount => $register->outstanding_accountlines->total |
63 |
} |
65 |
} |
64 |
); |
66 |
); |
|
|
67 |
} else { |
68 |
for my $register ( $registers->as_list ) { |
69 |
$register->add_cashup( |
70 |
{ |
71 |
user_id => $logged_in_user->id, |
72 |
amount => $register->outstanding_accountlines->total |
73 |
} |
74 |
); |
75 |
} |
65 |
} |
76 |
} |
66 |
} |
77 |
} |
67 |
|
78 |
|
68 |
- |
|
|