Lines 32-59
my $logged_in_user = Koha::Patrons->find($loggedinuser) or die "Not logged in";
Link Here
|
32 |
|
32 |
|
33 |
my $library_id = C4::Context->userenv->{'branch'}; |
33 |
my $library_id = C4::Context->userenv->{'branch'}; |
34 |
my $registerid = $input->param('registerid'); |
34 |
my $registerid = $input->param('registerid'); |
35 |
my $default_registerid = $input->param('default_register'); |
|
|
36 |
my $registers = Koha::Cash::Registers->search( |
37 |
{ branch => $library_id, archived => 0 }, |
38 |
{ order_by => { '-asc' => 'name' } } |
39 |
); |
40 |
|
41 |
if ( !$registers->count ) { |
42 |
$template->param( error_registers => 1 ); |
43 |
} |
44 |
else { |
45 |
if ( !$default_registerid ) { |
46 |
my $default_register = Koha::Cash::Registers->find( |
47 |
{ branch => $library_id, branch_default => 1 } ); |
48 |
$default_registerid = |
49 |
$default_register ? $default_register->id : $registers->next->id; |
50 |
} |
51 |
|
52 |
$template->param( |
53 |
default_register => $default_registerid, |
54 |
registers => $registers, |
55 |
); |
56 |
} |
57 |
|
35 |
|
58 |
my $invoice_types = |
36 |
my $invoice_types = |
59 |
Koha::Account::DebitTypes->search_with_library_limits( { can_be_sold => 1 }, |
37 |
Koha::Account::DebitTypes->search_with_library_limits( { can_be_sold => 1 }, |
60 |
- |
|
|