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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt (-1 / +1 lines)
Lines 176-182 Link Here
176
                   var rfloat = button.data('float');
176
                   var rfloat = button.data('float');
177
                   $('#floatc').text(rfloat);
177
                   $('#floatc').text(rfloat);
178
                   var rid = button.data('registerid');
178
                   var rid = button.data('registerid');
179
                   $('#cashup_confirm').attr("href", '/cgi-bin/koha/pos/register.pl?op=cashup&registerid='+rid);
179
                   $('#cashup_confirm').attr("href", '/cgi-bin/koha/pos/registers.pl?op=cashup&registerid='+rid);
180
                });
180
                });
181
            });
181
            });
182
        </script>
182
        </script>
(-)a/pos/registers.pl (-2 / +12 lines)
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
- 

Return to bug 24492