Lines 77-85
my $payment_note = uri_unescape scalar $input->param('payment_note');
Link Here
|
77 |
my $payment_type = scalar $input->param('payment_type'); |
77 |
my $payment_type = scalar $input->param('payment_type'); |
78 |
my $accountlines_id; |
78 |
my $accountlines_id; |
79 |
|
79 |
|
80 |
my $registerid; |
80 |
my $cash_register_id; |
81 |
if ( C4::Context->preference('UseCashRegisters') ) { |
81 |
if ( C4::Context->preference('UseCashRegisters') ) { |
82 |
$registerid = $input->param('registerid'); |
82 |
$cash_register_id = $input->param('cash_register'); |
83 |
my $registers = Koha::Cash::Registers->search( |
83 |
my $registers = Koha::Cash::Registers->search( |
84 |
{ branch => $library_id, archived => 0 }, |
84 |
{ branch => $library_id, archived => 0 }, |
85 |
{ order_by => { '-asc' => 'name' } } |
85 |
{ order_by => { '-asc' => 'name' } } |
Lines 90-105
if ( C4::Context->preference('UseCashRegisters') ) {
Link Here
|
90 |
} |
90 |
} |
91 |
else { |
91 |
else { |
92 |
|
92 |
|
93 |
if ( !$registerid ) { |
93 |
if ( !$cash_register_id ) { |
94 |
my $default_register = Koha::Cash::Registers->find( |
94 |
my $default_register = Koha::Cash::Registers->find( |
95 |
{ branch => $library_id, branch_default => 1 } ); |
95 |
{ branch => $library_id, branch_default => 1 } ); |
96 |
$registerid = $default_register->id if $default_register; |
96 |
$cash_register_id = $default_register->id if $default_register; |
97 |
} |
97 |
} |
98 |
$registerid = $registers->next->id if !$registerid; |
98 |
$cash_register_id = $registers->next->id if !$cash_register_id; |
99 |
|
99 |
|
100 |
$template->param( |
100 |
$template->param( |
101 |
registerid => $registerid, |
101 |
default_register => $cash_register_id, |
102 |
registers => $registers, |
102 |
registers => $registers, |
103 |
); |
103 |
); |
104 |
} |
104 |
} |
105 |
} |
105 |
} |
Lines 196-202
if ( $total_paid and $total_paid ne '0.00' ) {
Link Here
|
196 |
note => $payment_note, |
196 |
note => $payment_note, |
197 |
interface => C4::Context->interface, |
197 |
interface => C4::Context->interface, |
198 |
payment_type => $payment_type, |
198 |
payment_type => $payment_type, |
199 |
cash_register => $registerid |
199 |
cash_register => $cash_register_id |
200 |
} |
200 |
} |
201 |
); |
201 |
); |
202 |
$payment_id = $pay_result->{payment_id}; |
202 |
$payment_id = $pay_result->{payment_id}; |
Lines 221-227
if ( $total_paid and $total_paid ne '0.00' ) {
Link Here
|
221 |
note => $note, |
221 |
note => $note, |
222 |
interface => C4::Context->interface, |
222 |
interface => C4::Context->interface, |
223 |
payment_type => $payment_type, |
223 |
payment_type => $payment_type, |
224 |
cash_register => $registerid |
224 |
cash_register => $cash_register_id |
225 |
} |
225 |
} |
226 |
); |
226 |
); |
227 |
} |
227 |
} |
Lines 237-243
if ( $total_paid and $total_paid ne '0.00' ) {
Link Here
|
237 |
payment_type => $payment_type, |
237 |
payment_type => $payment_type, |
238 |
interface => C4::Context->interface, |
238 |
interface => C4::Context->interface, |
239 |
payment_type => $payment_type, |
239 |
payment_type => $payment_type, |
240 |
cash_register => $registerid |
240 |
cash_register => $cash_register_id |
241 |
} |
241 |
} |
242 |
); |
242 |
); |
243 |
} |
243 |
} |
244 |
- |
|
|