View | Details | Raw Unified | Return to bug 24492
Collapse All | Expand All

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

Return to bug 24492