|
Lines 104-110
if ( !$registers->count ) {
Link Here
|
| 104 |
my $op = $input->param('op') // ''; |
104 |
my $op = $input->param('op') // ''; |
| 105 |
if ( $op eq 'cud-cashup' ) { |
105 |
if ( $op eq 'cud-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 |
|
Lines 112-118
if ( !$registers->count ) {
Link Here
|
| 112 |
); |
112 |
); |
| 113 |
|
113 |
|
| 114 |
# Redirect to prevent duplicate submissions (POST/REDIRECT/GET pattern) |
114 |
# Redirect to prevent duplicate submissions (POST/REDIRECT/GET pattern) |
| 115 |
print $input->redirect( "/cgi-bin/koha/pos/register.pl?registerid=" . $registerid ); |
115 |
print $input->redirect( "/cgi-bin/koha/pos/register.pl?registerid=" . $registerid . "&cashup_id=" . $cashup->id ); |
| 116 |
exit; |
116 |
exit; |
| 117 |
} else { |
117 |
} else { |
| 118 |
$template->param( error_cashup_permission => 1 ); |
118 |
$template->param( error_cashup_permission => 1 ); |
| 119 |
- |
|
|