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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (+9 lines)
Lines 480-485 Link Here
480
                }
480
                }
481
            ]
481
            ]
482
        }, null, 1);
482
        }, null, 1);
483
484
        $(document).ready(function() {
485
            [% IF cashup_id %]
486
            let $button = $('[data-cashup="[% cashup_id | html %]"]');
487
            if ($button.length) {
488
                $button[0].click();
489
            }
490
            [% END %]
491
        });
483
    </script>
492
    </script>
484
[% END %]
493
[% END %]
485
494
(-)a/pos/register.pl (-2 / +3 lines)
Lines 106-117 else { Link Here
106
    my $op = $input->param('op') // '';
106
    my $op = $input->param('op') // '';
107
    if ( $op eq 'cashup' ) {
107
    if ( $op eq 'cashup' ) {
108
        if ( $logged_in_user->has_permission( { cash_management => 'cashup' } ) ) {
108
        if ( $logged_in_user->has_permission( { cash_management => 'cashup' } ) ) {
109
            $cash_register->add_cashup(
109
            my $cashup = $cash_register->add_cashup(
110
                {
110
                {
111
                    manager_id => $logged_in_user->id,
111
                    manager_id => $logged_in_user->id,
112
                    amount     => $cash_register->outstanding_accountlines->total
112
                    amount     => $cash_register->outstanding_accountlines->total
113
                }
113
                }
114
            );
114
            );
115
            $template->param( cashup_id => $cashup->id );
116
            $template->param( cashup_description => "Some stuff here" );
115
        }
117
        }
116
        else {
118
        else {
117
            $template->param( error_cashup_permission => 1 );
119
            $template->param( error_cashup_permission => 1 );
118
- 

Return to bug 38728