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 566-571 Link Here
566
                }
566
                }
567
            ]
567
            ]
568
        }, null, 1);
568
        }, null, 1);
569
570
        $(document).ready(function() {
571
            [% IF cashup_id %]
572
            let $button = $('[data-cashup="[% cashup_id | html %]"]');
573
            if ($button.length) {
574
                $button[0].click();
575
            }
576
            [% END %]
577
        });
569
    </script>
578
    </script>
570
[% END %]
579
[% END %]
571
580
(-)a/pos/register.pl (-2 / +2 lines)
Lines 104-115 if ( !$registers->count ) { Link Here
104
    my $op = $input->param('op') // '';
104
    my $op = $input->param('op') // '';
105
    if ( $op eq 'cashup' ) {
105
    if ( $op eq 'cashup' ) {
106
        if ( $logged_in_user->has_permission( { cash_management => 'cashup' } ) ) {
106
        if ( $logged_in_user->has_permission( { cash_management => 'cashup' } ) ) {
107
            $cash_register->add_cashup(
107
            my $cashup = $cash_register->add_cashup(
108
                {
108
                {
109
                    manager_id => $logged_in_user->id,
109
                    manager_id => $logged_in_user->id,
110
                    amount     => $cash_register->outstanding_accountlines->total
110
                    amount     => $cash_register->outstanding_accountlines->total
111
                }
111
                }
112
            );
112
            );
113
            $template->param( cashup_id => $cashup->id );
113
        } else {
114
        } else {
114
            $template->param( error_cashup_permission => 1 );
115
            $template->param( error_cashup_permission => 1 );
115
        }
116
        }
116
- 

Return to bug 38728