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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt (+7 lines)
Lines 231-236 Link Here
231
               var rid = button.data('registerid');
231
               var rid = button.data('registerid');
232
               $('#cashup_confirm').attr("href", '/cgi-bin/koha/pos/registers.pl?op=cashup&registerid='+rid);
232
               $('#cashup_confirm').attr("href", '/cgi-bin/koha/pos/registers.pl?op=cashup&registerid='+rid);
233
            });
233
            });
234
235
            [% IF cashup_id %]
236
            let $button = $('[data-cashup="[% cashup_id | html %]"]');
237
            if ($button.length) {
238
                $button[0].click();
239
            }
240
            [% END %]
234
        });
241
        });
235
    </script>
242
    </script>
236
[% END %]
243
[% END %]
(-)a/pos/registers.pl (-2 / +2 lines)
Lines 59-70 if ( $op eq 'cashup' ) { Link Here
59
        my $registerid = $input->param('registerid');
59
        my $registerid = $input->param('registerid');
60
        if ($registerid) {
60
        if ($registerid) {
61
            my $register = Koha::Cash::Registers->find( { id => $registerid } );
61
            my $register = Koha::Cash::Registers->find( { id => $registerid } );
62
            $register->add_cashup(
62
            my $cashup = $register->add_cashup(
63
                {
63
                {
64
                    manager_id => $logged_in_user->id,
64
                    manager_id => $logged_in_user->id,
65
                    amount     => $register->outstanding_accountlines->total
65
                    amount     => $register->outstanding_accountlines->total
66
                }
66
                }
67
            );
67
            );
68
            $template->param( cashup_id => $cashup->id );
68
        } else {
69
        } else {
69
            for my $register ( $registers->as_list ) {
70
            for my $register ( $registers->as_list ) {
70
                $register->add_cashup(
71
                $register->add_cashup(
71
- 

Return to bug 38728